test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH] tests: fix the verify issue in mtu test
@ 2019-08-19 22:58 Xinfeng Zhao
  2019-08-30  3:26 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Xinfeng Zhao @ 2019-08-19 22:58 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

the output of mtu test as below, so should modify the verified pattern

ens4      Link encap:Ethernet  HWaddr 7e:62:c3:58:16:11
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 tests/TestSuite_vf_kernel.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_kernel.py b/tests/TestSuite_vf_kernel.py
index 92b1202..bee30a0 100644
--- a/tests/TestSuite_vf_kernel.py
+++ b/tests/TestSuite_vf_kernel.py
@@ -517,7 +517,8 @@ class TestVfKernel(TestCase):
         vm0_intf1 = self.vm0_dut.ports_info[1]['intf']
         self.vm0_dut.send_expect("ifconfig %s up" % self.vm0_intf0, "#")
         out = self.vm0_dut.send_expect("ifconfig %s" % self.vm0_intf0, "#")
-        self.verify('mtu 1500' in out, "modify MTU failed")
+        result = re.search('mtu\W1500', out, flags=re.I)
+        self.verify(result is not None, "modify MTU failed")
         self.tester.send_expect("ifconfig %s mtu 3000" % self.tester_intf, "#")
 
         self.dut_testpmd.execute_cmd('stop')
-- 
2.17.1


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

* Re: [dts] [PATCH] tests: fix the verify issue in mtu test
  2019-08-19 22:58 [dts] [PATCH] tests: fix the verify issue in mtu test Xinfeng Zhao
@ 2019-08-30  3:26 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-08-30  3:26 UTC (permalink / raw)
  To: Zhao, XinfengX, dts; +Cc: Zhao, XinfengX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xinfeng Zhao
> Sent: Tuesday, August 20, 2019 6:59 AM
> To: dts@dpdk.org
> Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
> Subject: [dts] [PATCH] tests: fix the verify issue in mtu test
> 
> the output of mtu test as below, so should modify the verified pattern
> 
> ens4      Link encap:Ethernet  HWaddr 7e:62:c3:58:16:11
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
> 
> Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
> ---
>  tests/TestSuite_vf_kernel.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/TestSuite_vf_kernel.py b/tests/TestSuite_vf_kernel.py index
> 92b1202..bee30a0 100644
> --- a/tests/TestSuite_vf_kernel.py
> +++ b/tests/TestSuite_vf_kernel.py
> @@ -517,7 +517,8 @@ class TestVfKernel(TestCase):
>          vm0_intf1 = self.vm0_dut.ports_info[1]['intf']
>          self.vm0_dut.send_expect("ifconfig %s up" % self.vm0_intf0, "#")
>          out = self.vm0_dut.send_expect("ifconfig %s" % self.vm0_intf0, "#")
> -        self.verify('mtu 1500' in out, "modify MTU failed")
> +        result = re.search('mtu\W1500', out, flags=re.I)
> +        self.verify(result is not None, "modify MTU failed")
>          self.tester.send_expect("ifconfig %s mtu 3000" % self.tester_intf, "#")
> 
>          self.dut_testpmd.execute_cmd('stop')
> --
> 2.17.1


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 22:58 [dts] [PATCH] tests: fix the verify issue in mtu test Xinfeng Zhao
2019-08-30  3:26 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox