From: Karel Zak Date: Mon, 10 Nov 2014 10:46:46 +0000 (+0100) Subject: tests: simplify and update swaplabel test X-Git-Tag: v2.26-rc1~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4d27255f24cddbdf3480ca0988dada340abe2d3;p=thirdparty%2Futil-linux.git tests: simplify and update swaplabel test Signed-off-by: Karel Zak --- diff --git a/tests/expected/misc/swaplabel b/tests/expected/misc/swaplabel index fd442afbef..17c9a6f277 100644 --- a/tests/expected/misc/swaplabel +++ b/tests/expected/misc/swaplabel @@ -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 diff --git a/tests/ts/misc/swaplabel b/tests/ts/misc/swaplabel index 052ee18fbf..45f3bb9e27 100755 --- a/tests/ts/misc/swaplabel +++ b/tests/ts/misc/swaplabel @@ -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