diff mbox series

[1/2] tst_test: discard the stderr output

Message ID 20210518122610.17171-1-liwang@redhat.com
State Accepted
Headers show
Series [1/2] tst_test: discard the stderr output | expand

Commit Message

Li Wang May 18, 2021, 12:26 p.m. UTC
Signed-off-by: Li Wang <liwang@redhat.com>
---

Notes:
    We can merge this before the new release.

 testcases/lib/tst_test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Cyril Hrubis May 18, 2021, 1:50 p.m. UTC | #1
Hi!
>     We can merge this before the new release.

Looks safe enough for the release.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Petr Vorel May 18, 2021, 2:35 p.m. UTC | #2
Hi Li,

thanks for the fix, merged!

Kind regards,
Petr
diff mbox series

Patch

diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index 28c2052d6..3a5651c01 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -444,13 +444,13 @@  _tst_kill_test()
 	kill -INT -$pid
 	tst_sleep 100ms
 
-	while kill -0 $pid 2>&1 > /dev/null && [ $i -gt 0 ]; do
+	while kill -0 $pid >/dev/null 2>&1 && [ $i -gt 0 ]; do
 		tst_res TINFO "Test is still running, waiting ${i}s"
 		sleep 1
 		i=$((i-1))
 	done
 
-	if kill -0 $pid 2>&1 > /dev/null; then
+	if kill -0 $pid >/dev/null 2>&1; then
 		tst_res TBROK "Test still running, sending SIGKILL"
 		kill -KILL -$pid
 	fi