All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] tst_net.sh: Add API function to check netns use
@ 2021-02-05 14:20 Petr Vorel
  2021-02-05 14:20 ` [LTP] [PATCH 2/2] if-mtu-change.sh: Lower CHANGE_INTERVAL for netns Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2021-02-05 14:20 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi Alexey,

or do we want to allow using TST_USE_NETNS?

Kind regards,
Petr

 testcases/lib/tst_net.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 1ddef2fea..d4633c509 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -131,6 +131,12 @@ init_ltp_netspace()
 	tst_restore_ipaddr rhost
 }
 
+# return 0: use ssh, 1: use netns
+tst_net_use_netns()
+{
+	[ -n "$TST_USE_NETNS" ]
+}
+
 # Run command on remote host.
 # tst_rhost_run -c CMD [-b] [-s] [-u USER]
 # Options:
-- 
2.30.0


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

end of thread, other threads:[~2021-02-09 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 14:20 [LTP] [PATCH 1/2] tst_net.sh: Add API function to check netns use Petr Vorel
2021-02-05 14:20 ` [LTP] [PATCH 2/2] if-mtu-change.sh: Lower CHANGE_INTERVAL for netns Petr Vorel
2021-02-08 12:49   ` Alexey Kodanev
2021-02-08 16:04     ` Petr Vorel
2021-02-09 12:45       ` Alexey Kodanev
2021-02-09 14:12         ` Petr Vorel

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.