test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1]tests/uni_pkt: add check port link status and optimize script
@ 2020-01-17  4:34 Xiao Qimai
  2020-01-17  5:34 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Qimai @ 2020-01-17  4:34 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

add check port link status and optimize script

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_uni_pkt.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py
index c3db28e..e32bc2c 100644
--- a/tests/TestSuite_uni_pkt.py
+++ b/tests/TestSuite_uni_pkt.py
@@ -48,6 +48,7 @@ from test_case import TestCase
 from exception import VerifyFailure
 from packet import Packet
 import time
+from pmd_output import PmdOutput
 
 
 class TestUniPacket(TestCase):
@@ -61,13 +62,15 @@ class TestUniPacket(TestCase):
         valports = [_ for _ in ports if self.tester.get_local_port(_) != -1]
         # start testpmd
         self.dut_port = valports[0]
+        socket_id = self.dut.get_numa_id(self.dut_port)
         tester_port = self.tester.get_local_port(self.dut_port)
         self.tester_iface = self.tester.get_interface(tester_port)
-        self.dut.send_expect(
-            "./%s/app/testpmd -c f -n 4 -- -i" % self.target, "testpmd>", 20)
+        self.pmd = PmdOutput(self.dut)
+        self.pmd.start_testpmd(socket=socket_id)
         self.dut.send_expect("set fwd rxonly", "testpmd>")
         self.dut.send_expect("set verbose 1", "testpmd>")
         self.dut.send_expect("start", "testpmd>")
+        self.pmd.wait_link_status_up(port_id=self.dut_port)
 
     def set_up(self):
         """
-- 
2.17.1


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

* Re: [dts] [PATCH V1]tests/uni_pkt: add check port link status and optimize script
  2020-01-17  4:34 [dts] [PATCH V1]tests/uni_pkt: add check port link status and optimize script Xiao Qimai
@ 2020-01-17  5:34 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-01-17  5:34 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

applied

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Friday, January 17, 2020 12:35 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]tests/uni_pkt: add check port link status and
> optimize script
> 
> add check port link status and optimize script
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_uni_pkt.py | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py index
> c3db28e..e32bc2c 100644
> --- a/tests/TestSuite_uni_pkt.py
> +++ b/tests/TestSuite_uni_pkt.py
> @@ -48,6 +48,7 @@ from test_case import TestCase  from exception import
> VerifyFailure  from packet import Packet  import time
> +from pmd_output import PmdOutput
> 
> 
>  class TestUniPacket(TestCase):
> @@ -61,13 +62,15 @@ class TestUniPacket(TestCase):
>          valports = [_ for _ in ports if self.tester.get_local_port(_) != -1]
>          # start testpmd
>          self.dut_port = valports[0]
> +        socket_id = self.dut.get_numa_id(self.dut_port)
>          tester_port = self.tester.get_local_port(self.dut_port)
>          self.tester_iface = self.tester.get_interface(tester_port)
> -        self.dut.send_expect(
> -            "./%s/app/testpmd -c f -n 4 -- -i" % self.target, "testpmd>", 20)
> +        self.pmd = PmdOutput(self.dut)
> +        self.pmd.start_testpmd(socket=socket_id)
>          self.dut.send_expect("set fwd rxonly", "testpmd>")
>          self.dut.send_expect("set verbose 1", "testpmd>")
>          self.dut.send_expect("start", "testpmd>")
> +        self.pmd.wait_link_status_up(port_id=self.dut_port)
> 
>      def set_up(self):
>          """
> --
> 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 --
2020-01-17  4:34 [dts] [PATCH V1]tests/uni_pkt: add check port link status and optimize script Xiao Qimai
2020-01-17  5:34 ` 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