diff options
author | Karel Zak | 2015-08-03 12:31:40 +0200 |
---|---|---|
committer | Karel Zak | 2015-08-03 12:31:40 +0200 |
commit | 39c795d8b793c7dba0a2eb962c714ab7953cd677 (patch) | |
tree | 8ddbac18f59f90649f94768eaa647199e096c476 | |
parent | tests: add fsck.minix checks (diff) | |
download | kernel-qcow2-util-linux-39c795d8b793c7dba0a2eb962c714ab7953cd677.tar.gz kernel-qcow2-util-linux-39c795d8b793c7dba0a2eb962c714ab7953cd677.tar.xz kernel-qcow2-util-linux-39c795d8b793c7dba0a2eb962c714ab7953cd677.zip |
tests: fix minix test
- run the test with UID=0 only. The minix FS inode contains UID and
GID, so the final image checksum depends on user...
- always use subtest name for the images
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | tests/expected/minix/fsck-images-check-blocks | 2 | ||||
-rw-r--r-- | tests/expected/minix/fsck-images-v1c14 | 2 | ||||
-rw-r--r-- | tests/expected/minix/fsck-images-v1c30 | 2 | ||||
-rw-r--r-- | tests/expected/minix/fsck-images-v2c14 | 2 | ||||
-rw-r--r-- | tests/expected/minix/fsck-images-v2c30 | 2 | ||||
-rw-r--r-- | tests/expected/minix/fsck-images-v3c60 | 2 | ||||
-rwxr-xr-x | tests/ts/minix/fsck-images | 14 |
7 files changed, 15 insertions, 11 deletions
diff --git a/tests/expected/minix/fsck-images-check-blocks b/tests/expected/minix/fsck-images-check-blocks index c255d2b87..a5549fa8a 100644 --- a/tests/expected/minix/fsck-images-check-blocks +++ b/tests/expected/minix/fsck-images-check-blocks @@ -6,4 +6,4 @@ Maxsize=268966912 mkfs return value: 0 fsck return value: 0 -a00e2f45adc97da6ccb5aade7b129b42 +9336eb47979f61e934c3aec3434333d7 diff --git a/tests/expected/minix/fsck-images-v1c14 b/tests/expected/minix/fsck-images-v1c14 index 519fc7e3c..3db2ace35 100644 --- a/tests/expected/minix/fsck-images-v1c14 +++ b/tests/expected/minix/fsck-images-v1c14 @@ -6,4 +6,4 @@ Maxsize=268966912 mkfs return value: 0 fsck return value: 0 -9d9bf9d22274bb996938812ab01dd891 +663e1fb18fc074fc15bdb698b0fd0fda diff --git a/tests/expected/minix/fsck-images-v1c30 b/tests/expected/minix/fsck-images-v1c30 index c255d2b87..a5549fa8a 100644 --- a/tests/expected/minix/fsck-images-v1c30 +++ b/tests/expected/minix/fsck-images-v1c30 @@ -6,4 +6,4 @@ Maxsize=268966912 mkfs return value: 0 fsck return value: 0 -a00e2f45adc97da6ccb5aade7b129b42 +9336eb47979f61e934c3aec3434333d7 diff --git a/tests/expected/minix/fsck-images-v2c14 b/tests/expected/minix/fsck-images-v2c14 index 2b3a1739e..978e8ef89 100644 --- a/tests/expected/minix/fsck-images-v2c14 +++ b/tests/expected/minix/fsck-images-v2c14 @@ -6,4 +6,4 @@ Maxsize=2147483647 mkfs return value: 0 fsck return value: 0 -d836636da820de16325370caf494cdab +acfd4cae9ccfc3bc1a12d3c4a39f95c9 diff --git a/tests/expected/minix/fsck-images-v2c30 b/tests/expected/minix/fsck-images-v2c30 index 168e66a8f..b3795a5af 100644 --- a/tests/expected/minix/fsck-images-v2c30 +++ b/tests/expected/minix/fsck-images-v2c30 @@ -6,4 +6,4 @@ Maxsize=2147483647 mkfs return value: 0 fsck return value: 0 -3e5796ddbd8d08b98c29c42199685bcb +1277a1e3a3cefa6afc63a9e38e4cfdf8 diff --git a/tests/expected/minix/fsck-images-v3c60 b/tests/expected/minix/fsck-images-v3c60 index 4505dcde8..cfb9b83b5 100644 --- a/tests/expected/minix/fsck-images-v3c60 +++ b/tests/expected/minix/fsck-images-v3c60 @@ -6,4 +6,4 @@ Maxsize=2147483647 mkfs return value: 0 fsck return value: 0 -e4acad302d186a5c8788acedb7021255 +ca57b3604ed9476108ac41d1bdb1e1d5 diff --git a/tests/ts/minix/fsck-images b/tests/ts/minix/fsck-images index afd2f9b48..e0b42344b 100755 --- a/tests/ts/minix/fsck-images +++ b/tests/ts/minix/fsck-images @@ -18,6 +18,9 @@ TS_DESC="fsck images" . $TS_TOPDIR/functions.sh ts_init "$*" +# inode contains UID and GID, use always UID=0 to get the same checksum +ts_skip_nonroot + ts_check_test_command "$TS_CMD_FSCKMINIX" ts_check_test_command "$TS_HELPER_MKFS_MINIX" @@ -25,13 +28,14 @@ export MKFS_MINIX_TEST_SECOND_SINCE_EPOCH='1438460212' check_minix_fs_type() { ts_init_subtest $1 - dd if=/dev/zero bs=1024 count=16 of=$TS_OUTDIR/$1 >/dev/null 2>&1 - $TS_HELPER_MKFS_MINIX $2 $TS_OUTDIR/$1 >> $TS_OUTPUT 2>&1 + img=${TS_OUTPUT}.img + dd if=/dev/zero bs=1024 count=16 of=$img >/dev/null 2>&1 + $TS_HELPER_MKFS_MINIX $2 $img >> $TS_OUTPUT 2>&1 echo "mkfs return value: $?" >> $TS_OUTPUT - $TS_CMD_FSCKMINIX $TS_OUTDIR/$1 >> $TS_OUTPUT 2>&1 + $TS_CMD_FSCKMINIX $img >> $TS_OUTPUT 2>&1 echo "fsck return value: $?" >> $TS_OUTPUT - md5sum $TS_OUTDIR/$1 | awk '{print $1}' >> $TS_OUTPUT 2>&1 - rm -f $TS_OUTDIR/$1 + md5sum $img | awk '{print $1}' >> $TS_OUTPUT 2>&1 + rm -f $img ts_finalize_subtest } |