diff mbox

[v4] generic/299: various fixes

Message ID 1418619754-15620-1-git-send-email-eguan@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eryu Guan Dec. 15, 2014, 5:02 a.m. UTC
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.

Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
v4:
- use pgrep -f instead of pgrep to search for fio (Ted)

v3:
- rebase and skip the replacing fallocate/truncate part (Dave)

v2:
- remove $seqres.full before _require_fio, which writes to $seqres.full too

 tests/generic/299 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tests/generic/299 b/tests/generic/299
index e49eba9..953f1bd 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
 }