diff mbox series

generic/042: add sleep before shutdown

Message ID 1561593105-24164-1-git-send-email-xuyang2018.jy@cn.fujitsu.com
State New, archived
Headers show
Series generic/042: add sleep before shutdown | expand

Commit Message

Yang Xu June 26, 2019, 11:51 p.m. UTC
On some server machines, the memory was so big that we
don't have enough time to submit file.  After umoumt,
hexdump will report no such file or directory on ext4.
fail as below:
  falloc -k
  wrote 65536/65536 bytes at offset 0
 -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 +64 KiB, 16 ops; 0.0002 sec (282.805 MiB/sec and 72398.1900 ops/sec)
 +hexdump: /mnt/xfstests/scratch/042.mnt/file: No such file or directory
 +hexdump: all input file arguments failed

I think we should reserve a short time, so umount will not lose file.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
 tests/generic/042 | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series


diff --git a/tests/generic/042 b/tests/generic/042
index 6c62eb63..e1453114 100755
--- a/tests/generic/042
+++ b/tests/generic/042
@@ -56,6 +56,10 @@  _crashtest()
 	# write, run the test command and shutdown the fs
 	$XFS_IO_PROG -f -c "pwrite -S 1 0 64k" -c "$cmd 60k 4k" $file | \
+	# keep file not lose when umount even on server machine
+	sleep 10
 	./src/godown -f $mnt