diff options
author | Ruediger Meier | 2014-05-13 13:19:22 +0200 |
---|---|---|
committer | Ruediger Meier | 2014-05-13 20:11:12 +0200 |
commit | 659203f2d85c347a6859d5c31416554d01c04399 (patch) | |
tree | 7ee60d68f6adf865d09dce0001fea62108b47b63 /tests/ts/hexdump/format-strings | |
parent | tests, add missing output for hexdump (diff) | |
download | kernel-qcow2-util-linux-659203f2d85c347a6859d5c31416554d01c04399.tar.gz kernel-qcow2-util-linux-659203f2d85c347a6859d5c31416554d01c04399.tar.xz kernel-qcow2-util-linux-659203f2d85c347a6859d5c31416554d01c04399.zip |
tests: fix hexdump for big endian
For now endianess dependent subtests have undefined output on
BE systems until sombody re-checks this and provides expected
output files with .BE suffix.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/hexdump/format-strings')
-rwxr-xr-x | tests/ts/hexdump/format-strings | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ts/hexdump/format-strings b/tests/ts/hexdump/format-strings index 229e6513f..f3d9289c7 100755 --- a/tests/ts/hexdump/format-strings +++ b/tests/ts/hexdump/format-strings @@ -24,8 +24,13 @@ ts_init "$*" 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") + #885314 ts_init_subtest "empty-format" +TS_EXPECTED+=$BE_EXT INPUT=$(printf \\1) $TS_CMD_HEXDUMP -n1 -ve '2 "" "%x"' <<< $INPUT 2>&1 >> $TS_OUTPUT @@ -46,14 +51,17 @@ $TS_CMD_HEXDUMP -C $FILES/ascii.in &> $TS_OUTPUT ts_finalize_subtest ts_init_subtest "2b_dec" +TS_EXPECTED+=$BE_EXT $TS_CMD_HEXDUMP -d $FILES/ascii.in &> $TS_OUTPUT ts_finalize_subtest ts_init_subtest "2b_octal" +TS_EXPECTED+=$BE_EXT $TS_CMD_HEXDUMP -o $FILES/ascii.in &> $TS_OUTPUT ts_finalize_subtest ts_init_subtest "2b_hex" +TS_EXPECTED+=$BE_EXT $TS_CMD_HEXDUMP -x $FILES/ascii.in &> $TS_OUTPUT ts_finalize_subtest |