-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sound: add tests to Alsa and other test stuff #579
Conversation
Error event HandleUnknownEvent was not detected correctly, since we first assume `device_event` is correct, use it as an index value to access `vrings` slice, possible panic, and then match on the `queue_idx` from the `vring`. Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
The init_logger() function gets compiled in tests only, and serves to initialize logging only once per test thread. Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
stop() was not returning an error if stream_id was invalid, it was succeeding. Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Descriptor/buffer logic is missing from tests, hence the low scores. |
@epilys thanks for this work! ALSA tests are failing in the CI. From a quick glance, it looks like some configuration files are missing. |
@stefano-garzarella oops, I probably need to use the |
That was exhausting to figure out, hope it works... Everytime the CI takes 10x longer than writing code! |
2627e19
to
d9cfce7
Compare
Ok this is mildly annoying. The problem is there's no alsa card in the container. Fine, no problem: define one that writes to /dev/null. Then pipewire breaks because it also uses the alsa configuration. I'll leave it at that for today, if anyone has a good idea let me know. |
It looks like only |
Yeah in my tiredness I didn't notice that, only after posting... |
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
@epilys Thanks for this work. LGTM. |
Whats with the branch coverage being 0/0 despite increasing line coverage - is this a tooling bug? |
@stsquad rustc doesn't support it yet rust-lang/rust#79649 |
Test whatever we can without actually playing/recording everything; this would require integration tests, not unit tests. Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This increases test coverage. Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Add type safe enum to use instead of raw u16 values, which we have to validate every time we use them. Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Summary of the PR
add tests to Alsa and other test stuff
Before
After
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.