From: Thomas Haller Date: Thu, 7 Sep 2023 22:07:18 +0000 (+0200) Subject: tests/shell: don't redirect error/warning messages to stderr X-Git-Tag: v1.0.9~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9dbd0f2e38ca7206d779c4e44e01100684aacb4e;p=thirdparty%2Fnftables.git tests/shell: don't redirect error/warning messages to stderr Writing some messages to stderr and some to stdout is not helpful. Once they are written to separate streams, it's hard to be sure about their relative order. Use grep to filter messages. Also, next we will redirect the entire output also to a file. There the output is also not split in two files. Signed-off-by: Thomas Haller Signed-off-by: Florian Westphal --- diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh index 4f0df321..e4efbb2d 100755 --- a/tests/shell/run-tests.sh +++ b/tests/shell/run-tests.sh @@ -16,9 +16,9 @@ _msg() { shift if [ "$level" = E ] ; then - printf '%s\n' "$RED$level$RESET: $*" >&2 + printf '%s\n' "$RED$level$RESET: $*" elif [ "$level" = W ] ; then - printf '%s\n' "$YELLOW$level$RESET: $*" >&2 + printf '%s\n' "$YELLOW$level$RESET: $*" else printf '%s\n' "$level: $*" fi