Page MenuHomeFreeBSD

mixer(8) tests: Fix cleanup routine
ClosedPublic

Authored by olivier on Aug 30 2024, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 10:26 PM
Unknown Object (File)
Wed, Nov 13, 12:58 AM
Unknown Object (File)
Sat, Oct 26, 12:15 PM
Unknown Object (File)
Sat, Oct 26, 12:15 PM
Unknown Object (File)
Sat, Oct 26, 12:15 PM
Unknown Object (File)
Sat, Oct 26, 12:01 PM
Unknown Object (File)
Fri, Oct 25, 10:03 PM
Unknown Object (File)
Wed, Oct 23, 6:07 AM
Subscribers

Details

Summary

The tests correctly skip if no snd_dummy neither mixer is found.
But the cleanup is still called with the skip condition and this one by calling mixer fails.

Test Plan

Before:

root@host:/usr/tests # mv /boot/kernel/snd_dummy.ko /boot/kernel/snd_dummy.ko.bak
root@host:/usr/tests # kyua test usr.sbin/mixer
usr.sbin/mixer/mixer_test:d_flag  ->  broken: Test case cleanup did not terminate successfully  [0.014s]
usr.sbin/mixer/mixer_test:o_flag  ->  broken: Test case cleanup did not terminate successfully  [0.015s]
usr.sbin/mixer/mixer_test:mute  ->  skipped: cannot load snd_dummy.ko  [0.014s]
usr.sbin/mixer/mixer_test:recsrc  ->  skipped: cannot load snd_dummy.ko  [0.015s]
usr.sbin/mixer/mixer_test:volume  ->  skipped: cannot load snd_dummy.ko  [0.015s]

Results file id is usr_tests.20240830-160704-611764
Results saved to /root/.kyua/store/results.usr_tests.20240830-160704-611764.db

3/5 passed (2 failed)

After:

root@host:/usr/tests # kyua test usr.sbin/mixer
usr.sbin/mixer/mixer_test:d_flag  ->  skipped: cannot load snd_dummy.ko  [0.015s]
usr.sbin/mixer/mixer_test:mute  ->  skipped: cannot load snd_dummy.ko  [0.015s]
usr.sbin/mixer/mixer_test:o_flag  ->  skipped: cannot load snd_dummy.ko  [0.015s]
usr.sbin/mixer/mixer_test:recsrc  ->  skipped: cannot load snd_dummy.ko  [0.016s]
usr.sbin/mixer/mixer_test:volume  ->  skipped: cannot load snd_dummy.ko  [0.015s]

Results file id is usr_tests.20240830-161822-481902
Results saved to /root/.kyua/store/results.usr_tests.20240830-161822-481902.db

5/5 passed (0 failed)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

olivier created this revision.

LGTM. I will commit the patch and add you as the author, as it needs some style(9) fix as well. Thanks!

This revision is now accepted and ready to land.Aug 30 2024, 5:18 PM
christos retitled this revision from Fix cleanup step when no mixer nor snd_dummy to mixer(8) tests: Fix cleanup routine.Aug 30 2024, 5:19 PM
This revision was automatically updated to reflect the committed changes.