test/runtests.sh: improve alive worker detection
Just collect them, if they are there, don't complain about it. If we
still have ones after all runs are done, THEN show them.
@@ -31,9 +31,6 @@ for t in $TESTS; do
ps aux | grep "\[io_wq_manager\]" > /dev/null
R="$?"
if [ "$R" -eq 0 ]; then
- if [ -z "$MAYBE_FAILED" ]; then
- echo "Test $t has alive workers after exit?!"
- fi
MAYBE_FAILED="$MAYBE_FAILED $t"
fi
fi
@@ -43,6 +40,12 @@ if [ "${RET}" -ne 0 ]; then
echo "Tests $FAILED failed"
exit $RET
else
+ sleep 1
+ ps aux | grep "\[io_wq_manager\]" > /dev/null
+ R="$?"
+ if [ "$R" -ne 0 ]; then
+ MAYBE_FAILED=""
+ fi
if [ ! -z "$MAYBE_FAILED" ]; then
echo "Tests _maybe_ failed: $MAYBE_FAILED"
fi
