xfs/013: exit cleaner thread if fsstress dies
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 30 Aug 2017 04:40:56 +0000 (21:40 -0700)
committerEryu Guan <eguan@redhat.com>
Sun, 3 Sep 2017 04:19:26 +0000 (12:19 +0800)
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 <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/xfs/013

index 817558fb8820bf3f6b48b91bfe75432b6adc7ccc..4e49e4bd62c89848f620c1b45dc8ad5180304d6f 100755 (executable)
@@ -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