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)
Jan 15 2024, 4:51 PM
Unknown Object (File)
Dec 20 2023, 6:12 AM
Unknown Object (File)
Dec 18 2023, 10:51 PM
Unknown Object (File)
Dec 12 2023, 3:19 AM
Unknown Object (File)
Dec 4 2023, 2:51 AM
Unknown Object (File)
Nov 25 2023, 10:27 AM
Unknown Object (File)
Nov 23 2023, 5:19 AM
Unknown Object (File)
Nov 12 2023, 12:28 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

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

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.