test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue stats
@ 2020-02-18 11:21 Lijuan Tu
  2020-02-18  7:11 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Lijuan Tu @ 2020-02-18 11:21 UTC (permalink / raw)
  To: dts; +Cc: Lijuan Tu

* 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


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

end of thread, other threads:[~2020-02-18  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 11:21 [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue stats Lijuan Tu
2020-02-18  7:11 ` Tu, Lijuan

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).