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

Petr Vorel pvorel@suse.cz
Fri Jan 17 14:55:38 CET 2025


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 --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"
-- 
2.47.1



More information about the ltp mailing list