HomeFreeBSD

renice: Avoid segfault if -n flag is given without argument.

Description

renice: Avoid segfault if -n flag is given without argument.

Fixes: 65ee0a8495538
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D39623

(cherry picked from commit b03311cadd3a6f931e176f97b97bd72be3ef96d4)

renice: Clean up the tests.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D39629

(cherry picked from commit d59dd30cf19bb6df5635b3c896c7c4262917a9b6)

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

(cherry picked from commit 1bc6dcc287fa80af74768c4e2b2a1d7511ba1729)

Details

Provenance
desAuthored on Apr 17 2023, 7:49 PM
Reviewer
kevans
Differential Revision
D39623: renice: Avoid segfault if -n flag is given without argument.
Parents
rG651e037e2720: Intel DMAR: remove parsing of 6-level paging capability
Branches
Unknown
Tags
Unknown