From: Jérémie Galarneau Date: Fri, 12 Feb 2016 16:19:22 +0000 (-0500) Subject: Tests: use configured processor count in getcpu override tests X-Git-Tag: v2.8.0-rc1~185 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=75da093a5547d11cd6b0bcbd6fa80bbe901c8870;p=lttng-tools.git Tests: use configured processor count in getcpu override tests Signed-off-by: Jérémie Galarneau --- 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}'