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 D4B8AA0093; Tue, 19 May 2020 03:56:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E50F1D54F; Tue, 19 May 2020 03:56:52 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 8AFB11D515 for ; Tue, 19 May 2020 03:56:50 +0200 (CEST) IronPort-SDR: p7eR55U9q0vj+iVz0ScLzsrDTTAWm9R4SqKfWck2it0UPyj0Wj/eoSchdxGdFWz3OQFyueqQVE KBix26UqH7SA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 18:56:49 -0700 IronPort-SDR: 91kiOEpgjDVhjbRixkkXjtehowAo3qcbetiDILDEk953cZAgYaPVi6IKSK79BNuYxSwXGS7mQ3 XnH+IY9Ltegw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,408,1583222400"; d="scan'208";a="282171544" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 18 May 2020 18:56:49 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 18:56:49 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 18:56:48 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.178]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.13]) with mapi id 14.03.0439.000; Tue, 19 May 2020 09:56:45 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v1] tests: add performance check in TestSuite_virtio_user_as_exceptional_path.py Thread-Index: AQHWKMNG+Q23IXKPGEGrqa81PjpvmKiur/Kg Date: Tue, 19 May 2020 01:56:45 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC3ED78@SHSMSX101.ccr.corp.intel.com> References: <20200512180351.64053-1-yinan.wang@intel.com> In-Reply-To: <20200512180351.64053-1-yinan.wang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v1] tests: add performance check in TestSuite_virtio_user_as_exceptional_path.py 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yinan > Sent: Wednesday, May 13, 2020 2:04 AM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v1] tests: add performance check in > TestSuite_virtio_user_as_exceptional_path.py >=20 > From: Wang Yinan >=20 > Signed-off-by: Wang Yinan > --- > .../TestSuite_virtio_user_as_exceptional_path.py | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) >=20 > diff --git a/tests/TestSuite_virtio_user_as_exceptional_path.py > b/tests/TestSuite_virtio_user_as_exceptional_path.py > index faf8c49..262db75 100644 > --- a/tests/TestSuite_virtio_user_as_exceptional_path.py > +++ b/tests/TestSuite_virtio_user_as_exceptional_path.py > @@ -197,7 +197,7 @@ class TestVirtioUserAsExceptionalPath(TestCase): > self.dut.send_expect("rm -rf ./app/test-pmd/csumonly_backup.c", = "#") > self.dut.build_install_dpdk(self.dut.target) >=20 > - def iperf_result_verify(self, vm_client): > + def iperf_result_verify(self, vm_client, direction): > ''' > Get the iperf test result > ''' > @@ -205,7 +205,15 @@ class TestVirtioUserAsExceptionalPath(TestCase): > print(fmsg) > iperfdata =3D re.compile('[\d+]*.[\d+]* [M|G]bits/sec').findall(= fmsg) > print(iperfdata) > - self.verify(iperfdata, 'There no data about this case') > + data_str =3D iperfdata[-1].split() > + data=3Diperfdata[-1].split()[0] > + unit=3Diperfdata[-1].split()[1] > + if direction =3D=3D "direction_TAP_original": > + self.verify(unit =3D=3D"Gbits/sec", 'The unit of throughput = is not > Gbits/sec') > + self.verify(float(data) > 4.0, 'No data or bandwith not achi= eve target > value 3Gbits/sec about this case') > + elif direction =3D=3D "direction_NIC_original": > + self.verify(unit =3D=3D"Gbits/sec", 'The unit of throughput = is not > Gbits/sec') > + self.verify(float(data) > 2.0, 'No data or bandwith not > + achieve target value 3Gbits/sec about this case') > self.result_table_create(['Data', 'Unit']) > results_row =3D ['exception path'] > results_row.append(iperfdata[-1]) @@ -258,7 +266,7 @@ class > TestVirtioUserAsExceptionalPath(TestCase): > self.iperf.send_expect('iperf -c 1.1.1.8 -i 1 -t 10 > /root/iper= f_client.log > &', '', 180) > time.sleep(30) > self.dut.send_expect('^C', '#', 10) > - self.iperf_result_verify(self.iperf) > + self.iperf_result_verify(self.iperf, "direction_TAP_original") > self.logger.info("TAP->virtio-user->Kernel_NIC %s " % > (self.output_result)) > self.iperf.send_expect('rm /root/iperf_client.log', '#', 10) > self.vhost_user.send_expect("quit", "#", 120) @@ -280,7 +288,7 @= @ > class TestVirtioUserAsExceptionalPath(TestCase): > self.dut.send_expect('ip netns exec ns1 iperf -c 1.1.1.2 -i 1 -t= 10 > > /root/iperf_client.log &', '', 10) > time.sleep(30) > self.iperf.send_expect('^C', '#', 10) > - self.iperf_result_verify(self.dut) > + self.iperf_result_verify(self.dut, "direction_NIC_original") > self.dut.get_session_output(timeout=3D2) > self.logger.info("Kernel_NIC<-virtio-user<-TAP %s " % > (self.output_result)) > self.dut.send_expect('rm /root/iperf_client.log', '#', 10) > -- > 2.17.1