diff mbox series

[1/2] tst_net.sh: tst_ping(): check for ping -I support

Message ID 20240330180818.246499-1-pvorel@suse.cz
State Accepted
Headers show
Series [1/2] tst_net.sh: tst_ping(): check for ping -I support | expand

Commit Message

Petr Vorel March 30, 2024, 6:08 p.m. UTC
tst_ping() may require ping -I support, which is not supported by
ping from inetutils.

Link: https://github.com/linux-test-project/ltp/pull/1149#issuecomment-2027947024
Reported-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/tst_net.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 6cf7f2fcb..ee0ae1cad 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -928,7 +928,10 @@  tst_ping()
 		c) ping_count="$OPTARG";;
 		s) msg_sizes="$OPTARG";;
 		p) pattern_opt="-p $OPTARG";;
-		I) src_iface="$OPTARG";;
+		I) src_iface="$OPTARG"
+		   tst_ping_opt_unsupported -I $OPTARG && \
+			   tst_brk_ TCONF "unsupported ping version (ping from inetutils?)"
+		   ;;
 		H) dst_addr="$OPTARG";;
 		*) tst_brk_ TBROK "tst_ping: unknown option: $OPTARG";;
 		esac