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.7.2~19 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7936508a644e453a02848ccd8f89343926a9c0b9;p=lttng-tools.git Tests: use configured processor count in getcpu override tests Signed-off-by: Jérémie Galarneau Conflicts: tests/regression/ust/getcpu-override/test_getcpu_override --- 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