From 7936508a644e453a02848ccd8f89343926a9c0b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 12 Feb 2016 11:19:22 -0500 Subject: [PATCH] Tests: use configured processor count in getcpu override tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau Conflicts: tests/regression/ust/getcpu-override/test_getcpu_override --- tests/regression/ust/getcpu-override/test_getcpu_override | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regression/ust/getcpu-override/test_getcpu_override b/tests/regression/ust/getcpu-override/test_getcpu_override index 2492c9c11..10b06e39a 100755 --- a/tests/regression/ust/getcpu-override/test_getcpu_override +++ b/tests/regression/ust/getcpu-override/test_getcpu_override @@ -45,7 +45,7 @@ SEQUENCE_SEED=( ) # Equivalent to the syconf(_SC_NPROCESSORS_CONF) call. -NPROC=`nproc --all` +num_cpus=$(conf_proc_count) source $TESTDIR/utils/utils.sh @@ -89,7 +89,7 @@ compare() ok $? "Sequence seed and cpuid sequence are equal ${#SEQUENCE_SEED[*]}/${#array_to_compare[*]}" for (( i = 0; i < ${#SEQUENCE_SEED[*]}; i++ )); do - if [ "${array_to_compare[$i]}" -ne "$(( ${SEQUENCE_SEED[$i]} % $NPROC))" ]; then + if [ "${array_to_compare[$i]}" -ne "$(( ${SEQUENCE_SEED[$i]} % $num_cpus))" ]; then valid=1 break fi -- 2.34.1