[Devel] [PATCH hci-8.1 v2 6/7] selftests/futex: fail run.sh when a test fails

Eva Kurchatova eva.kurchatova at virtuozzo.com
Tue Oct 27 18:51:32 MSK 2026


run.sh runs the tests one after the other and exits with the status of
the last one, so a failure in any other was reported as a pass. Exit
with a failure when any test did.

https://virtuozzo.atlassian.net/browse/VSTOR-134205
Feature: fix selftests

Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
 .../testing/selftests/futex/functional/run.sh | 66 ++++++++++---------
 1 file changed, 35 insertions(+), 31 deletions(-)

diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh
index 5470088dc4df..39e71d91bebf 100755
--- a/tools/testing/selftests/futex/functional/run.sh
+++ b/tools/testing/selftests/futex/functional/run.sh
@@ -30,61 +30,65 @@ if [ "$USE_COLOR" -eq 1 ]; then
     COLOR="-c"
 fi
 
+ret=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
+./futex_requeue_pi $COLOR || ret=1
+./futex_requeue_pi $COLOR -b || ret=1
+./futex_requeue_pi $COLOR -b -l || ret=1
+./futex_requeue_pi $COLOR -b -o || ret=1
+./futex_requeue_pi $COLOR -l || ret=1
+./futex_requeue_pi $COLOR -o || ret=1
 # 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
+./futex_requeue_pi $COLOR -b -l -t 5000 || ret=1
+./futex_requeue_pi $COLOR -l -t 5000 || ret=1
+./futex_requeue_pi $COLOR -b -l -t 500000 || ret=1
+./futex_requeue_pi $COLOR -l -t 500000 || ret=1
+./futex_requeue_pi $COLOR -b -t 5000 || ret=1
+./futex_requeue_pi $COLOR -t 5000 || ret=1
+./futex_requeue_pi $COLOR -b -t 500000 || ret=1
+./futex_requeue_pi $COLOR -t 500000 || ret=1
+./futex_requeue_pi $COLOR -b -o -t 5000 || ret=1
+./futex_requeue_pi $COLOR -l -t 5000 || ret=1
+./futex_requeue_pi $COLOR -b -o -t 500000 || ret=1
+./futex_requeue_pi $COLOR -l -t 500000 || ret=1
 # with long timeout
-./futex_requeue_pi $COLOR -b -l -t 2000000000
-./futex_requeue_pi $COLOR -l -t 2000000000
+./futex_requeue_pi $COLOR -b -l -t 2000000000 || ret=1
+./futex_requeue_pi $COLOR -l -t 2000000000 || ret=1
 
 
 echo
-./futex_requeue_pi_mismatched_ops $COLOR
+./futex_requeue_pi_mismatched_ops $COLOR || ret=1
 
 echo
-./futex_requeue_pi_signal_restart $COLOR
+./futex_requeue_pi_signal_restart $COLOR || ret=1
 
 echo
-./futex_wait_timeout $COLOR
+./futex_wait_timeout $COLOR || ret=1
 
 echo
-./futex_wait_wouldblock $COLOR
+./futex_wait_wouldblock $COLOR || ret=1
 
 echo
-./futex_wait_uninitialized_heap $COLOR
-./futex_wait_private_mapped_file $COLOR
+./futex_wait_uninitialized_heap $COLOR || ret=1
+./futex_wait_private_mapped_file $COLOR || ret=1
 
 echo
-./futex_wait $COLOR
+./futex_wait $COLOR || ret=1
 
 echo
-./futex_requeue $COLOR
+./futex_requeue $COLOR || ret=1
 
 echo
-./futex_waitv $COLOR
+./futex_waitv $COLOR || ret=1
 
 echo
-./futex_priv_hash $COLOR
+./futex_priv_hash $COLOR || ret=1
 
 echo
-./futex_numa_mpol $COLOR
+./futex_numa_mpol $COLOR || ret=1
+
+exit $ret
-- 
2.56.0



More information about the Devel mailing list