test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lijuan Tu <lijuan.tu@intel.com>
To: dts@dpdk.org
Cc: Lijuan Tu <lijuan.tu@intel.com>
Subject: [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue stats
Date: Tue, 18 Feb 2020 19:21:57 +0800	[thread overview]
Message-ID: <1582024917-22003-1-git-send-email-lijuan.tu@intel.com> (raw)

* fix pktgen config
* get pool/queues statistics

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
 tests/TestSuite_vmdq.py | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py
index bb5aaf4..623d728 100644
--- a/tests/TestSuite_vmdq.py
+++ b/tests/TestSuite_vmdq.py
@@ -122,16 +122,26 @@ class TestVmdq(TestCase):
             tgen_input.append((tx_port, rx_port, "%s" %pcap))
 
         self.tester.pktgen.clear_streams()
+        vm_config = self.set_fields()
         # run packet generator
-        streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100,
-                                                        None, self.tester.pktgen)
+        streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 10,
+                                                        vm_config, self.tester.pktgen)
         loss = self.tester.pktgen.measure_loss(stream_ids=streams)
         self.logger.info("loss is {}!".format(loss))
 
         # Verify the accurate
         self.verify(loss[0]/100 < 0.001, "Excessive packet loss")
+        out = self.get_vmdq_stats()
         self.validateApproxEqual(out.split("\r\n"))
 
+    def get_vmdq_stats(self):
+        vmdq_dcb_session = self.dut.new_session()
+        vmdq_dcb_session.send_expect("kill -s SIGHUP  `pgrep -fl vmdq_app | awk '{print $1}'`", "#", 20)
+        out = self.dut.get_session_output()
+        self.logger.info(out)
+        vmdq_dcb_session.close()
+        return out
+
     def set_up(self):
         """
         Run before each test case.
@@ -237,9 +247,10 @@ class TestVmdq(TestCase):
 
                 # clear streams before add new streams
                 self.tester.pktgen.clear_streams()
+                vm_config = self.set_fields()
                 # run packet generator
                 streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100,
-                                                    None, self.tester.pktgen)
+                                                    vm_config, self.tester.pktgen)
                 _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams)
 
                 config['mpps'][frame_size] = pps/1000000.0
-- 
1.8.3.1


             reply	other threads:[~2020-02-18  3:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 11:21 Lijuan Tu [this message]
2020-02-18  7:11 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1582024917-22003-1-git-send-email-lijuan.tu@intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).