From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3F4A6A0471 for ; Wed, 19 Jun 2019 09:04:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 310F91C297; Wed, 19 Jun 2019 09:04:10 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 068C11C281 for ; Wed, 19 Jun 2019 09:04:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 00:04:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,392,1557212400"; d="scan'208";a="162123511" Received: from meijuan2.sh.intel.com ([10.67.119.150]) by orsmga003.jf.intel.com with ESMTP; 19 Jun 2019 00:04:06 -0700 From: zhaomeijuan To: dts@dpdk.org Cc: zhaomeijuan Date: Wed, 19 Jun 2019 15:04:50 +0000 Message-Id: <20190619150450.41225-1-meijuanx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [next][PATCH V1] tests/link_flowctrl add transmission packet time and fix description issue 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" *.add transmission packet time to synchronous etgen transmission packet time *.result[0] is loss packet rate, so it's not necessary to devide 100 or add percent Signed-off-by: zhaomeijuan --- tests/TestSuite_link_flowctrl.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flowctrl.py index 0192498..5a8833d 100644 --- a/tests/TestSuite_link_flowctrl.py +++ b/tests/TestSuite_link_flowctrl.py @@ -121,11 +121,12 @@ class TestLinkFlowctrl(TestCase): # run packet generator streams = self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100, None, self.tester.pktgen) - result = self.tester.pktgen.measure_loss(stream_ids=streams) + options = {'duration': 60} + result = self.tester.pktgen.measure_loss(stream_ids=streams, options=options) self.dut.send_expect("stop", "testpmd> ") - return result[0]/100 + return result[0] def get_testpmd_port_stats(self, ports): """ @@ -357,7 +358,7 @@ class TestLinkFlowctrl(TestCase): tx_flow_control='on', pause_frame_fwd='on') - self.logger.info("Packet loss: %.3f%%" % result) + self.logger.info("Packet loss: %.3f" % result) self.verify(result <= 0.01, "Link flow control fail, the loss percent is more than 1%") @@ -371,7 +372,7 @@ class TestLinkFlowctrl(TestCase): tx_flow_control='on', pause_frame_fwd='off') - self.logger.info("Packet loss: %.3f%%" % result) + self.logger.info("Packet loss: %.3f" % result) self.verify(result <= 0.01, "Link flow control fail, the loss percent is more than 1%") @@ -385,7 +386,7 @@ class TestLinkFlowctrl(TestCase): tx_flow_control='on', pause_frame_fwd='off') - self.logger.info("Packet loss: %.3f%%" % result) + self.logger.info("Packet loss: %.3f" % result) self.verify(result <= 0.01, "Link flow control fail, the loss percent is more than 1%") @@ -399,7 +400,7 @@ class TestLinkFlowctrl(TestCase): tx_flow_control='off', pause_frame_fwd='on') - self.logger.info("Packet loss: %.3f%%" % result) + self.logger.info("Packet loss: %.3f" % result) self.verify(result >= 0.5, "Link flow control fail, the loss percent is less than 50%") @@ -413,7 +414,7 @@ class TestLinkFlowctrl(TestCase): tx_flow_control='off', pause_frame_fwd='off') - self.logger.info("Packet loss: %.3f%%" % result) + self.logger.info("Packet loss: %.3f" % result) self.verify(result >= 0.5, "Link flow control fail, the loss percent is less than 50%") @@ -427,7 +428,7 @@ class TestLinkFlowctrl(TestCase): tx_flow_control='on', pause_frame_fwd='off') - self.logger.info("Packet loss: %.3f%%" % result) + self.logger.info("Packet loss: %.3f" % result) self.verify(result <= 0.01, "Link flow control fail, the loss percent is more than 1%") -- 2.17.1