test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/pvp_diff_qemu_version:move verify step after print result table
@ 2021-03-15  8:35 Ling Wei
  2021-03-15  8:38 ` Ling, WeiX
  2021-03-18  7:27 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Ling Wei @ 2021-03-15  8:35 UTC (permalink / raw)
  To: dts; +Cc: Ling Wei

Move verify step after print result table.

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_pvp_diff_qemu_version.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tests/TestSuite_pvp_diff_qemu_version.py b/tests/TestSuite_pvp_diff_qemu_version.py
index 49fa1e1b..bdf3f67c 100644
--- a/tests/TestSuite_pvp_diff_qemu_version.py
+++ b/tests/TestSuite_pvp_diff_qemu_version.py
@@ -104,7 +104,7 @@ class TestVhostPVPDiffQemuVersion(TestCase):
         self.src1 = "192.168.4.1"
         self.dst1 = "192.168.3.1"
         self.header_row = ["QemuVersion", "FrameSize(B)", "Throughput(Mpps)",
-                           "LineRate(%)", "Cycle"]
+                           "LineRate(%)", "Cycle", "Expected Throughput(Mpps)"]
 
     def get_qemu_list_from_config(self):
         """
@@ -233,6 +233,7 @@ class TestVhostPVPDiffQemuVersion(TestCase):
 
     def send_verify(self, qemu_version, vlan_id1=0, tag="Performance"):
         self.result_table_create(self.header_row)
+        perf_result = {}
         for frame_size in self.frame_sizes:
             info = "Running test %s, and %d frame size." % (self.running_case, frame_size)
             self.logger.info(info)
@@ -253,15 +254,17 @@ class TestVhostPVPDiffQemuVersion(TestCase):
             traffic_opt = {'delay': 5, 'duration': 20}
             _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt)
             Mpps = pps / 1000000.0
-            pct = Mpps * 100 / float(self.wirespeed(self.nic, frame_size, 1))
-            self.verify(Mpps > self.check_value[frame_size],
-                        "%s of frame size %d speed verify failed, expect %s, result %s" % (
-                        self.running_case, frame_size, self.check_value[frame_size], Mpps))
+            line_rate = Mpps * 100 / float(self.wirespeed(self.nic, frame_size, 1))
             # update print table info
-            data_row = [qemu_version, frame_size, str(Mpps), str(pct), tag]
+            data_row = [qemu_version, frame_size, str(Mpps), str(line_rate), tag, self.check_value[frame_size]]
             self.result_table_add(data_row)
+            perf_result[frame_size] = Mpps
 
         self.result_table_print()
+        for frame_size in perf_result.keys():
+            self.verify(perf_result[frame_size] > self.check_value[frame_size],
+                        "%s of frame size %d speed verify failed, expect %s, result %s" % (
+                            self.running_case, frame_size, self.check_value[frame_size], perf_result[frame_size]))
 
     def close_testpmd_and_qemu(self):
         """
-- 
2.25.1


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

* Re: [dts] [PATCH V1] tests/pvp_diff_qemu_version:move verify step after print result table
  2021-03-15  8:35 [dts] [PATCH V1] tests/pvp_diff_qemu_version:move verify step after print result table Ling Wei
@ 2021-03-15  8:38 ` Ling, WeiX
  2021-03-18  7:27 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Ling, WeiX @ 2021-03-15  8:38 UTC (permalink / raw)
  To: dts

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

> -----Original Message-----
> From: Ling, WeiX <weix.ling@intel.com>
> Sent: Monday, March 15, 2021 04:35 PM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts][PATCH V1] tests/pvp_diff_qemu_version:move verify step
> after print result table

Tested-by: Wei Ling <weix.ling@intel.com>

[-- Attachment #2: TestVhostPVPDiffQemuVersion.log --]
[-- Type: application/octet-stream, Size: 314791 bytes --]

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

* Re: [dts] [PATCH V1] tests/pvp_diff_qemu_version:move verify step after print result table
  2021-03-15  8:35 [dts] [PATCH V1] tests/pvp_diff_qemu_version:move verify step after print result table Ling Wei
  2021-03-15  8:38 ` Ling, WeiX
@ 2021-03-18  7:27 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2021-03-18  7:27 UTC (permalink / raw)
  To: Ling, WeiX, dts; +Cc: Ling, WeiX

> Move verify step after print result table.
> 
> Signed-off-by: Ling Wei <weix.ling@intel.com>

Applied, thanks

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

end of thread, other threads:[~2021-03-18  7:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15  8:35 [dts] [PATCH V1] tests/pvp_diff_qemu_version:move verify step after print result table Ling Wei
2021-03-15  8:38 ` Ling, WeiX
2021-03-18  7:27 ` 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).