From: oech3 <79379754+oech3@users.noreply.github.com> Date: Sun, 14 Jun 2026 16:02:18 +0000 (+0900) Subject: tests: nproc: ensure --ignore clamps overflowed num X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=196956dff97c79e1bf7c208c4199d465e2d001a6;p=thirdparty%2Fcoreutils.git tests: nproc: ensure --ignore clamps overflowed num * tests/nproc/nproc-positive.sh: Test --ignore overflowed num is clamped to $UINTMAX_MAX. https://github.com/coreutils/coreutils/pull/293 --- diff --git a/tests/nproc/nproc-positive.sh b/tests/nproc/nproc-positive.sh index 923db10d9..6f7b17c48 100755 --- a/tests/nproc/nproc-positive.sh +++ b/tests/nproc/nproc-positive.sh @@ -18,6 +18,7 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ nproc +getlimits_ for mode in --all ''; do procs=$(nproc $mode) @@ -40,5 +41,6 @@ done procs=$(OMP_NUM_THREADS=42 nproc --ignore=40) test "$procs" -eq 2 || fail=1 +test $(OMP_NUM_THREADS=42 nproc --ignore ${UINTMAX_OFLOW}) = 1 || fail=1 Exit $fail