test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code
@ 2019-08-13  0:10 lihong
  2019-08-14  2:43 ` Wang, Yinan
  2019-08-28  5:56 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: lihong @ 2019-08-13  0:10 UTC (permalink / raw)
  To: dts; +Cc: lihong

1. flush buffer before launch l3fwd-power
2. add -w param when start testpmd

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 tests/TestSuite_vhost_virtio_user_interrupt.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py
index 6713590..5422e04 100644
--- a/tests/TestSuite_vhost_virtio_user_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_user_interrupt.py
@@ -96,6 +96,7 @@ class TestVirtioUserInterrupt(TestCase):
                     " -P --config='(0,0,%s)' --parse-ptype "
         cmd_l3fwd = cmd_l3fwd % (self.mem_channel, self.core_mask_l3fwd,
                     path, self.core_interrupt)
+        self.l3fwd.get_session_before(timeout=2)
         self.l3fwd.send_expect(cmd_l3fwd, "POWER", 40)
         time.sleep(10)
         out = self.l3fwd.get_session_before()
@@ -108,6 +109,9 @@ class TestVirtioUserInterrupt(TestCase):
         """
         start testpmd on vhost side
         """
+        if len(pci) == 0:
+            pci_info = self.dut.ports_info[self.dut_ports[0]]['pci']
+            pci = '-w %s' % pci_info
         cmd_vhost_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
               "--socket-mem 1024,1024 --legacy-mem %s " + \
               "--file-prefix=vhost " + \
@@ -143,8 +147,8 @@ class TestVirtioUserInterrupt(TestCase):
         elif status == "sleeps":
             info = "lcore %s sleeps until interrupt triggers"
         info = info % self.core_interrupt
-        self.logger.info(info)
         self.verify(info in out, "The CPU status not right for %s" % info)
+        self.logger.info(info)
 
     def check_virtio_side_link_status(self, status):
         out = self.virtio.send_expect("show port info 0", "testpmd> ", 20)
-- 
2.7.4


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

* Re: [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code
  2019-08-13  0:10 [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code lihong
@ 2019-08-14  2:43 ` Wang, Yinan
  2019-08-28  5:56 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Wang, Yinan @ 2019-08-14  2:43 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX

Acked-by: Wang, Yinan <yinan.wang@intel.com>

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: 2019^[$BG/^[(B8^[$B7n^[(B13^[$BF|^[(B 8:10
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code
> 
> 1. flush buffer before launch l3fwd-power 2. add -w param when start testpmd
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  tests/TestSuite_vhost_virtio_user_interrupt.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py
> b/tests/TestSuite_vhost_virtio_user_interrupt.py
> index 6713590..5422e04 100644
> --- a/tests/TestSuite_vhost_virtio_user_interrupt.py
> +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py
> @@ -96,6 +96,7 @@ class TestVirtioUserInterrupt(TestCase):
>                      " -P --config='(0,0,%s)' --parse-ptype "
>          cmd_l3fwd = cmd_l3fwd % (self.mem_channel, self.core_mask_l3fwd,
>                      path, self.core_interrupt)
> +        self.l3fwd.get_session_before(timeout=2)
>          self.l3fwd.send_expect(cmd_l3fwd, "POWER", 40)
>          time.sleep(10)
>          out = self.l3fwd.get_session_before() @@ -108,6 +109,9 @@ class
> TestVirtioUserInterrupt(TestCase):
>          """
>          start testpmd on vhost side
>          """
> +        if len(pci) == 0:
> +            pci_info = self.dut.ports_info[self.dut_ports[0]]['pci']
> +            pci = '-w %s' % pci_info
>          cmd_vhost_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
>                "--socket-mem 1024,1024 --legacy-mem %s " + \
>                "--file-prefix=vhost " + \ @@ -143,8 +147,8 @@ class
> TestVirtioUserInterrupt(TestCase):
>          elif status == "sleeps":
>              info = "lcore %s sleeps until interrupt triggers"
>          info = info % self.core_interrupt
> -        self.logger.info(info)
>          self.verify(info in out, "The CPU status not right for %s" % info)
> +        self.logger.info(info)
> 
>      def check_virtio_side_link_status(self, status):
>          out = self.virtio.send_expect("show port info 0", "testpmd> ", 20)
> --
> 2.7.4


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

* Re: [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code
  2019-08-13  0:10 [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code lihong
  2019-08-14  2:43 ` Wang, Yinan
@ 2019-08-28  5:56 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-08-28  5:56 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Tuesday, August 13, 2019 8:10 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization
> code
> 
> 1. flush buffer before launch l3fwd-power 2. add -w param when start
> testpmd
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  tests/TestSuite_vhost_virtio_user_interrupt.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py
> b/tests/TestSuite_vhost_virtio_user_interrupt.py
> index 6713590..5422e04 100644
> --- a/tests/TestSuite_vhost_virtio_user_interrupt.py
> +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py
> @@ -96,6 +96,7 @@ class TestVirtioUserInterrupt(TestCase):
>                      " -P --config='(0,0,%s)' --parse-ptype "
>          cmd_l3fwd = cmd_l3fwd % (self.mem_channel, self.core_mask_l3fwd,
>                      path, self.core_interrupt)
> +        self.l3fwd.get_session_before(timeout=2)
>          self.l3fwd.send_expect(cmd_l3fwd, "POWER", 40)
>          time.sleep(10)
>          out = self.l3fwd.get_session_before() @@ -108,6 +109,9 @@ class
> TestVirtioUserInterrupt(TestCase):
>          """
>          start testpmd on vhost side
>          """
> +        if len(pci) == 0:
> +            pci_info = self.dut.ports_info[self.dut_ports[0]]['pci']
> +            pci = '-w %s' % pci_info
>          cmd_vhost_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
>                "--socket-mem 1024,1024 --legacy-mem %s " + \
>                "--file-prefix=vhost " + \ @@ -143,8 +147,8 @@ class
> TestVirtioUserInterrupt(TestCase):
>          elif status == "sleeps":
>              info = "lcore %s sleeps until interrupt triggers"
>          info = info % self.core_interrupt
> -        self.logger.info(info)
>          self.verify(info in out, "The CPU status not right for %s" % info)
> +        self.logger.info(info)
> 
>      def check_virtio_side_link_status(self, status):
>          out = self.virtio.send_expect("show port info 0", "testpmd> ", 20)
> --
> 2.7.4


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13  0:10 [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code lihong
2019-08-14  2:43 ` Wang, Yinan
2019-08-28  5:56 ` 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