<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 06/03/2017 03:00 PM, Petr Vorel wrote:<br>
<blockquote type="cite"
cite="mid:20170603120022.13415-9-pvorel@suse.cz">
<pre wrap="">This function is useful when we know we broke netns (e.g. unloading
network driver).
Signed-off-by: Petr Vorel <a class="moz-txt-link-rfc2396E" href="mailto:pvorel@suse.cz"><pvorel@suse.cz></a>
---
testcases/lib/test_net.sh | 9 ++++++++-</pre>
</blockquote>
<br>
Looks like it's not the right place for this function. Is it going
to be used in tests somehow?<br>
<br>
What about adding it to network.sh with special option?<br>
<br>
<blockquote type="cite"
cite="mid:20170603120022.13415-9-pvorel@suse.cz">
<pre wrap="">
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index f93f67411..91a62f9f6 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -42,12 +42,19 @@ init_ltp_netspace()
tst_wait_ipv6_dad
}
+# Force to reset netns.
+reset_ltp_netspace()
+{
+ [ -n "$TST_USE_NETNS" ] || return
+ ip net del ltp_ns</pre>
</blockquote>
<blockquote type="cite"
cite="mid:20170603120022.13415-9-pvorel@suse.cz"> </blockquote>
<br>
With this patch<br>
3fb501e net: use LTP ns_create/ns_exec<br>
<br>
rm -f /var/run/netns/ltp_ns<br>
pkill ns_create<br>
<br>
<br>
Thanks,<br>
Alexey<br>
<br>
</body>
</html>