From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78DB1A00BE; Fri, 22 May 2020 10:40:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 698DC1D944; Fri, 22 May 2020 10:40:06 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7A77B1D927 for ; Fri, 22 May 2020 10:40:05 +0200 (CEST) IronPort-SDR: b9HnCsWdugywICcb5O7obHJ2zhp1RhJI0H4kG8wEno4sKi7shlL9q11Pcq0rYuCoUKiObfHdYT qvVQB2KYNC5Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 01:40:04 -0700 IronPort-SDR: oTr4lXVCb002/vYuJsSam8MxLwkUDFTRmYZtuaI/BcMmETQ4Ds+BknYvCHtMVPHNLS8TznkQMa PK25ESJIWTdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283336881" Received: from unknown (HELO xqm-virtio_tester.sh.intel.com) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 01:40:03 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Fri, 22 May 2020 16:31:55 +0800 Message-Id: <1590136328-457243-5-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1590136328-457243-1-git-send-email-qimaix.xiao@intel.com> References: <1590136328-457243-1-git-send-email-qimaix.xiao@intel.com> Subject: [dts] [PATCH V1 04/17]pvp_diff_qemu_version: change verified mpps value according to linerate X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: Xiao Qimai --- tests/TestSuite_pvp_diff_qemu_version.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_pvp_diff_qemu_version.py b/tests/TestSuite_pvp_diff_qemu_version.py index b9ce822..de4e0fd 100644 --- a/tests/TestSuite_pvp_diff_qemu_version.py +++ b/tests/TestSuite_pvp_diff_qemu_version.py @@ -220,6 +220,15 @@ class TestVhostPVPDiffQemuVersion(TestCase): self.vm_dut.send_expect("set fwd mac", "testpmd> ", 20) self.vm_dut.send_expect("start", "testpmd> ") + @property + def check_value(self): + check_dict = dict.fromkeys(self.frame_sizes) + linerate = {64: 0.085, 128: 0.12, 256: 0.20, 512: 0.35, 1024: 0.50, 1280: 0.55, 1518: 0.60} + for size in self.frame_sizes: + speed = self.wirespeed(self.nic, size, self.number_of_ports) + check_dict[size] = round(speed * linerate[size], 2) + return check_dict + def send_verify(self, qemu_version, vlan_id1=0, tag="Performance"): self.result_table_create(self.header_row) for frame_size in self.frame_sizes: @@ -243,7 +252,9 @@ class TestVhostPVPDiffQemuVersion(TestCase): _, 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 != 0, "can not received data of frame size %d" % frame_size) + 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)) # update print table info data_row = [qemu_version, frame_size, str(Mpps), str(pct), tag] self.result_table_add(data_row) -- 1.8.3.1