All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] tst_net.sh: Avoid using tst_require_drivers in legacy API
@ 2025-05-07 11:33 Petr Vorel
  2025-05-07 11:40 ` Ricardo B. Marlière via ltp
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2025-05-07 11:33 UTC (permalink / raw)
  To: ltp; +Cc: Ricardo B. Marlière

tst_require_drivers is only in new shell API. Avoid using it in the old API.

Reported-by: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
NOTE: there are still 9 remaining tests in the old API, e.g.
ftp-upload-stress.sh. But instead of converting them it'd be better to
spend time to reimplement the testcase:
https://github.com/linux-test-project/ltp/issues/1207

I'm not sure about usability of multicast tests (but converting them to
new shell API should be easy).

$ git grep -l TST_USE_LEGACY_API testcases/network/
testcases/network/multicast/mc_cmds/mc_cmds.sh
testcases/network/multicast/mc_commo/mc_commo.sh
testcases/network/multicast/mc_member/mc_member.sh
testcases/network/multicast/mc_opts/mc_opts.sh
testcases/network/stress/dns/dns-stress.sh
testcases/network/stress/ftp/ftp-download-stress.sh
testcases/network/stress/ftp/ftp-upload-stress.sh
testcases/network/stress/http/http-stress.sh
testcases/network/tcp_cmds/tcpdump/tcpdump01.sh

 testcases/lib/tst_net.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 9a8b8d7214..6c2278313c 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -175,7 +175,9 @@ init_ltp_netspace()
 		tst_require_cmds ip tst_ns_create tst_ns_exec tst_ns_ifmove
 		tst_require_root
 
-		tst_require_drivers veth
+		if [ -z "$TST_USE_LEGACY_API" ]; then
+			tst_require_drivers veth
+		fi
 		ROD ip link add name ltp_ns_veth1 type veth peer name ltp_ns_veth2
 		pid="$(ROD tst_ns_create net,mnt)"
 		mkdir -p /var/run/netns
-- 
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-07 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 11:33 [LTP] [PATCH] tst_net.sh: Avoid using tst_require_drivers in legacy API Petr Vorel
2025-05-07 11:40 ` Ricardo B. Marlière via ltp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.