Tests: use configured processor count in getcpu override tests
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 12 Feb 2016 16:19:22 +0000 (11:19 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 14 Feb 2016 23:42:37 +0000 (18:42 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Conflicts:
tests/regression/ust/getcpu-override/test_getcpu_override

tests/regression/ust/getcpu-override/test_getcpu_override

index 2492c9c1133eb7b3bd170afd15b9e36d584676cc..10b06e39a3e5c7013041f9d09c3b67f90f06f680 100755 (executable)
@@ -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
This page took 0.02561 seconds and 4 git commands to generate.