Page MenuHomeFreeBSD

tests/usr.bin/renice: Prevent running them in parallel
ClosedPublic

Authored by olivier on Sep 26 2022, 3:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 5:31 AM
Unknown Object (File)
Thu, Nov 14, 4:01 PM
Unknown Object (File)
Oct 4 2024, 8:29 PM
Unknown Object (File)
Oct 2 2024, 1:34 PM
Unknown Object (File)
Oct 1 2024, 10:32 PM
Unknown Object (File)
Sep 28 2024, 2:20 PM
Unknown Object (File)
Sep 28 2024, 4:02 AM
Unknown Object (File)
Sep 26 2024, 3:19 PM

Details

Summary

Those tests are failing when executed in parallel.

Test Plan

Before:

echo "parallelism=8" >> /etc/kyua/kyua.conf
cd /usr/tests
kyua test usr.bin/renice
usr.bin/renice/renice_test:renice_abs_pid  ->  passed  [0.011s]
usr.bin/renice/renice_test:renice_abs_pgid  ->  passed  [0.012s]
usr.bin/renice/renice_test:renice_abs_user  ->  passed  [0.015s]
usr.bin/renice/renice_test:renice_rel_pgid  ->  passed  [0.015s]
usr.bin/renice/renice_test:renice_rel_pid  ->  passed  [0.015s]
usr.bin/renice/renice_test:renice_rel_user  ->  failed: 6 != 9 (6 != 9)  [0.017s]
usr.bin/renice/renice_test:renice_delim  ->  passed  [0.033s]

Results file id is usr_tests.20220926-153624-323416
Results saved to /root/.kyua/store/results.usr_tests.20220926-153624-323416.db

6/7 passed (1 failed)

After:

kyua test usr.bin/renice
usr.bin/renice/renice_test:renice_abs_pgid  ->  passed  [0.012s]
usr.bin/renice/renice_test:renice_abs_pid  ->  passed  [0.009s]
usr.bin/renice/renice_test:renice_abs_user  ->  passed  [0.015s]
usr.bin/renice/renice_test:renice_delim  ->  passed  [0.038s]
usr.bin/renice/renice_test:renice_rel_pgid  ->  passed  [0.014s]
usr.bin/renice/renice_test:renice_rel_pid  ->  passed  [0.016s]
usr.bin/renice/renice_test:renice_rel_user  ->  passed  [0.018s]

Results file id is usr_tests.20220926-153848-447640
Results saved to /root/.kyua/store/results.usr_tests.20220926-153848-447640.db

7/7 passed (0 failed)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

olivier created this revision.

Are these tests fundamentally incompatible with parallel execution? If not I'd prefer if they could be fixed. Alternatively this could go in as a workaround as long as there is a PR to ensure this gets cleaned up eventually.

I just skimmed over this tests and it seems like the only one that modifies global state are renice_abs_user and renice_rel_user since all others only apply to the PID. I think it should be sufficient to split those two out into a separate test and set exclusive on that one? This would allow running the remaining tests in parallel and thereby increase throughput.

Unless it's possible to set is_exclusive on a single test case rather than the whole test suite?

asomers added a subscriber: asomers.

Sadly, I think there's no way to set that property for an individual test case. I think it's ok to set it for the entire program, since these tests run pretty fast anyway.

This revision is now accepted and ready to land.Sep 28 2022, 3:32 PM

Are these tests fundamentally incompatible with parallel execution?

The ones with user in their name can't be run concurrently. The others should be fine.