Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh
- index 7ff002eed624..d76bbd77d1de 100755
- --- a/tools/testing/selftests/futex/functional/run.sh
- +++ b/tools/testing/selftests/futex/functional/run.sh
- @@ -22,6 +22,29 @@
- #
- ###############################################################################
- +check_return() {
- + exit_code="$?"
- + test_case="$@"
- +
- + if [ "${exit_code}" -ne 0 ]; then
- + echo "selftests: ${test_case} fail"
- + return "${exit_code}"
- + else
- + echo "selftests: ${test_case} pass"
- + return 0
- + fi
- +}
- +
- +run() {
- + # shellcheck disable=SC2039
- + local test="$@"
- + echo
- + echo "INFO Running ${test_case_id} test..."
- + eval "./${test}"
- + test_case_id="$(echo "${test}" | awk '{for (i=1; i<NF; i++) printf $i ; print $i}')"
- + check_return "${test_case_id}"
- +}
- +
- # Test for a color capable console
- if [ -z "$USE_COLOR" ]; then
- tput setf 7 || tput setaf 7
- @@ -38,42 +61,42 @@ fi
- echo
- # requeue pi testing
- # without timeouts
- -./futex_requeue_pi $COLOR
- -./futex_requeue_pi $COLOR -b
- -./futex_requeue_pi $COLOR -b -l
- -./futex_requeue_pi $COLOR -b -o
- -./futex_requeue_pi $COLOR -l
- -./futex_requeue_pi $COLOR -o
- +run "futex_requeue_pi $COLOR"
- +run "futex_requeue_pi $COLOR -b"
- +run "futex_requeue_pi $COLOR -b -l"
- +run "futex_requeue_pi $COLOR -b -o"
- +run "futex_requeue_pi $COLOR -l"
- +run "futex_requeue_pi $COLOR -o"
- # with timeouts
- -./futex_requeue_pi $COLOR -b -l -t 5000
- -./futex_requeue_pi $COLOR -l -t 5000
- -./futex_requeue_pi $COLOR -b -l -t 500000
- -./futex_requeue_pi $COLOR -l -t 500000
- -./futex_requeue_pi $COLOR -b -t 5000
- -./futex_requeue_pi $COLOR -t 5000
- -./futex_requeue_pi $COLOR -b -t 500000
- -./futex_requeue_pi $COLOR -t 500000
- -./futex_requeue_pi $COLOR -b -o -t 5000
- -./futex_requeue_pi $COLOR -l -t 5000
- -./futex_requeue_pi $COLOR -b -o -t 500000
- -./futex_requeue_pi $COLOR -l -t 500000
- +run "futex_requeue_pi $COLOR -b -l -t 5000"
- +run "futex_requeue_pi $COLOR -l -t 5000"
- +run "futex_requeue_pi $COLOR -b -l -t 500000"
- +run "futex_requeue_pi $COLOR -l -t 500000"
- +run "futex_requeue_pi $COLOR -b -t 5000"
- +run "futex_requeue_pi $COLOR -t 5000"
- +run "futex_requeue_pi $COLOR -b -t 500000"
- +run "futex_requeue_pi $COLOR -t 500000"
- +run "futex_requeue_pi $COLOR -b -o -t 5000"
- +run "futex_requeue_pi $COLOR -l -t 5000"
- +run "futex_requeue_pi $COLOR -b -o -t 500000"
- +run "futex_requeue_pi $COLOR -l -t 500000"
- # with long timeout
- -./futex_requeue_pi $COLOR -b -l -t 2000000000
- -./futex_requeue_pi $COLOR -l -t 2000000000
- +run "futex_requeue_pi $COLOR -b -l -t 2000000000"
- +run "futex_requeue_pi $COLOR -l -t 2000000000"
- echo
- -./futex_requeue_pi_mismatched_ops $COLOR
- +run "futex_requeue_pi_mismatched_ops $COLOR"
- echo
- -./futex_requeue_pi_signal_restart $COLOR
- +run "futex_requeue_pi_signal_restart $COLOR"
- echo
- -./futex_wait_timeout $COLOR
- +run "futex_wait_timeout $COLOR"
- echo
- -./futex_wait_wouldblock $COLOR
- +run "futex_wait_wouldblock $COLOR"
- echo
- -./futex_wait_uninitialized_heap $COLOR
- -./futex_wait_private_mapped_file $COLOR
- +run "futex_wait_uninitialized_heap $COLOR"
- +run "futex_wait_private_mapped_file $COLOR"
- --
- 2.11.0
Add Comment
Please, Sign In to add comment