summaryrefslogtreecommitdiffstats
path: root/tests/ts/hexdump
diff options
context:
space:
mode:
authorStanislav Brabec2016-02-11 20:40:29 +0100
committerKarel Zak2016-02-12 10:39:14 +0100
commitb59c3bf292269be1a203f91563b961e0062e0a5f (patch)
tree10eea7c12ca0408aae5af5b799ded7d187fec8e0 /tests/ts/hexdump
parenttests: add btrfs mount tests (diff)
downloadkernel-qcow2-util-linux-b59c3bf292269be1a203f91563b961e0062e0a5f.tar.gz
kernel-qcow2-util-linux-b59c3bf292269be1a203f91563b961e0062e0a5f.tar.xz
kernel-qcow2-util-linux-b59c3bf292269be1a203f91563b961e0062e0a5f.zip
tests: fix redirection
Many tests do. 2>&1 >> $TS_OUTPUT It redirects stdout to $TS_OUTPUT and stderr to stdout. It could cause unintended ignoring of errors on strerr and false positive result of the test. Use >> $TS_OUTPUT 2>&1 instead to redirect both stdout and stderr to $TS_OUTPUT. Automatically created by: cd tests/ts sed -i 's:2>\&1 >> \$TS_OUTPUT:>> $TS_OUTPUT 2>\&1:g' $(fgrep -rl '2>&1 >> $TS_OUTPUT' .) Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'tests/ts/hexdump')
-rwxr-xr-xtests/ts/hexdump/format-strings4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ts/hexdump/format-strings b/tests/ts/hexdump/format-strings
index f3d9289c7..e6f9229a5 100755
--- a/tests/ts/hexdump/format-strings
+++ b/tests/ts/hexdump/format-strings
@@ -32,9 +32,9 @@ BE_EXT=$(test "$BYTE_ORDER" = "BE" && echo ".BE")
ts_init_subtest "empty-format"
TS_EXPECTED+=$BE_EXT
INPUT=$(printf \\1)
-$TS_CMD_HEXDUMP -n1 -ve '2 "" "%x"' <<< $INPUT 2>&1 >> $TS_OUTPUT
+$TS_CMD_HEXDUMP -n1 -ve '2 "" "%x"' <<< $INPUT >> $TS_OUTPUT 2>&1
-$TS_CMD_HEXDUMP -n1 -ve '4 "%x"' -e '2 ""' <<< $INPUT 2>&1 >> $TS_OUTPUT
+$TS_CMD_HEXDUMP -n1 -ve '4 "%x"' -e '2 ""' <<< $INPUT >> $TS_OUTPUT 2>&1
ts_finalize_subtest
#basic formats