]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: make swaplabel test more robust
authorKarel Zak <kzak@redhat.com>
Tue, 26 Jan 2016 15:49:39 +0000 (16:49 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 26 Jan 2016 15:49:39 +0000 (16:49 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/misc/swaplabel
tests/ts/misc/swaplabel

index 13abc0bf8acc9999d3ef2e4d221c6c440c81aada..172f876afa7e383b4e51bdfd32d7d76d2d447c93 100644 (file)
@@ -1,5 +1,5 @@
 mkswap: error: swap area needs to be at least 10 pages
-mkswap: <swapfile>: insecure permissions 0644, 0600 suggested.
+mkswap: <swapfile>: insecure permissions <perm>, 0600 suggested.
 mkswap: Label was truncated.
 Setting up swapspace version 1, size = 9 pages (9xPGSZ bytes)
 LABEL=1234567890abcde, UUID=12345678-abcd-abcd-abcd-1234567890ab
index 5653742aa241792071f5c1afbdce7a711753e486..64630450873b80b18f44cc91cf3d540ee2d93820 100755 (executable)
@@ -44,6 +44,7 @@ $TS_CMD_MKSWAP \
        $IMAGE 2>&1 |\
        sed -e "s/ $MIN_SWAP_SIZE_KB KiB/ 10 pages/" \
            -e "s:$IMAGE:<swapfile>:g" \
+           -e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
        >> $TS_OUTPUT 2>&1
 
 rm -f $IMAGE
@@ -55,6 +56,7 @@ $TS_CMD_MKSWAP \
        sed -e "s/ $(( $MIN_SWAP_SIZE_KB - $PAGE_SIZE_KB )) KiB/ 9 pages/" \
            -e "s/($(( $MIN_SWAP_SIZE - $PAGE_SIZE )) bytes)/(9xPGSZ bytes)/" \
            -e "s:$IMAGE:<swapfile>:g" \
+           -e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
        >> $TS_OUTPUT 2>&1
 $TS_CMD_SWAPLABEL $IMAGE >> $TS_OUTPUT 2>&1