Message ID | 1418359401-8240-1-git-send-email-eguan@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Dec 12, 2014 at 12:43:21PM +0800, Eryu Guan wrote: > @@ -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 fio > /dev/null 2>&1 || break > done > wait $pid This patch is causing generic/299 to loop forever for me. The problem is that "fio" is too easy to match: root@kvm-xfstests:~# pgrep fio 1407 root@kvm-xfstests:~# ps augxww | grep 1407 root 1407 0.0 0.0 0 0 ? S< 16:52 0:00 [dm_bufio_cache] root 8386 0.0 0.0 2704 492 ttyS1 S+ 17:06 0:00 grep 1407 I'm currently a testing a patch which uses "pgrep -f $XFS_IO_PROG" instead, but I'm a bit surprised no once else noticed this, I guess people aren't building their xfstests test kernels with DM_SNAPSHOP or DM_VERITY configured (either of which will seleect DM_BUFIO)? - Ted -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/tests/generic/299 b/tests/generic/299 index e49eba9..e5de45b 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 fio > /dev/null 2>&1 || break done wait $pid }
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 <eguan@redhat.com> --- v3: - rebase and skip the replacing fallocate/truncate part v2: - remove $seqres.full before _require_fio, which writes to $seqres.full too tests/generic/299 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)