diff --git a/tests/nproc/nproc-quota-systemd.sh b/tests/nproc/nproc-quota-systemd.sh index 4d8add993..7b95dea55 100755 --- a/tests/nproc/nproc-quota-systemd.sh +++ b/tests/nproc/nproc-quota-systemd.sh @@ -31,7 +31,10 @@ check_sched_quota() 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 diff --git a/tests/nproc/nproc-quota.sh b/tests/nproc/nproc-quota.sh index 0d4923133..f5f67565f 100755 --- a/tests/nproc/nproc-quota.sh +++ b/tests/nproc/nproc-quota.sh @@ -116,7 +116,7 @@ test $(OMP_NUM_THREADS=$ncpus NPROC) -eq $ncpus || fail=1 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