diff mbox series

[1/2] tst_net.sh: print test link type instead of $RHOST

Message ID 20250117135539.773036-1-pvorel@suse.cz
State Accepted
Headers show
Series [1/2] tst_net.sh: print test link type instead of $RHOST | expand

Commit Message

Petr Vorel Jan. 17, 2025, 1:55 p.m. UTC
When message was added back in 18739ff06e, both rsh and ssh used $RHOST.
Later, when 5f8ca6cf04 network namespaces support (TST_USE_NETNS=1) was
added it would have been better to print test link type (rsh/ssh/netns
at the time). Do it now.

NOTE: more debug info can be printed with TST_NET_RHOST_RUN_DEBUG=1
therefore no need to add more info about the connection here.

Fixes: 5f8ca6cf04 ("network: test_net.sh: allow to run network tests on a single machine")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/tst_net.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index ee0ae1cad7..9a8b8d7214 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -263,7 +263,7 @@  tst_rhost_run()
 	if [ $ret -eq 1 ]; then
 		output=$(echo "$output" | sed 's/RTERR//')
 		[ "$safe" ] && \
-			tst_brk_ TBROK "'$cmd' failed on '$RHOST': '$output'"
+			tst_brk_ TBROK "'$cmd' failed on $use: '$output'"
 	fi
 
 	[ -z "$out" -a -n "$output" ] && echo "$output"