Skip to contentSkip to conversation

Add containers/share to PATH when call init_ltp_netspace

PATCH Superseded coolgw 1 participant 1 message Jan 6, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

coolgw

author
#0 lore raw

PATCH 1/1 Add containers/share to PATH when call init_ltp_netspace

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..

---
 testcases/lib/tst_net.sh | 3 +++
 1 file changed, 3 insertions(+)
testcases/lib/tst_net.sh +3 -0
index ceb45c98d..54c6dd1cc 100644
@@ -128,6 +128,9 @@ tst_net_require_ipv6()
 
 init_ltp_netspace()
 {
+	PATH="$PWD/../../testcases/kernel/containers/share/:$PATH"
+	tst_res TINFO "PATH='$PATH'"
+
 	local pid
 
 	if [ ! -f /var/run/netns/ltp_ns -a -z "$LTP_NETNS" ]; then
Signature · 5 lines
2.35.3


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