mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user