Skip to contentSkip to conversation

xfstests: restrict 259 device sizes to multiples of 512

PATCH New Eric Sandeen 4 participants 5 messages Oct 6, 2013 – Oct 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: restrict 259 device sizes to multiples of 512

Test 259 tries to make a loop device size which is 1 byte less than 4T; losetup now warns that this makes little sense, and the warning breaks the test output:

+losetup: /mnt/test/259.image: warning: file does not fit into a 512-byte sector the end of the file will be ignored.

The RH QE testcase did originally use loopback, so did not test anything other than 512 boundaries.

Just drop the 1-byte-shy case, because it produces a device exactly the same size as the 512-bytes-shy case.

(FWIW, this is a regression test for the bug that
d943b11 mkfs: get size of device properly
fixed.)

---

tests/xfs/259 +1 -1
index 59eeaca..9c12ccf 100755
@@ -48,7 +48,7 @@ testfile=$TEST_DIR/259.image
 
 # Test various sizes slightly less than 4 TB
 four_TB=$(_math "2^42")
-for del in 1 512 1024 1025 2048 4096; do
+for del in 512 1024 1025 2048 4096; do
 	ddseek=$(_math "$four_TB - $del")
 	echo "Trying to make (4 TB - $del) B long xfs fs image"
 	rm -f "$testfile"

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw

PATCH v2 1/1 xfstests: restrict 259 device sizes to multiples of 512

Test 259 tries to make a loop device size which is 1 byte less than 4T; losetup now warns that this makes little sense, and the warning breaks the test output:

+losetup: /mnt/test/259.image: warning: file does not fit into a 512-byte sector the end of the file will be ignored.

The RH QE testcase did originally use loopback, so did not in effect test anything other than 512-multiple boundaries.

Just drop the non-512-byte-multiple cases, they produce devices exactly the same size as their 512-byte-multiple neighbors.

(FWIW, this is a regression test for the bug that
d943b11 mkfs: get size of device properly
fixed.)

---

V2, sorry, sent wrong version that still had a 1025 "del" value.

tests/xfs/259 +1 -1
index 59eeaca..9c12ccf 100755
@@ -48,7 +48,7 @@ testfile=$TEST_DIR/259.image
 
 # Test various sizes slightly less than 4 TB
 four_TB=$(_math "2^42")
-for del in 1 512 1024 2048 4096; do
+for del in 512 1024 1025 2048 4096; do
 	ddseek=$(_math "$four_TB - $del")
 	echo "Trying to make (4 TB - $del) B long xfs fs image"
 	rm -f "$testfile"

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw

PATCH v3 1/1 xfstests: restrict 259 device sizes to multiples of 512

Test 259 tries to make a loop device size which is 1 byte less than 4T; losetup now warns that this makes little sense, and the warning breaks the test output:

+losetup: /mnt/test/259.image: warning: file does not fit into a 512-byte sector the end of the file will be ignored.

The RH QE testcase did originally use loopback, so did not in effect test anything other than 512-multiple boundaries.

Just drop the non-512-byte-multiple cases, they produce devices exactly the same size as their 512-byte-multiple neighbors.

(FWIW, this is a regression test for the bug that
d943b11 mkfs: get size of device properly
fixed.)

---

V2, sorry, sent wrong version that still had a 1025 "del" value.

V3, .out file too, cripes. No more saturday night patches, sorry.

tests/xfs/259 +1 -1
index 59eeaca..b8bd69a 100755
@@ -48,7 +48,7 @@ testfile=$TEST_DIR/259.image
 
 # Test various sizes slightly less than 4 TB
 four_TB=$(_math "2^42")
-for del in 1 512 1024 1025 2048 4096; do
+for del in 512 1024 2048 4096; do
 	ddseek=$(_math "$four_TB - $del")
 	echo "Trying to make (4 TB - $del) B long xfs fs image"
 	rm -f "$testfile"
tests/xfs/259.out +0 -2
index 263bb1b..6e0be9a 100644
@@ -1,7 +1,5 @@
 QA output created by 259
-Trying to make (4 TB - 1) B long xfs fs image
 Trying to make (4 TB - 512) B long xfs fs image
 Trying to make (4 TB - 1024) B long xfs fs image
-Trying to make (4 TB - 1025) B long xfs fs image
 Trying to make (4 TB - 2048) B long xfs fs image
 Trying to make (4 TB - 4096) B long xfs fs image

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v3 1/1
#3 lore raw
Quoted 13 lines · Eric Sandeen

Test 259 tries to make a loop device size which is 1 byte less than 4T; losetup now warns that this makes little sense, and the warning breaks the test output:

+losetup: /mnt/test/259.image: warning: file does not fit into a 512-byte sector the end of the file will be ignored.

The RH QE testcase did originally use loopback, so did not in effect test anything other than 512-multiple boundaries.

Just drop the non-512-byte-multiple cases, they produce devices exactly the same size as their 512-byte-multiple neighbors.

Quoted 5 lines

(FWIW, this is a regression test for the bug that
d943b11 mkfs: get size of device properly
fixed.)

Looks good.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs