127 lines
3.7 KiB
Diff
127 lines
3.7 KiB
Diff
From 85c96201ca9d2e40ad8d714f07b0245bcee5ab21 Mon Sep 17 00:00:00 2001
|
|
From: Steve Muckle <smuckle@google.com>
|
|
Date: Tue, 7 Nov 2017 16:01:53 -0800
|
|
Subject: [PATCH 13/24] selftests/futex: report success/failure to environment
|
|
|
|
Report whether or not any tests failed to the caller of the run.sh
|
|
script.
|
|
|
|
(cherry picked from commit 5c9ad29f58246b95fd5f1940e6b03ac485cc5168)
|
|
Bug: 31590178
|
|
Test: run vts-kernel -m VtsKernelLinuxKselftestStaging
|
|
Signed-off-by: Steve Muckle <smuckle@google.com>
|
|
---
|
|
.../testing/selftests/futex/functional/run.sh | 69 +++++++++++--------
|
|
1 file changed, 40 insertions(+), 29 deletions(-)
|
|
|
|
diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh
|
|
index 5ccd599da6c30..6eb4a8dd86757 100755
|
|
--- a/tools/testing/selftests/futex/functional/run.sh
|
|
+++ b/tools/testing/selftests/futex/functional/run.sh
|
|
@@ -18,6 +18,14 @@
|
|
#
|
|
###############################################################################
|
|
|
|
+run_test()
|
|
+{
|
|
+ $@
|
|
+ if [ $? -ne 0 ]; then
|
|
+ rc=1
|
|
+ fi
|
|
+}
|
|
+
|
|
# Test for a color capable console
|
|
if [ -z "$USE_COLOR" ]; then
|
|
tput setf 7 || tput setaf 7
|
|
@@ -30,55 +38,58 @@ if [ "$USE_COLOR" -eq 1 ]; then
|
|
COLOR="-c"
|
|
fi
|
|
|
|
+rc=0
|
|
|
|
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_test ./futex_requeue_pi $COLOR
|
|
+run_test ./futex_requeue_pi $COLOR -b
|
|
+run_test ./futex_requeue_pi $COLOR -b -l
|
|
+run_test ./futex_requeue_pi $COLOR -b -o
|
|
+run_test ./futex_requeue_pi $COLOR -l
|
|
+run_test ./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_test ./futex_requeue_pi $COLOR -b -l -t 5000
|
|
+run_test ./futex_requeue_pi $COLOR -l -t 5000
|
|
+run_test ./futex_requeue_pi $COLOR -b -l -t 500000
|
|
+run_test ./futex_requeue_pi $COLOR -l -t 500000
|
|
+run_test ./futex_requeue_pi $COLOR -b -t 5000
|
|
+run_test ./futex_requeue_pi $COLOR -t 5000
|
|
+run_test ./futex_requeue_pi $COLOR -b -t 500000
|
|
+run_test ./futex_requeue_pi $COLOR -t 500000
|
|
+run_test ./futex_requeue_pi $COLOR -b -o -t 5000
|
|
+run_test ./futex_requeue_pi $COLOR -l -t 5000
|
|
+run_test ./futex_requeue_pi $COLOR -b -o -t 500000
|
|
+run_test ./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_test ./futex_requeue_pi $COLOR -b -l -t 2000000000
|
|
+run_test ./futex_requeue_pi $COLOR -l -t 2000000000
|
|
|
|
|
|
echo
|
|
-./futex_requeue_pi_mismatched_ops $COLOR
|
|
+run_test ./futex_requeue_pi_mismatched_ops $COLOR
|
|
|
|
echo
|
|
-./futex_requeue_pi_signal_restart $COLOR
|
|
+run_test ./futex_requeue_pi_signal_restart $COLOR
|
|
|
|
echo
|
|
-./futex_wait_timeout $COLOR
|
|
+run_test ./futex_wait_timeout $COLOR
|
|
|
|
echo
|
|
-./futex_wait_wouldblock $COLOR
|
|
+run_test ./futex_wait_wouldblock $COLOR
|
|
|
|
echo
|
|
-./futex_wait_uninitialized_heap $COLOR
|
|
-./futex_wait_private_mapped_file $COLOR
|
|
+run_test ./futex_wait_uninitialized_heap $COLOR
|
|
+run_test ./futex_wait_private_mapped_file $COLOR
|
|
|
|
echo
|
|
-./futex_wait $COLOR
|
|
+run_test ./futex_wait $COLOR
|
|
|
|
echo
|
|
-./futex_requeue $COLOR
|
|
+run_test ./futex_requeue $COLOR
|
|
|
|
echo
|
|
-./futex_waitv $COLOR
|
|
+run_test ./futex_waitv $COLOR
|
|
+
|
|
+exit $rc
|
|
--
|
|
2.36.0.550.gb090851708-goog
|
|
|