]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: simplify and update swaplabel test
authorKarel Zak <kzak@redhat.com>
Mon, 10 Nov 2014 10:46:46 +0000 (11:46 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Nov 2014 10:46:46 +0000 (11:46 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/misc/swaplabel
tests/ts/misc/swaplabel

index fd442afbeffed320d46dceb62f52fdf9cf3bdb15..17c9a6f277d7ae7d656718c93f84c187d49b62e6 100644 (file)
@@ -1,6 +1,6 @@
-mkswap: error: swap area needs to be at least 10 pages
+mkswap: error: swap area needs to be at least 40 KiB
 mkswap: Label was truncated.
-Setting up swapspace version 1, size = 9 pages
+Setting up swapspace version 1, size = 36 KiB (36864 bytes)
 LABEL=1234567890abcde, UUID=12345678-abcd-abcd-abcd-1234567890ab
 LABEL: 1234567890abcde
 UUID:  12345678-abcd-abcd-abcd-1234567890ab
index 052ee18fbf556d885282587763d26c38840cceb6..45f3bb9e27084ed851aac6f3ab176953e1036a49 100755 (executable)
@@ -41,18 +41,14 @@ fallocate_or_skip $(( $MIN_SWAP_SIZE - 1 )) $IMAGE
 $TS_CMD_MKSWAP \
        --label 1234567890abcdef \
        --uuid 12345678-abcd-abcd-abcd-1234567890ab \
-       $IMAGE 2>&1 |\
-       sed "s/ $MIN_SWAP_SIZE_KB KiB/ 10 pages/" \
-       >> $TS_OUTPUT 2>&1
+       $IMAGE >> $TS_OUTPUT 2>&1
 
 rm -f $IMAGE
 fallocate_or_skip $MIN_SWAP_SIZE $IMAGE
 $TS_CMD_MKSWAP \
        --label 1234567890abcdef \
        --uuid 12345678-abcd-abcd-abcd-1234567890ab \
-       $IMAGE 2>&1 |\
-       sed "s/ $(( $MIN_SWAP_SIZE_KB - $PAGE_SIZE_KB )) KiB/ 9 pages/" \
-       >> $TS_OUTPUT 2>&1
+       $IMAGE >> $TS_OUTPUT 2>&1
 $TS_CMD_SWAPLABEL $IMAGE >> $TS_OUTPUT 2>&1
 
 #rm -f $IMAGE