From: Eryu Guan Date: Mon, 15 Dec 2014 23:49:57 +0000 (+1100) Subject: generic/299: make sure fio really exits X-Git-Tag: v2022.05.01~2990 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f5b137bd8b3eb992cc2daf883bfe1e34b743ddb8;p=xfstests-dev.git generic/299: make sure fio really exits Fix two problems in generic/299 1. Remove $seqres.full before test, otherwise the file is growing all the time. 2. Make sure fio really exits, otherwise fio would block umount. $pid is the pid of function run_check not fio, sometimes fio is still there when $pid is dead and blocking umount. Signed-off-by: Eryu Guan Reviewed-by: Theodore Ts'o Signed-off-by: Dave Chinner --- diff --git a/tests/generic/299 b/tests/generic/299 index e49eba90..953f1bd8 100755 --- a/tests/generic/299 +++ b/tests/generic/299 @@ -109,6 +109,8 @@ rw=randrw filename=buffered-aio-verifier EOF +rm -f $seqres.full + _require_fio $fio_config _require_xfs_io_command "falloc" @@ -136,7 +138,7 @@ _workout() done # Following like will check that pid is still run. # Once fio exit we can stop fallocate/truncate loop - kill -0 $pid > /dev/null 2>&1 || break + pgrep -f "$FIO_PROG" > /dev/null 2>&1 || break done wait $pid }