public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] containers: fix three cases' exit status
@ 2014-11-06  5:31 Xing Gu
  2014-11-06  8:26 ` Cyril Hrubis
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Xing Gu @ 2014-11-06  5:31 UTC (permalink / raw)
  To: ltp-list

In iproute2 whose version is earlier than v2.6.39, ip
command doesn't support netns object. In this condition,
running three cases (netns_devices.sh, netns_devices2.sh
and netns_isolation.sh) will exit with TFAIL. It is not
suitable, so fix these cases' exit status with TCONF.

Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>
---
 testcases/kernel/containers/netns/netns_devices.sh   | 4 ++++
 testcases/kernel/containers/netns/netns_devices2.sh  | 4 ++++
 testcases/kernel/containers/netns/netns_isolation.sh | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/testcases/kernel/containers/netns/netns_devices.sh b/testcases/kernel/containers/netns/netns_devices.sh
index 7126267..990a74c 100755
--- a/testcases/kernel/containers/netns/netns_devices.sh
+++ b/testcases/kernel/containers/netns/netns_devices.sh
@@ -46,6 +46,10 @@ cleanup()
 # SETUP
 tst_require_root
 tst_check_cmds ip
+# check if ip command supports netns object
+ip help 2>&1 | grep -w netns &>/dev/null || \
+	tst_brkm TCONF "ip command does not support netns object"
+
 TST_CLEANUP=cleanup
 
 # creates a new network namespace "myns0" (man 8 ip-netns)
diff --git a/testcases/kernel/containers/netns/netns_devices2.sh b/testcases/kernel/containers/netns/netns_devices2.sh
index f0d0651..7e68eea 100755
--- a/testcases/kernel/containers/netns/netns_devices2.sh
+++ b/testcases/kernel/containers/netns/netns_devices2.sh
@@ -46,6 +46,10 @@ cleanup()
 # SETUP
 tst_require_root
 tst_check_cmds ip ifconfig
+# check if ip command supports netns object
+ip help 2>&1 | grep -w netns &>/dev/null || \
+	tst_brkm TCONF "ip command does not support netns object"
+
 TST_CLEANUP=cleanup
 
 # creates a new network namespace "myns0" (man 8 ip-netns)
diff --git a/testcases/kernel/containers/netns/netns_isolation.sh b/testcases/kernel/containers/netns/netns_isolation.sh
index f1ddf2c..127b07f 100755
--- a/testcases/kernel/containers/netns/netns_isolation.sh
+++ b/testcases/kernel/containers/netns/netns_isolation.sh
@@ -40,6 +40,10 @@ cleanup()
 # SETUP
 tst_require_root
 tst_check_cmds ip
+# check if ip command supports netns object
+ip help 2>&1 | grep -w netns &>/dev/null || \
+	tst_brkm TCONF "ip command does not support netns object"
+
 TST_CLEANUP=cleanup
 
 
-- 
1.9.3


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-12-17 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06  5:31 [LTP] [PATCH] containers: fix three cases' exit status Xing Gu
2014-11-06  8:26 ` Cyril Hrubis
2014-11-11  6:38 ` [LTP] [PATCH v2] " Xing Gu
2014-11-11 13:02   ` Cyril Hrubis
2014-12-05  8:26 ` [LTP] [PATCH v3] " Xing Gu
2014-12-17 14:35   ` Cyril Hrubis

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