summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-10-24 13:42:33 -0600
committerJens Axboe <axboe@kernel.dk>2019-10-24 13:46:55 -0600
commit675ee6ac622ac4a5060db8f09f1b58a1d830b701 (patch)
treeeba3355b00b0ae950a367a4ea92dec0f63e2cec8
parent6cca9e574c931139556a5da336356fbd0cf90af2 (diff)
downloadliburing-675ee6ac622ac4a5060db8f09f1b58a1d830b701.tar.gz
liburing-675ee6ac622ac4a5060db8f09f1b58a1d830b701.tar.bz2
test/runtests.sh: check for remaining io_uring workers on exit
That usually indicates a hang issue where we don't properly exit. Log is as _maybe_ failed. Note that if you see maybe failed, then the last in the list is likely the culprit. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rwxr-xr-xtest/runtests.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/runtests.sh b/test/runtests.sh
index 9ca4654..5b2ee27 100755
--- a/test/runtests.sh
+++ b/test/runtests.sh
@@ -5,6 +5,7 @@ RET=0
TIMEOUT=30
FAILED=""
+MAYBE_FAILED=""
do_kmsg="yes"
if ! [ $(id -u) = 0 ]; then
@@ -25,6 +26,14 @@ for t in $TESTS; do
echo "Test $t failed with ret ${r}"
FAILED="$FAILED $t"
RET=1
+ else
+ sleep .1
+ ps aux | grep "\[io_wq_manager\]" > /dev/null
+ R="$?"
+ if [ "$R" -eq 0 ]; then
+ echo "Test $t has alive workers?!"
+ MAYBE_FAILED="$MAYBE_FAILED $t"
+ fi
fi
done
@@ -32,6 +41,9 @@ if [ "${RET}" -ne 0 ]; then
echo "Tests $FAILED failed"
exit $RET
else
+ if [ ! -z "$MAYBE_FAILED" ]; then
+ echo "Tests _maybe_ failed: $MAYBE_FAILED"
+ fi
echo "All tests passed"
exit 0
fi