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.
@@ -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
