2 # SPDX-License-Identifier: GPL-2.0+ or MIT
4 NR_CPUS
=`grep '^processor' /proc/cpuinfo | wc -l`
33 NR_THREADS
=$
((6*${NR_CPUS}))
38 while [ "$i" -lt "${#TEST_LIST[@]}" ]; do
39 echo "Running test ${TEST_NAME[$i]}"
40 .
/param_test
${TEST_LIST[$i]} -r ${REPS} -t ${NR_THREADS} ${@} ${EXTRA_ARGS} ||
exit 1
41 echo "Running compare-twice test ${TEST_NAME[$i]}"
42 .
/param_test_compare_twice
${TEST_LIST[$i]} -r ${REPS} -t ${NR_THREADS} ${@} ${EXTRA_ARGS} ||
exit 1
47 echo "Default parameters"
50 echo "Loop injection: 10000 loops"
70 while [ "$i" -lt "${#INJECT_LIST[@]}" ]; do
71 echo "Injecting at <${INJECT_LIST[$i]}>"
72 do_tests
-${INJECT_LIST[i]} ${NR_LOOPS}
77 function inject_blocking
()
91 while [ "$i" -lt "${#INJECT_LIST[@]}" ]; do
92 echo "Injecting at <${INJECT_LIST[$i]}>"
93 do_tests
-${INJECT_LIST[i]} -1 ${@}
99 echo "Yield injection (25%)"
100 inject_blocking
-m 4 -y
102 echo "Yield injection (50%)"
103 inject_blocking
-m 2 -y
105 echo "Yield injection (100%)"
106 inject_blocking
-m 1 -y
108 echo "Kill injection (25%)"
109 inject_blocking
-m 4 -k
111 echo "Kill injection (50%)"
112 inject_blocking
-m 2 -k
114 echo "Kill injection (100%)"
115 inject_blocking
-m 1 -k
117 echo "Sleep injection (1ms, 25%)"
118 inject_blocking
-m 4 -s 1
120 echo "Sleep injection (1ms, 50%)"
121 inject_blocking
-m 2 -s 1
123 echo "Sleep injection (1ms, 100%)"
124 inject_blocking
-m 1 -s 1