From 75da093a5547d11cd6b0bcbd6fa80bbe901c8870 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 --- tests/regression/ust/getcpu-override/test_getcpu_override | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/regression/ust/getcpu-override/test_getcpu_override b/tests/regression/ust/getcpu-override/test_getcpu_override index 081099e79..585f3b3a0 100755 --- a/tests/regression/ust/getcpu-override/test_getcpu_override +++ b/tests/regression/ust/getcpu-override/test_getcpu_override @@ -46,7 +46,7 @@ SEQUENCE_SEED=( ) # Equivalent to the syconf(_SC_NPROCESSORS_CONF) call. -NPROC=`nproc --all` +num_cpus=$(conf_proc_count) source $TESTDIR/utils/utils.sh @@ -90,7 +90,7 @@ compare() ok $? "Sequence seed and cpuid sequence have the same size ${#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 @@ -107,7 +107,7 @@ compare() echo -n "# array value is " echo -n "${array_to_compare[$i]}" echo -n " expected " - echo "$(( ${SEQUENCE_SEED[$i]} % $NPROC))" + echo "$(( ${SEQUENCE_SEED[$i]} % $num_cpus))" done diag "Dumping trace" $BABELTRACE_BIN $TRACE_PATH | awk '{print "# " $0}' -- 2.34.1