From: Darrick J. Wong Date: Wed, 30 Aug 2017 04:40:56 +0000 (-0700) Subject: xfs/013: exit cleaner thread if fsstress dies X-Git-Tag: v2022.05.01~1898 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a0c125b49666fd10e2ad22beed8e3d820114dfd0;p=users%2Fhch%2Fxfstests-dev.git xfs/013: exit cleaner thread if fsstress dies In this test, the cleaner thread deletes the directory trees created by fsstress in order to exercise the free inode btree code. However, if fsstress dies, the cleaner can end up waiting forever for a directory that will never be created, which hangs up the test run. Therefore, abort if fsstress has ended. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Eryu Guan --- diff --git a/tests/xfs/013 b/tests/xfs/013 index 817558fb8..4e49e4bd6 100755 --- a/tests/xfs/013 +++ b/tests/xfs/013 @@ -88,6 +88,10 @@ _cleaner() while [ ! -e $need ] do sleep 3 + if ! pgrep fsstress > /dev/null 2>&1; then + echo "fsstress died?" + return + fi done rm -rf $dir/dir$i