1From 85c96201ca9d2e40ad8d714f07b0245bcee5ab21 Mon Sep 17 00:00:00 2001 2From: Steve Muckle <smuckle@google.com> 3Date: Tue, 7 Nov 2017 16:01:53 -0800 4Subject: [PATCH 13/24] selftests/futex: report success/failure to environment 5 6Report whether or not any tests failed to the caller of the run.sh 7script. 8 9(cherry picked from commit 5c9ad29f58246b95fd5f1940e6b03ac485cc5168) 10Bug: 31590178 11Test: run vts-kernel -m VtsKernelLinuxKselftestStaging 12Signed-off-by: Steve Muckle <smuckle@google.com> 13--- 14 .../testing/selftests/futex/functional/run.sh | 69 +++++++++++-------- 15 1 file changed, 40 insertions(+), 29 deletions(-) 16 17diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh 18index 5ccd599da6c30..6eb4a8dd86757 100755 19--- a/tools/testing/selftests/futex/functional/run.sh 20+++ b/tools/testing/selftests/futex/functional/run.sh 21@@ -18,6 +18,14 @@ 22 # 23 ############################################################################### 24 25+run_test() 26+{ 27+ $@ 28+ if [ $? -ne 0 ]; then 29+ rc=1 30+ fi 31+} 32+ 33 # Test for a color capable console 34 if [ -z "$USE_COLOR" ]; then 35 tput setf 7 || tput setaf 7 36@@ -30,55 +38,58 @@ if [ "$USE_COLOR" -eq 1 ]; then 37 COLOR="-c" 38 fi 39 40+rc=0 41 42 echo 43 # requeue pi testing 44 # without timeouts 45-./futex_requeue_pi $COLOR 46-./futex_requeue_pi $COLOR -b 47-./futex_requeue_pi $COLOR -b -l 48-./futex_requeue_pi $COLOR -b -o 49-./futex_requeue_pi $COLOR -l 50-./futex_requeue_pi $COLOR -o 51+run_test ./futex_requeue_pi $COLOR 52+run_test ./futex_requeue_pi $COLOR -b 53+run_test ./futex_requeue_pi $COLOR -b -l 54+run_test ./futex_requeue_pi $COLOR -b -o 55+run_test ./futex_requeue_pi $COLOR -l 56+run_test ./futex_requeue_pi $COLOR -o 57 # with timeouts 58-./futex_requeue_pi $COLOR -b -l -t 5000 59-./futex_requeue_pi $COLOR -l -t 5000 60-./futex_requeue_pi $COLOR -b -l -t 500000 61-./futex_requeue_pi $COLOR -l -t 500000 62-./futex_requeue_pi $COLOR -b -t 5000 63-./futex_requeue_pi $COLOR -t 5000 64-./futex_requeue_pi $COLOR -b -t 500000 65-./futex_requeue_pi $COLOR -t 500000 66-./futex_requeue_pi $COLOR -b -o -t 5000 67-./futex_requeue_pi $COLOR -l -t 5000 68-./futex_requeue_pi $COLOR -b -o -t 500000 69-./futex_requeue_pi $COLOR -l -t 500000 70+run_test ./futex_requeue_pi $COLOR -b -l -t 5000 71+run_test ./futex_requeue_pi $COLOR -l -t 5000 72+run_test ./futex_requeue_pi $COLOR -b -l -t 500000 73+run_test ./futex_requeue_pi $COLOR -l -t 500000 74+run_test ./futex_requeue_pi $COLOR -b -t 5000 75+run_test ./futex_requeue_pi $COLOR -t 5000 76+run_test ./futex_requeue_pi $COLOR -b -t 500000 77+run_test ./futex_requeue_pi $COLOR -t 500000 78+run_test ./futex_requeue_pi $COLOR -b -o -t 5000 79+run_test ./futex_requeue_pi $COLOR -l -t 5000 80+run_test ./futex_requeue_pi $COLOR -b -o -t 500000 81+run_test ./futex_requeue_pi $COLOR -l -t 500000 82 # with long timeout 83-./futex_requeue_pi $COLOR -b -l -t 2000000000 84-./futex_requeue_pi $COLOR -l -t 2000000000 85+run_test ./futex_requeue_pi $COLOR -b -l -t 2000000000 86+run_test ./futex_requeue_pi $COLOR -l -t 2000000000 87 88 89 echo 90-./futex_requeue_pi_mismatched_ops $COLOR 91+run_test ./futex_requeue_pi_mismatched_ops $COLOR 92 93 echo 94-./futex_requeue_pi_signal_restart $COLOR 95+run_test ./futex_requeue_pi_signal_restart $COLOR 96 97 echo 98-./futex_wait_timeout $COLOR 99+run_test ./futex_wait_timeout $COLOR 100 101 echo 102-./futex_wait_wouldblock $COLOR 103+run_test ./futex_wait_wouldblock $COLOR 104 105 echo 106-./futex_wait_uninitialized_heap $COLOR 107-./futex_wait_private_mapped_file $COLOR 108+run_test ./futex_wait_uninitialized_heap $COLOR 109+run_test ./futex_wait_private_mapped_file $COLOR 110 111 echo 112-./futex_wait $COLOR 113+run_test ./futex_wait $COLOR 114 115 echo 116-./futex_requeue $COLOR 117+run_test ./futex_requeue $COLOR 118 119 echo 120-./futex_waitv $COLOR 121+run_test ./futex_waitv $COLOR 122+ 123+exit $rc 124-- 1252.36.0.550.gb090851708-goog 126 127