public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/102: Update strict check
@ 2017-01-05  8:56 Xiao Yang
  2017-01-05  9:38 ` Eryu Guan
  0 siblings, 1 reply; 4+ messages in thread
From: Xiao Yang @ 2017-01-05  8:56 UTC (permalink / raw)
  To: eguan; +Cc: fstests, Xiao Yang

Low memory may lead to "written less bytes than
requested".  We only care about if xfs_io returned
ENOSPC or not, so we can check stderr of xfs_io
instead of stdout.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 tests/generic/102     |  5 +++--
 tests/generic/102.out | 20 --------------------
 2 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/tests/generic/102 b/tests/generic/102
index 3cdc2ba..104edc0 100755
--- a/tests/generic/102
+++ b/tests/generic/102
@@ -54,8 +54,9 @@ _scratch_mount
 for ((i = 0; i < 10; i++)); do
 	echo "loop $i" >>$seqres.full
 
-	$XFS_IO_PROG -f -c "pwrite -b 1m 0 400m" "$SCRATCH_MNT"/file | \
-_filter_xfs_io | _filter_scratch
+	out="$($XFS_IO_PROG -f -c "pwrite -b 1m 0 400m" "$SCRATCH_MNT"/file 2>&1)"
+	echo $out >>$seqres.full 2>&1
+	echo $out | grep -q "No space left on device" && echo "pwrite failed with ENOSPC"
 
 	rm -f "$SCRATCH_MNT"/file
 done
diff --git a/tests/generic/102.out b/tests/generic/102.out
index fc9275d..6fea359 100644
--- a/tests/generic/102.out
+++ b/tests/generic/102.out
@@ -1,21 +1 @@
 QA output created by 102
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 419430400/419430400 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-11  8:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05  8:56 [PATCH] generic/102: Update strict check Xiao Yang
2017-01-05  9:38 ` Eryu Guan
2017-01-11  7:49   ` Xiao Yang
2017-01-11  8:24   ` [PATCH v2] " Xiao Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox