1From 5c9ad29f58246b95fd5f1940e6b03ac485cc5168 Mon Sep 17 00:00:00 2001 2From: Steve Muckle <smuckle@google.com> 3Date: Tue, 7 Nov 2017 16:01:53 -0800 4Subject: [PATCH] selftests/futex: report success/failure to environment 5 6Report whether or not any tests failed to the caller of the run.sh 7script. 8 9Bug: 31590178 10Test: run vts-kernel -m VtsKernelLinuxKselftestStaging 11Change-Id: Ie948c608e8f9df4e5fb71bf51dbcbebd905b8b22 12Signed-off-by: Steve Muckle <smuckle@google.com> 13--- 14 tools/testing/selftests/futex/functional/run.sh | 63 +++++++++++++++---------- 15 1 file changed, 37 insertions(+), 26 deletions(-) 16 17diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh 18index 7ff002eed624..ec6b279e2ccd 100755 19--- a/tools/testing/selftests/futex/functional/run.sh 20+++ b/tools/testing/selftests/futex/functional/run.sh 21@@ -22,6 +22,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@@ -34,46 +42,49 @@ 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+exit $rc 112-- 1132.16.0.rc1.238.g530d649a79-goog 114 115