]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell: don't redirect error/warning messages to stderr
authorThomas Haller <thaller@redhat.com>
Thu, 7 Sep 2023 22:07:18 +0000 (00:07 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 8 Sep 2023 09:50:41 +0000 (11:50 +0200)
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 <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/run-tests.sh

index 4f0df3217b76ce8d985e71d982432beb93fb219c..e4efbb2de5405dd6f89dbcd52da91ce14a73f492 100755 (executable)
@@ -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