From: oech3 <79379754+oech3@users.noreply.github.com> Date: Fri, 3 Jul 2026 01:00:30 +0000 (+0900) Subject: tests: nproc: support referencing of external command X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a463a6e6ee692d74833d05dec47840be550e2914;p=thirdparty%2Fcoreutils.git tests: nproc: support referencing of external command * tests/nproc/nproc-quota.sh: Use command -v nproc instead of $abs_top_builddir for external usage of tests. Also quote "$nproc" usage, to support spaces in path. Link: https://github.com/coreutils/coreutils/pull/310 --- diff --git a/tests/nproc/nproc-quota.sh b/tests/nproc/nproc-quota.sh index e8c24bcde0..c950ecae93 100755 --- a/tests/nproc/nproc-quota.sh +++ b/tests/nproc/nproc-quota.sh @@ -44,10 +44,10 @@ ROOT=cgroup echo 'max 100000' > $ROOT/sys/fs/cgroup/foo/cpu.max # ignored } || framework_failure_ -nproc=$abs_top_builddir/src/nproc$EXEEXT -cp --parents $(ldd $nproc | grep -o '/[^ ]*') $ROOT || +nproc=$(command -v nproc) +cp --parents $(ldd "$nproc" | grep -o '/[^ ]*') $ROOT || skip_ 'Failed to copy nproc libs to chroot' -cp $nproc $ROOT || framework_failure_ +cp "$nproc" $ROOT || framework_failure_ NPROC() { IFS=': ' read key policy < $ROOT/proc/self/sched