Commit Graph

6 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
1bc6dcc287 renice: Factor out common code in tests.
Furthermore, prefer test -eq (which ignores whitespace) over a strict string equality test when comparing numerical values.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	thj
Differential Revision:	https://reviews.freebsd.org/D39650
2023-04-18 17:14:25 +00:00
Dag-Erling Smørgrav
d59dd30cf1 renice: Clean up the tests.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D39629
2023-04-18 05:31:56 +00:00
Dag-Erling Smørgrav
b03311cadd renice: Avoid segfault if -n flag is given without argument.
Fixes:		65ee0a8495
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D39623
2023-04-17 19:50:19 +00:00
Olivier Cochard
07b1ea961a renice: Force /bin/sh usage on su calls for the regression tests.
If the root account is configured to use a different shell than sh,
it fails to retreive the pid of the background process.

Approved by:	des
Obtained from:	chs
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D36930
2022-10-13 17:32:47 +02:00
Olivier Cochard
c8b6939dfa renice: Prevent running regression tests in parallel
renice_abs_user and renice_rel_user tests modify global state, so they
are not compatible with parallel execution.

Reviewed by:	asomers
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D36720
2022-09-30 00:28:19 +02:00
Dag-Erling Smørgrav
7ccdad905f renice: add unit tests.
Sponsored by:	Klara, Inc.
2022-08-25 20:06:20 +00:00