diff options
author | Ruediger Meier | 2016-03-02 13:48:46 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-03-03 09:25:26 +0100 |
commit | b0dc5809d7457a9bd6d687550090f68053e5ff91 (patch) | |
tree | 46781401c2969428b9773a4a3ff4a9f32e90626f /tests/ts/minix | |
parent | mkfs.minix: fix v2/v3 .badblocks inode number for big endian (diff) | |
download | kernel-qcow2-util-linux-b0dc5809d7457a9bd6d687550090f68053e5ff91.tar.gz kernel-qcow2-util-linux-b0dc5809d7457a9bd6d687550090f68053e5ff91.tar.xz kernel-qcow2-util-linux-b0dc5809d7457a9bd6d687550090f68053e5ff91.zip |
tests: fix minix tests for big endian
You may diff the new .BE files with non-BE file to see whether they
look fine.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/minix')
-rwxr-xr-x | tests/ts/minix/fsck-images | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ts/minix/fsck-images b/tests/ts/minix/fsck-images index 4cde57e88..0cfa76014 100755 --- a/tests/ts/minix/fsck-images +++ b/tests/ts/minix/fsck-images @@ -26,10 +26,15 @@ ts_check_test_command "$TS_CMD_FSCKMINIX" ts_check_test_command "$TS_HELPER_MKFS_MINIX" ts_check_test_command "$TS_CMD_HEXDUMP" +# on big endian systems some of the subtests have different expected output +BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) +BE_EXT=$(test "$BYTE_ORDER" = "BE" && echo ".BE") + export MKFS_MINIX_TEST_SECOND_SINCE_EPOCH='1438460212' check_minix_fs_type() { ts_init_subtest $1 + TS_EXPECTED+=$BE_EXT 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 @@ -57,6 +62,11 @@ check_minix_fs_type 'badblocks' "-l $bad" rm -f $bad +# no more big endian tests below +if test "$BYTE_ORDER" = "BE"; then + ts_finalize +fi + # NOTE this seems odd: a 2nd fsck run would again modify the FS ts_init_subtest "auto-fix" img=${TS_OUTPUT}.img |