[PATCH nft 06/11] tests/shell: don't redirect error/warning messages to stderr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 tests/shell/run-tests.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index 4f0df3217b76..e4efbb2de540 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
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux