From: Michael Jeanson Date: Wed, 22 Jun 2016 19:16:18 +0000 (-0400) Subject: Fix: Add failover for platforms without nproc X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0b1302de76eab674580d63e55d37068a1b5f731b;p=deliverable%2Fuserspace-rcu.git Fix: Add failover for platforms without nproc Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/configure.ac b/configure.ac index ae75a3b..3cc8dd2 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,16 @@ AC_PROG_CC_STDC AC_PROG_AWK AC_PROG_MAKE_SET AC_CHECK_PROGS(NPROC, [nproc gnproc]) +AC_CHECK_PROGS(GETCONF, [getconf]) +AS_IF([test "x$NPROC" != "x"], + [NPROC_CMD=$NPROC], + [AS_IF([test "x$GETCONF" != "x"], + [NPROC_CMD="$GETCONF _NPROCESSORS_ONLN"], + [NPROC_CMD="echo 1"] + )] +) +AC_SUBST([NPROC_CMD], [$NPROC_CMD]) + LT_INIT # Checks for typedefs, structures, and compiler characteristics. diff --git a/tests/regression/regression_tests.in b/tests/regression/regression_tests.in index a66da24..26df110 100644 --- a/tests/regression/regression_tests.in +++ b/tests/regression/regression_tests.in @@ -1,61 +1,61 @@ ./test_urcu_fork -./rcutorture_urcu `@NPROC@` perf 1 callrcu_global -./rcutorture_urcu_signal `@NPROC@` perf 1 callrcu_global -./rcutorture_urcu_mb `@NPROC@` perf 1 callrcu_global -./rcutorture_urcu_bp `@NPROC@` perf 1 callrcu_global -./rcutorture_urcu_qsbr `@NPROC@` perf 1 callrcu_global -./rcutorture_urcu `@NPROC@` rperf 1 callrcu_global -./rcutorture_urcu_signal `@NPROC@` rperf 1 callrcu_global -./rcutorture_urcu_mb `@NPROC@` rperf 1 callrcu_global -./rcutorture_urcu_bp `@NPROC@` rperf 1 callrcu_global -./rcutorture_urcu_qsbr `@NPROC@` rperf 1 callrcu_global -./rcutorture_urcu `@NPROC@` uperf 1 callrcu_global -./rcutorture_urcu_signal `@NPROC@` uperf 1 callrcu_global -./rcutorture_urcu_mb `@NPROC@` uperf 1 callrcu_global -./rcutorture_urcu_bp `@NPROC@` uperf 1 callrcu_global -./rcutorture_urcu_qsbr `@NPROC@` uperf 1 callrcu_global -./rcutorture_urcu `@NPROC@` stress 1 callrcu_global -./rcutorture_urcu_signal `@NPROC@` stress 1 callrcu_global -./rcutorture_urcu_mb `@NPROC@` stress 1 callrcu_global -./rcutorture_urcu_bp `@NPROC@` stress 1 callrcu_global -./rcutorture_urcu_qsbr `@NPROC@` stress 1 callrcu_global -./rcutorture_urcu `@NPROC@` perf 1 callrcu_percpu -./rcutorture_urcu_signal `@NPROC@` perf 1 callrcu_percpu -./rcutorture_urcu_mb `@NPROC@` perf 1 callrcu_percpu -./rcutorture_urcu_bp `@NPROC@` perf 1 callrcu_percpu -./rcutorture_urcu_qsbr `@NPROC@` perf 1 callrcu_percpu -./rcutorture_urcu `@NPROC@` rperf 1 callrcu_percpu -./rcutorture_urcu_signal `@NPROC@` rperf 1 callrcu_percpu -./rcutorture_urcu_mb `@NPROC@` rperf 1 callrcu_percpu -./rcutorture_urcu_bp `@NPROC@` rperf 1 callrcu_percpu -./rcutorture_urcu_qsbr `@NPROC@` rperf 1 callrcu_percpu -./rcutorture_urcu `@NPROC@` uperf 1 callrcu_percpu -./rcutorture_urcu_signal `@NPROC@` uperf 1 callrcu_percpu -./rcutorture_urcu_mb `@NPROC@` uperf 1 callrcu_percpu -./rcutorture_urcu_bp `@NPROC@` uperf 1 callrcu_percpu -./rcutorture_urcu_qsbr `@NPROC@` uperf 1 callrcu_percpu -./rcutorture_urcu `@NPROC@` stress 1 callrcu_percpu -./rcutorture_urcu_signal `@NPROC@` stress 1 callrcu_percpu -./rcutorture_urcu_mb `@NPROC@` stress 1 callrcu_percpu -./rcutorture_urcu_bp `@NPROC@` stress 1 callrcu_percpu -./rcutorture_urcu_qsbr `@NPROC@` stress 1 callrcu_percpu -./rcutorture_urcu `@NPROC@` perf 1 callrcu_perthread -./rcutorture_urcu_signal `@NPROC@` perf 1 callrcu_perthread -./rcutorture_urcu_mb `@NPROC@` perf 1 callrcu_perthread -./rcutorture_urcu_bp `@NPROC@` perf 1 callrcu_perthread -./rcutorture_urcu_qsbr `@NPROC@` perf 1 callrcu_perthread -./rcutorture_urcu `@NPROC@` rperf 1 callrcu_perthread -./rcutorture_urcu_signal `@NPROC@` rperf 1 callrcu_perthread -./rcutorture_urcu_mb `@NPROC@` rperf 1 callrcu_perthread -./rcutorture_urcu_bp `@NPROC@` rperf 1 callrcu_perthread -./rcutorture_urcu_qsbr `@NPROC@` rperf 1 callrcu_perthread -./rcutorture_urcu `@NPROC@` uperf 1 callrcu_perthread -./rcutorture_urcu_signal `@NPROC@` uperf 1 callrcu_perthread -./rcutorture_urcu_mb `@NPROC@` uperf 1 callrcu_perthread -./rcutorture_urcu_bp `@NPROC@` uperf 1 callrcu_perthread -./rcutorture_urcu_qsbr `@NPROC@` uperf 1 callrcu_perthread -./rcutorture_urcu `@NPROC@` stress 1 callrcu_perthread -./rcutorture_urcu_signal `@NPROC@` stress 1 callrcu_perthread -./rcutorture_urcu_mb `@NPROC@` stress 1 callrcu_perthread -./rcutorture_urcu_bp `@NPROC@` stress 1 callrcu_perthread -./rcutorture_urcu_qsbr `@NPROC@` stress 1 callrcu_perthread +./rcutorture_urcu `@NPROC_CMD@` perf 1 callrcu_global +./rcutorture_urcu_signal `@NPROC_CMD@` perf 1 callrcu_global +./rcutorture_urcu_mb `@NPROC_CMD@` perf 1 callrcu_global +./rcutorture_urcu_bp `@NPROC_CMD@` perf 1 callrcu_global +./rcutorture_urcu_qsbr `@NPROC_CMD@` perf 1 callrcu_global +./rcutorture_urcu `@NPROC_CMD@` rperf 1 callrcu_global +./rcutorture_urcu_signal `@NPROC_CMD@` rperf 1 callrcu_global +./rcutorture_urcu_mb `@NPROC_CMD@` rperf 1 callrcu_global +./rcutorture_urcu_bp `@NPROC_CMD@` rperf 1 callrcu_global +./rcutorture_urcu_qsbr `@NPROC_CMD@` rperf 1 callrcu_global +./rcutorture_urcu `@NPROC_CMD@` uperf 1 callrcu_global +./rcutorture_urcu_signal `@NPROC_CMD@` uperf 1 callrcu_global +./rcutorture_urcu_mb `@NPROC_CMD@` uperf 1 callrcu_global +./rcutorture_urcu_bp `@NPROC_CMD@` uperf 1 callrcu_global +./rcutorture_urcu_qsbr `@NPROC_CMD@` uperf 1 callrcu_global +./rcutorture_urcu `@NPROC_CMD@` stress 1 callrcu_global +./rcutorture_urcu_signal `@NPROC_CMD@` stress 1 callrcu_global +./rcutorture_urcu_mb `@NPROC_CMD@` stress 1 callrcu_global +./rcutorture_urcu_bp `@NPROC_CMD@` stress 1 callrcu_global +./rcutorture_urcu_qsbr `@NPROC_CMD@` stress 1 callrcu_global +./rcutorture_urcu `@NPROC_CMD@` perf 1 callrcu_percpu +./rcutorture_urcu_signal `@NPROC_CMD@` perf 1 callrcu_percpu +./rcutorture_urcu_mb `@NPROC_CMD@` perf 1 callrcu_percpu +./rcutorture_urcu_bp `@NPROC_CMD@` perf 1 callrcu_percpu +./rcutorture_urcu_qsbr `@NPROC_CMD@` perf 1 callrcu_percpu +./rcutorture_urcu `@NPROC_CMD@` rperf 1 callrcu_percpu +./rcutorture_urcu_signal `@NPROC_CMD@` rperf 1 callrcu_percpu +./rcutorture_urcu_mb `@NPROC_CMD@` rperf 1 callrcu_percpu +./rcutorture_urcu_bp `@NPROC_CMD@` rperf 1 callrcu_percpu +./rcutorture_urcu_qsbr `@NPROC_CMD@` rperf 1 callrcu_percpu +./rcutorture_urcu `@NPROC_CMD@` uperf 1 callrcu_percpu +./rcutorture_urcu_signal `@NPROC_CMD@` uperf 1 callrcu_percpu +./rcutorture_urcu_mb `@NPROC_CMD@` uperf 1 callrcu_percpu +./rcutorture_urcu_bp `@NPROC_CMD@` uperf 1 callrcu_percpu +./rcutorture_urcu_qsbr `@NPROC_CMD@` uperf 1 callrcu_percpu +./rcutorture_urcu `@NPROC_CMD@` stress 1 callrcu_percpu +./rcutorture_urcu_signal `@NPROC_CMD@` stress 1 callrcu_percpu +./rcutorture_urcu_mb `@NPROC_CMD@` stress 1 callrcu_percpu +./rcutorture_urcu_bp `@NPROC_CMD@` stress 1 callrcu_percpu +./rcutorture_urcu_qsbr `@NPROC_CMD@` stress 1 callrcu_percpu +./rcutorture_urcu `@NPROC_CMD@` perf 1 callrcu_perthread +./rcutorture_urcu_signal `@NPROC_CMD@` perf 1 callrcu_perthread +./rcutorture_urcu_mb `@NPROC_CMD@` perf 1 callrcu_perthread +./rcutorture_urcu_bp `@NPROC_CMD@` perf 1 callrcu_perthread +./rcutorture_urcu_qsbr `@NPROC_CMD@` perf 1 callrcu_perthread +./rcutorture_urcu `@NPROC_CMD@` rperf 1 callrcu_perthread +./rcutorture_urcu_signal `@NPROC_CMD@` rperf 1 callrcu_perthread +./rcutorture_urcu_mb `@NPROC_CMD@` rperf 1 callrcu_perthread +./rcutorture_urcu_bp `@NPROC_CMD@` rperf 1 callrcu_perthread +./rcutorture_urcu_qsbr `@NPROC_CMD@` rperf 1 callrcu_perthread +./rcutorture_urcu `@NPROC_CMD@` uperf 1 callrcu_perthread +./rcutorture_urcu_signal `@NPROC_CMD@` uperf 1 callrcu_perthread +./rcutorture_urcu_mb `@NPROC_CMD@` uperf 1 callrcu_perthread +./rcutorture_urcu_bp `@NPROC_CMD@` uperf 1 callrcu_perthread +./rcutorture_urcu_qsbr `@NPROC_CMD@` uperf 1 callrcu_perthread +./rcutorture_urcu `@NPROC_CMD@` stress 1 callrcu_perthread +./rcutorture_urcu_signal `@NPROC_CMD@` stress 1 callrcu_perthread +./rcutorture_urcu_mb `@NPROC_CMD@` stress 1 callrcu_perthread +./rcutorture_urcu_bp `@NPROC_CMD@` stress 1 callrcu_perthread +./rcutorture_urcu_qsbr `@NPROC_CMD@` stress 1 callrcu_perthread