summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxu,huilong <huilongx.xu@intel.com>2017-01-09 16:09:55 +0800
committerMarvin Liu <yong.liu@intel.com>2017-01-11 15:57:58 +0800
commitc59631d84b87a9f79b304bf5f317fc935a5943c4 (patch)
treeacf26c3dd9d7332a41bd193a4611480927eb27ea
parentecbcf338b3b2f6ba4cfd1b92e0ff3ddf7a19f72d (diff)
tests kni: fix ifconfig and ping issue on some OS
Change list: 1. Set virtual interface down before ifconfig case. This is becaused of virtual interface maybe up when is created. 2. Remove ipv6 address check. When virtual interface create, ipv6 address won't be ready on some OSs. 3. Remove ping selves virtual interface. Some OSs may not support this test, eg RHEL. Signed-off-by: xu,huilong <huilongx.xu@intel.com>
-rw-r--r--tests/TestSuite_kni.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 3836c57..f88a7a5 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -469,17 +469,14 @@ class TestKni(TestCase):
for port in self.config['ports']:
virtual_interface = self.virtual_interface_name(port)
- # Set up
+ # some time, the virtual interface stats is up when it create
+ # so should set down before set up.
+ self.dut.send_expect(
+ "ifconfig %s down" % virtual_interface, "# ")
out = self.dut.send_expect(
"ifconfig %s up" % virtual_interface, "# ")
self.verify("Configure network interface of %d up" %
port in out, "ifconfig up not supported")
-
- out = self.dut.send_expect(
- "ip -family inet6 address show dev %s" % virtual_interface, "# ")
- self.verify(
- "inet6 " in out, "ifconfig up the port_virtual_interaces not support")
-
# Add an IPv6 address
out = self.dut.send_expect(
"ifconfig %s add fe80::%d" % (virtual_interface, port + 1), "# ")
@@ -549,11 +546,6 @@ class TestKni(TestCase):
virtual_interface = self.virtual_interface_name(port)
out = self.dut.send_expect(
- "ping -w 2 -I %s 192.168.%d.1" % (virtual_interface, port), "# ", 10)
- self.verify("64 bytes from 192.168.%d.1:" %
- port in out, "ping not supported")
-
- out = self.dut.send_expect(
"ping -w 2 -I %s 192.168.%d.2" % (virtual_interface, port), "# ", 10)
self.verify("64 bytes from 192.168.%d.2:" %
port in out, "ping not supported")