* [PATCH] xfstests 213: Add enospc case to fallocate test
@ 2009-11-25 17:18 Eric Sandeen
2009-11-25 21:07 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2009-11-25 17:18 UTC (permalink / raw)
To: xfs mailing list
Add a test for ENOSPC when fallocating.
Also, add an expected output, not sure how that went missing!
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
iff --git a/213 b/213
index 3cd55f7..7d66338 100755
--- a/213
+++ b/213
@@ -61,8 +61,6 @@ _require_xfs_io_falloc
avail=`df -P $TEST_DIR | awk 'END {print $4}'`
[ "$avail" -ge 1049600 ] || _notrun "Test device is too small ($avail KiB)"
-echo Silence is golden
-
# reserve 1GiB, truncate at 100bytes
$XFS_IO_PROG -F -f -c 'falloc 0 1g' -c 'truncate 100' $TEST_DIR/ouch
rm -f $TEST_DIR/ouch
@@ -79,6 +77,14 @@ rm -f $TEST_DIR/ouch
$XFS_IO_PROG -F -f -c 'falloc 0 1g' -c 'falloc 2g 1m' -c 'truncate 3g' $TEST_DIR/ouch
rm -f $TEST_DIR/ouch
+# Try to reserve more space than we have
+echo "We should get: fallocate: No space left on device"
+echo "Strangely, xfs_io sometimes says \"Success\" when something went wrong, FYI"
+
+let toobig=$avail*2
+$XFS_IO_PROG -F -f -c "falloc 0 ${toobig}k" $TEST_DIR/ouch
+rm -f $TEST_DIR/ouch
+
# success, all done
status=0
exit
diff --git a/213.out b/213.out
new file mode 100644
index 0000000..521fca3
--- /dev/null
+++ b/213.out
@@ -0,0 +1,4 @@
+QA output created by 213
+We should get: fallocate: No space left on device
+Strangely, xfs_io sometimes says "Success" when something went wrong, FYI
+fallocate: No space left on device
diff --git a/group b/group
index b0254dd..8d055a2 100644
--- a/group
+++ b/group
@@ -322,7 +322,7 @@ prealloc
210 auto aio quick
211 auto aio quick
212 auto aio quick
-213 rw auto prealloc quick
+213 rw auto prealloc quick enospc
214 rw auto prealloc quick
215 auto metadata quick
216 log metadata auto quick
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xfstests 213: Add enospc case to fallocate test
2009-11-25 17:18 [PATCH] xfstests 213: Add enospc case to fallocate test Eric Sandeen
@ 2009-11-25 21:07 ` Christoph Hellwig
2009-11-25 21:36 ` Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2009-11-25 21:07 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs mailing list
On Wed, Nov 25, 2009 at 11:18:47AM -0600, Eric Sandeen wrote:
> Add a test for ENOSPC when fallocating.
>
> Also, add an expected output, not sure how that went missing!
Oops. Easily to do because xfstests doesn't complain but rather just
skips tests without golden output..
I guess the ENOSPC test is to catch the inverted error returns just
detected?
Anyway, looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfstests 213: Add enospc case to fallocate test
2009-11-25 21:07 ` Christoph Hellwig
@ 2009-11-25 21:36 ` Eric Sandeen
0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2009-11-25 21:36 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs mailing list
Christoph Hellwig wrote:
> On Wed, Nov 25, 2009 at 11:18:47AM -0600, Eric Sandeen wrote:
>> Add a test for ENOSPC when fallocating.
>>
>> Also, add an expected output, not sure how that went missing!
>
> Oops. Easily to do because xfstests doesn't complain but rather just
> skips tests without golden output..
>
> I guess the ENOSPC test is to catch the inverted error returns just
> detected?
yep
> Anyway, looks good,
thanks!
-eric
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-25 21:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25 17:18 [PATCH] xfstests 213: Add enospc case to fallocate test Eric Sandeen
2009-11-25 21:07 ` Christoph Hellwig
2009-11-25 21:36 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox