From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 0A81D8E94 for ; Tue, 3 Nov 2015 06:04:46 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 02 Nov 2015 21:04:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,237,1444719600"; d="scan'208";a="677147218" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 02 Nov 2015 21:04:46 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 2 Nov 2015 21:04:45 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 2 Nov 2015 21:04:45 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.199]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.100]) with mapi id 14.03.0248.002; Tue, 3 Nov 2015 13:04:43 +0800 From: "Tu, LijuanX A" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [patch] fix kni (ifconfig/ethtool/tcpdump) test_case failed Thread-Index: AQHRFeq27PqI46juM0qMWpHwsrbIpJ6JvCvA Date: Tue, 3 Nov 2015 05:04:43 +0000 Message-ID: <38D041F150D4184C8114E499040E6234072388E5@shsmsx102.ccr.corp.intel.com> References: <1446520664-7657-1-git-send-email-lijuanx.a.tu@intel.com> <56382F37.1010203@intel.com> In-Reply-To: <56382F37.1010203@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [patch] fix kni (ifconfig/ethtool/tcpdump) test_case failed X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 05:04:47 -0000 1, change some verify strings, because the old strings not in the output 2, add restart kni before test_tcpdump test ,because after test_stress ,the= kni status is not right. 3, config netmask when test_ping 4, give more time to exe cmd=20 -----Original Message----- From: Liu, Yong=20 Sent: Tuesday, November 03, 2015 11:51 AM To: Tu, LijuanX A; dts@dpdk.org Subject: Re: [dts] [patch] fix kni (ifconfig/ethtool/tcpdump) test_case fai= led Hi Lijuan, Could add some comment logs for explain which issues you have been fixed in= the patch? On 11/03/2015 11:17 AM, Lijuan Tu wrote: > From: lijuan tu > > Signed-off-by: lijuan tu > --- > tests/TestSuite_kni.py | 43 +++++++++++++++++++++++++------------------ > 1 file changed, 25 insertions(+), 18 deletions(-) > > diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index=20 > 14c100b..10e922f 100644 > --- a/tests/TestSuite_kni.py > +++ b/tests/TestSuite_kni.py > @@ -220,15 +220,15 @@ stress_modes_output =3D [{'lo_mode': None, 'kthread= _mode': None, > {'lo_mode': None, 'kthread_mode': 'multiple', > 'output': 'loopback disabled.*DPDK kni module l= oaded.*Multiple kernel thread'}, > {'lo_mode': None, 'kthread_mode': 'singlemulti', > - 'output': 'KNI: Error: Invalid parameter for kth= read_mode'}, > + 'output': 'KNI.* Invalid parameter for=20 > + kthread_mode'}, > {'lo_mode': 'lo_mode_fifo', 'kthread_mode': 'mul= tiple', > 'output': 'loopback mode=3Dlo_mode_fifo enabled= .*Multiple kernel thread'}, > {'lo_mode': 'lo_mode_fifo_skb', 'kthread_mode': = 'multiple', > 'output': 'loopback mode=3Dlo_mode_fifo_skb ena= bled.*Multiple kernel thread'}, > {'lo_mode': 'lo_mode_fifo_skb', 'kthread_mode': = 'singlemulti', > - 'output': 'KNI: Error: Invalid parameter for kth= read_mode'}, > + 'output': 'Invalid parameter for=20 > + kthread_mode'}, > {'lo_mode': 'lo_mode_random', 'kthread_mode': 'm= ultiple', > - 'output': 'KNI: Incognizant parameter, loopback = disabled'} > + 'output': 'KNI.* Incognizant parameter,=20 > + loopback disabled'} > ] > =20 > =20 > @@ -262,7 +262,7 @@ class TestKni(TestCase): > self.verify('Error' not in out, "Compilation failed") > =20 > self.extract_ports_cores_config(default_1_port_cores_config) > - self.start_kni() > + out =3D self.start_kni() > self.verify("Error" not in out, "Error found during kni=20 > start") > =20 > self.dut.send_expect("service iptables stop", "# ") @@=20 > -307,8 +307,9 @@ class TestKni(TestCase): > out_kni =3D self.dut.send_expect( > './examples/kni/build/app/kni -c %s -n %d -- -P -p %s %s &'= % > (core_mask, self.dut.get_memory_channels(), port_mask, conf= ig_param), > - "APP: Lcore [0-9]+ is reading from port [0-9]+", 10) > + "APP: Lcore [0-9]+ is reading from port [0-9]+", 20) > =20 > + time.sleep(5) > if kthread_mode =3D=3D 'single': > kthread_mask =3D dts.create_mask(self.config['kernel_cores'= ]) > out =3D self.dut.send_expect( @@ -523,6 +524,8 @@ class=20 > TestKni(TestCase): > =20 > # Ports and cores configuration set in set_up_all function > # Setup IP address on virtual interfaces and tester ports > + self.dut.kill_all() > + self.start_kni() > for port in self.config['ports']: > virtual_interface =3D self.virtual_interface_name(port) > =20 > @@ -530,12 +533,13 @@ class TestKni(TestCase): > tx_interface =3D self.tester.get_interface(tx_port) > out =3D self.dut.send_expect( > "ifconfig %s up" % virtual_interface, "# ") > + time.sleep(5) > self.dut.send_expect( > - "ifconfig %s 192.168.%d.1" % (virtual_interface, port), = "# ") > + "ifconfig %s 192.168.%d.1 netmask 255.255.255.192" %=20 > + (virtual_interface, port), "# ") > self.tester.send_expect( > - "ifconfig %s 192.168.%d.2" % (tx_interface, port), "# ") > + "ifconfig %s 192.168.%d.2 netmask 255.255.255.192" %=20 > + (tx_interface, port), "# ") > self.tester.enable_ipv6(tx_interface) > - time.sleep(1) > + time.sleep(5) > # Send ping requests and check for answers > for port in self.config['ports']: > =20 > @@ -545,36 +549,36 @@ class TestKni(TestCase): > virtual_interface =3D self.virtual_interface_name(port) > =20 > out =3D self.dut.send_expect( > - "ping -w 1 -I %s 192.168.%d.1" % (virtual_interface, por= t), "# ", 5) > + "ping -w 2 -I %s 192.168.%d.1" % (virtual_interface,=20 > + port), "# ", 10) > self.verify("64 bytes from 192.168.%d.1:" % > port in out, "ping not supported") > =20 > out =3D self.dut.send_expect( > - "ping -w 1 -I %s 192.168.%d.2" % (virtual_interface, por= t), "# ", 5) > + "ping -w 2 -I %s 192.168.%d.2" % (virtual_interface,=20 > + port), "# ", 10) > self.verify("64 bytes from 192.168.%d.2:" % > port in out, "ping not supported") > =20 > out =3D self.tester.send_expect( > - "ping -w 1 -I %s 192.168.%d.1" % (tx_interface, port), "= # ", 5) > + "ping -w 1 -I %s 192.168.%d.1" % (tx_interface,=20 > + port), "# ", 10) > self.verify("64 bytes from 192.168.%d.1:" % > port in out, "kni cannot reply ping packet") > =20 > out =3D self.dut.send_expect( > - "ping -w 1 -I %s 192.168.%d.123" % (virtual_interface, p= ort), "# ", 5) > + "ping -w 1 -I %s 192.168.%d.123" %=20 > + (virtual_interface, port), "# ", 10) > self.verify( > "0 received, 100% packet loss" in out, "ping not=20 > supported") > =20 > out =3D self.dut.send_expect( > - "ip -family inet6 address show dev %s | awk '/inet6/ { p= rint $2 }'| cut -d'/' -f1" % virtual_interface, "# ", 5) > + "ip -family inet6 address show dev %s | awk '/inet6/=20 > + { print $2 }'| cut -d'/' -f1" % virtual_interface, "# ", 10) > ipv6_address =3D out.split('\r\n')[0] > =20 > out =3D self.dut.send_expect("ping6 -w 1 -I %s %s" % > - (virtual_interface, str(ipv6_addr= ess)), "# ", 5) > + (virtual_interface,=20 > + str(ipv6_address)), "# ", 10) > self.verify("64 bytes from %s: icmp_seq=3D1 ttl=3D64" % > ipv6_address in out, "ping6 not supported") > =20 > out =3D self.tester.send_expect( > - "ping6 -w 1 -I %s %s" % (tx_interface, str(ipv6_address)= ), "# ", 5) > + "ping6 -w 1 -I %s %s" % (tx_interface,=20 > + str(ipv6_address)), "# ", 10) > self.verify("64 bytes from %s: icmp_seq=3D1 ttl=3D64" % > ipv6_address in out, "kni cannot reply ping6=20 > packet") > =20 > @@ -587,7 +591,7 @@ class TestKni(TestCase): > break > =20 > out =3D self.dut.send_expect("ping6 -w 1 -I %s %s" % > - (virtual_interface, ''.join(ipv6l= ist)), "# ", 5) > + (virtual_interface,=20 > + ''.join(ipv6list)), "# ", 10) > self.verify( > "0 received, 100% packet loss" in out, "ping6 not=20 > supported") > =20 > @@ -603,6 +607,8 @@ class TestKni(TestCase): > """ > =20 > # Ports and cores configuration set in set_up_all function > + self.dut.kill_all() > + self.start_kni() > for port in self.config['ports']: > =20 > virtual_interface =3D self.virtual_interface_name(port) @@= =20 > -613,6 +619,7 @@ class TestKni(TestCase): > tx_interface =3D self.tester.get_interface(tx_port) > =20 > self.dut.send_expect("ifconfig %s up" %=20 > virtual_interface, "# ") > + time.sleep(5) > =20 > # Start tcpdump with filters for src and dst MAC address, t= his avoids > # unwanted broadcast, ICPM6... packets @@ -711,8 +718,8=20 > @@ class TestKni(TestCase): > # Request register dump > out =3D self.dut.send_expect("ethtool -d %s" % virtual_inte= rface, > "# ") > - self.verify("Link Status register" in out, > - "'ethtool -d' not supported") > + expectstring =3D "0x00000: CTRL.*0x00008: STATUS" > + self.verify(len(re.findall(expectstring, out ,=20 > + re.DOTALL)) > 0, "'ethtool -d' not supported") > self.verify("Operation not supported" not in out, > "'ethtool -d' not supported") > =20