2 # SPDX-License-Identifier: GPL-2.0+ or MIT
4 NR_CPUS
=`grep '^processor' /proc/cpuinfo | wc -l`
35 NR_THREADS
=$
((6*${NR_CPUS}))
40 while [ "$i" -lt "${#TEST_LIST[@]}" ]; do
41 echo "Running test ${TEST_NAME[$i]}"
42 .
/param_test
${TEST_LIST[$i]} -r ${REPS} -t ${NR_THREADS} ${@} ${EXTRA_ARGS} ||
exit 1
43 echo "Running compare-twice test ${TEST_NAME[$i]}"
44 .
/param_test_compare_twice
${TEST_LIST[$i]} -r ${REPS} -t ${NR_THREADS} ${@} ${EXTRA_ARGS} ||
exit 1
49 echo "Default parameters"
52 echo "Loop injection: 10000 loops"
72 while [ "$i" -lt "${#INJECT_LIST[@]}" ]; do
73 echo "Injecting at <${INJECT_LIST[$i]}>"
74 do_tests
-${INJECT_LIST[i]} ${NR_LOOPS}
79 function inject_blocking
()
93 while [ "$i" -lt "${#INJECT_LIST[@]}" ]; do
94 echo "Injecting at <${INJECT_LIST[$i]}>"
95 do_tests
-${INJECT_LIST[i]} -1 ${@}
101 echo "Yield injection (25%)"
102 inject_blocking
-m 4 -y
104 echo "Yield injection (50%)"
105 inject_blocking
-m 2 -y
107 echo "Yield injection (100%)"
108 inject_blocking
-m 1 -y
110 echo "Kill injection (25%)"
111 inject_blocking
-m 4 -k
113 echo "Kill injection (50%)"
114 inject_blocking
-m 2 -k
116 echo "Kill injection (100%)"
117 inject_blocking
-m 1 -k
119 echo "Sleep injection (1ms, 25%)"
120 inject_blocking
-m 4 -s 1
122 echo "Sleep injection (1ms, 50%)"
123 inject_blocking
-m 2 -s 1
125 echo "Sleep injection (1ms, 100%)"
126 inject_blocking
-m 1 -s 1