public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] containers/netns/netns_sysfs.sh:load dummy module before collecting sysfs interface
@ 2015-10-30  8:57 shuang.qiu
  2015-11-04 12:49 ` Cyril Hrubis
  2015-11-06 17:16 ` Jiri Jaburek
  0 siblings, 2 replies; 10+ messages in thread
From: shuang.qiu @ 2015-10-30  8:57 UTC (permalink / raw)
  To: ltp

From: Shuang Qiu <shuang.qiu@oracle.com>

If dummy is compiled as module in kernel,it is loaded dynamically when
adding dummy device.And it will also create a default dummy interface.So
the sysfs_after will have one more interface than sysfs_before which
makes testcase #3 failed.Loading dummy module before collecting sysfs
interface to workaround such issue.
Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
---
 testcases/kernel/containers/netns/netns_sysfs.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/containers/netns/netns_sysfs.sh b/testcases/kernel/containers/netns/netns_sysfs.sh
index 7dea52b..b5791bd 100755
--- a/testcases/kernel/containers/netns/netns_sysfs.sh
+++ b/testcases/kernel/containers/netns/netns_sysfs.sh
@@ -47,6 +47,10 @@ if [ $? -eq 1 ]; then
 	tst_brkm TBROK "unable to create a new network namespace"
 fi
 TST_CLEANUP=cleanup
+
+#Load dummy module before collecting sysfs interface
+lsmod | grep dummy || modprobe dummy
+[ $? -eq 0 ] || tst_brkm TBROK "failed to load dummy module"
 ls /sys/class/net >sysfs_before
 
 ns_exec $NS_HANDLE $NS_TYPE mount --make-rprivate /sys
-- 
1.7.7


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

end of thread, other threads:[~2015-11-10  4:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-30  8:57 [LTP] [PATCH] containers/netns/netns_sysfs.sh:load dummy module before collecting sysfs interface shuang.qiu
2015-11-04 12:49 ` Cyril Hrubis
2015-11-05  4:46   ` Shuang Qiu
2015-11-05 14:05     ` Cyril Hrubis
2015-11-06 10:28       ` Shuang Qiu
2015-11-06 17:16 ` Jiri Jaburek
2015-11-09 14:14   ` Cyril Hrubis
2015-11-09 15:20     ` Jiri Jaburek
2015-11-09 15:26       ` Cyril Hrubis
2015-11-10  4:03   ` Shuang Qiu

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