summaryrefslogtreecommitdiffstats
path: root/tests/expected/blkdiscard
diff options
context:
space:
mode:
authorRuediger Meier2015-12-09 16:12:35 +0100
committerRuediger Meier2015-12-09 18:23:30 +0100
commit45eb5b2917c3fe76ac7047859540ba04489ddc66 (patch)
tree17108f13bed440292bb257fb8fead3d0d28a09b9 /tests/expected/blkdiscard
parentblkdiscard: don't report "zero range" at the end (diff)
downloadkernel-qcow2-util-linux-45eb5b2917c3fe76ac7047859540ba04489ddc66.tar.gz
kernel-qcow2-util-linux-45eb5b2917c3fe76ac7047859540ba04489ddc66.tar.xz
kernel-qcow2-util-linux-45eb5b2917c3fe76ac7047859540ba04489ddc66.zip
tests: blkdiscard, check return values
CC: Federico Simoncelli <fsimonce@redhat.com> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/expected/blkdiscard')
-rw-r--r--tests/expected/blkdiscard/offsets31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/expected/blkdiscard/offsets b/tests/expected/blkdiscard/offsets
index 2596fc602..aa90f2f9e 100644
--- a/tests/expected/blkdiscard/offsets
+++ b/tests/expected/blkdiscard/offsets
@@ -1,39 +1,70 @@
create loop device from image
testing offsets with full block size
Discarded 10485760 bytes from the offset 0
+ret: 0
blkdiscard: offset 1 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 511 is not aligned to sector size 512
+ret: 1
Discarded 10485248 bytes from the offset 512
+ret: 0
Discarded 10484736 bytes from the offset 1024
+ret: 0
testing offsets with specific length
Discarded 5242880 bytes from the offset 0
+ret: 0
blkdiscard: length 5242881 is not aligned to sector size 512
+ret: 1
blkdiscard: length 5243391 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 1 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 511 is not aligned to sector size 512
+ret: 1
Discarded 5242880 bytes from the offset 512
+ret: 0
Discarded 5242880 bytes from the offset 1024
+ret: 0
testing aligned steps full device
Discarded 10485760 bytes from the offset 0
+ret: 0
Discarded 10485760 bytes from the offset 0
+ret: 0
testing aligned steps with offsets and length
Discarded 1024 bytes from the offset 0
+ret: 0
blkdiscard: offset 1 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 1 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 511 is not aligned to sector size 512
+ret: 1
Discarded 1536 bytes from the offset 512
+ret: 0
Discarded 1024 bytes from the offset 1024
+ret: 0
testing misaligned steps full device
blkdiscard: length 1 is not aligned to sector size 512
+ret: 1
blkdiscard: length 256 is not aligned to sector size 512
+ret: 1
blkdiscard: length 511 is not aligned to sector size 512
+ret: 1
blkdiscard: length 513 is not aligned to sector size 512
+ret: 1
blkdiscard: length 768 is not aligned to sector size 512
+ret: 1
testing misaligned steps with offsets and length
blkdiscard: length 511 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 1 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 511 is not aligned to sector size 512
+ret: 1
blkdiscard: length 511 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 1 is not aligned to sector size 512
+ret: 1
blkdiscard: offset 511 is not aligned to sector size 512
+ret: 1
detach loop device from image