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 <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Darrick J. Wong
2017-08-29 21:40:56 -07:00
committed by Eryu Guan
parent fc3c28b307
commit a0c125b496
+4
View File
@@ -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