* tests/nproc/nproc-quota-systemd.sh: Explicitly set OMP_NUM_THREADS
to an ignorable value, to ensure scheduler processing is independent.
* tests/nproc/nproc-quota.sh: Likewise for the SCHED_FIFO check.
https://github.com/coreutils/coreutils/pull/290
pct=$1; shift
if systemd-run --scope -q -p CPUQuota=$pct chrt $* true; then
- test $(systemd-run --scope -q -p CPUQuota=$pct chrt $* nproc) = $cpu ||
+ test $(systemd-run --scope -q -p CPUQuota=$pct \
+ chrt $* \
+ env OMP_NUM_THREADS=0 \
+ nproc) = $cpu ||
return 1
fi
return 0
echo '100000 100000' > $ROOT/sys/fs/cgroup/cpu.max &&
echo 'policy : 1' > $ROOT/proc/self/sched && # No quota for SCHED_FIFO
-test $(NPROC) -eq $ncpus || fail=1
+test $(OMP_NUM_THREADS= NPROC) -eq $ncpus || fail=1
echo 'policy : 2' > $ROOT/proc/self/sched && # No quota for SCHED_RR
test $(NPROC) -eq $ncpus || fail=1
echo 'policy : 6' > $ROOT/proc/self/sched && # No quota for SCHED_DEADLINE