containers/netns/netns_sysfs.sh:load dummy module before collecting sysfs interface
PATCH v2 1/1 containers/netns/netns_sysfs.sh:load dummy module before collecting sysfs interface
From: Shuang Qiu <[email protected]>
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 <[email protected]>
--- testcases/kernel/containers/netns/netns_sysfs.sh | 3 +++ 1 file changed, 3 insertions(+)
testcases/kernel/containers/netns/netns_sysfs.sh +3 -0
@@ -47,6 +47,9 @@ 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 2>/dev/null ls /sys/class/net >sysfs_before ns_exec $NS_HANDLE $NS_TYPE mount --make-rprivate /sys
Signature · 1 line
1.7.9.5
PATCH v2 1/1 containers/netns/netns_sysfs.sh:load dummy module before collecting sysfs interface
Hi!
I've pushed the version from Jiri, that filters dummy modules.
Thanks for the patch anyway.
Signature · 2 lines
Cyril Hrubis [email protected]