public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v3] Add containers/share to PATH when call init_ltp_netspace
@ 2023-01-06 11:31 coolgw
  2023-01-10  8:20 ` Petr Vorel
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: coolgw @ 2023-01-06 11:31 UTC (permalink / raw)
  To: ltp

When run single test case use command such as:
LTP_SHELL_API_TESTS=shell/net/tst_rhost_run.sh make test-shell
Error msg such as "ns_create: command not found" will popup, so
need update PATH before call ns_create etc..

Signed-off-by: WEI GAO <wegao@suse.com>
---
V2 -> V3: move path to test case itself 
V1 -> V2: add tst_require_cmds for init_ltp_netspace()

 lib/newlib_tests/shell/net/tst_rhost_run.sh | 2 +-
 testcases/lib/tst_net.sh                    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/newlib_tests/shell/net/tst_rhost_run.sh b/lib/newlib_tests/shell/net/tst_rhost_run.sh
index 773b8dd33..70087aa61 100755
--- a/lib/newlib_tests/shell/net/tst_rhost_run.sh
+++ b/lib/newlib_tests/shell/net/tst_rhost_run.sh
@@ -3,7 +3,7 @@
 # Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
 
 TST_TESTFUNC=do_test
-PATH="$(dirname $0)/../../../../testcases/lib/:$PATH"
+PATH="$(dirname $0)/../../../../testcases/lib/:$(dirname $0)/../../../../testcases/kernel/containers/share/:$PATH"
 
 export TST_NET_RHOST_RUN_DEBUG=1
 
diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index ceb45c98d..2849f6bc6 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -128,10 +128,11 @@ tst_net_require_ipv6()
 
 init_ltp_netspace()
 {
+
 	local pid
 
 	if [ ! -f /var/run/netns/ltp_ns -a -z "$LTP_NETNS" ]; then
-		tst_require_cmds ip
+		tst_require_cmds ip ns_create ns_exec ns_ifmove
 		tst_require_root
 
 		tst_require_drivers veth
-- 
2.35.3


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

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

end of thread, other threads:[~2023-01-26 22:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-06 11:31 [LTP] [PATCH v3] Add containers/share to PATH when call init_ltp_netspace coolgw
2023-01-10  8:20 ` Petr Vorel
2023-01-11 10:45 ` [LTP] [PATCH v4] Add PATH to tst_rhost_run.sh coolgw
2023-01-11 17:09 ` WEI GAO via ltp
2023-01-11 19:38 ` WEI GAO via ltp
2023-01-11 19:52 ` WEI GAO via ltp
2023-01-13  9:40   ` Petr Vorel
2023-01-16 11:01     ` Cyril Hrubis
2023-01-17  8:26     ` Petr Vorel
2023-01-17 15:18       ` Wei Gao via ltp
2023-01-26 22:17         ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox