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 54EB9A0471 for ; Tue, 13 Aug 2019 08:41:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C27E1BE0C; Tue, 13 Aug 2019 08:41:21 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 52E0D1BDFD for ; Tue, 13 Aug 2019 08:41:19 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 23:40:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,380,1559545200"; d="scan'208";a="187683336" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 12 Aug 2019 23:40:55 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 12 Aug 2019 23:40:55 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 12 Aug 2019 23:40:54 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0439.000; Tue, 13 Aug 2019 14:40:53 +0800 From: "Wang, Yinan" To: "Zhu, WenhuiX" , "dts@dpdk.org" CC: "Zhu, WenhuiX" Thread-Topic: [dts] [PATCH V1] tests/vhost_1024_ethports:add new case Thread-Index: AQHVUOqCy5spIpKVNE6BNLKKONDM7qb4oj9Q Date: Tue, 13 Aug 2019 06:40:52 +0000 Message-ID: References: <1565599842-66863-1-git-send-email-wenhuix.zhu@intel.com> In-Reply-To: <1565599842-66863-1-git-send-email-wenhuix.zhu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTQyYjI3OTQtNjYyYy00YWMxLWFiMjYtYjkxNjcxMzZjODMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMUtWcFwvbFFiTVNYYWgrWmNocGEzdjVrb1wvcGU0eEdFdG52QkhPSXpNU2VaaXJxQWRMWStZejE2OFRkb1NLU0NmIn0= x-ctpclassification: CTP_NT 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="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/vhost_1024_ethports:add new case 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" Acked-by: Wang, Yinan > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui > Sent: 2019=1B$BG/=1B(B8=1B$B7n=1B(B12=1B$BF|=1B(B 16:51 > To: dts@dpdk.org > Cc: Zhu, WenhuiX > Subject: [dts] [PATCH V1] tests/vhost_1024_ethports:add new case >=20 > Add a new suite based on test_plan. >=20 > Signed-off-by: zhuwenhui > --- > tests/TestSuite_vhost_1024_ethports.py | 102 +++++++++++++++++++++++++ > 1 file changed, 102 insertions(+) > create mode 100644 tests/TestSuite_vhost_1024_ethports.py >=20 > diff --git a/tests/TestSuite_vhost_1024_ethports.py > b/tests/TestSuite_vhost_1024_ethports.py > new file mode 100644 > index 0000000..0c14e8d > --- /dev/null > +++ b/tests/TestSuite_vhost_1024_ethports.py > @@ -0,0 +1,102 @@ > +# BSD LICENSE > +# > +# Copyright (c) <2019>, Intel Corporation. > +# All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without # > +modification, are permitted provided that the following conditions # > +are met: > +# > +# * Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# * Redistributions in binary form must reproduce the above copyright > +# notice, this list of conditions and the following disclaimer in > +# the documentation and/or other materials provided with the > +# distribution. > +# * Neither the name of Intel Corporation nor the names of its > +# contributors may be used to endorse or promote products derived > +# from this software without specific prior written permission. > +# > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS # > +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # > +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > # > +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > # > +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > # > +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # > +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > # > +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON > ANY # > +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # > +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE > USE # > +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + > +""" > +DPDK Test suite. > +Basic test for launch vhost with 1024 ethports """ > + > +import utils > +from test_case import TestCase > + > + > +class TestVhost1024Ethports(TestCase): > + > + def set_up_all(self): > + """ > + Run at the start of each test suite. > + """ > + self.max_ethport =3D 1024 > + self.queue =3D 1 > + self.dut_ports =3D self.dut.get_ports() > + self.verify(len(self.dut_ports) >=3D 1, 'Insufficient ports for = testing') > + self.mem_channels =3D self.dut.get_memory_channels() > + cores =3D self.dut.get_core_list("1S/2C/1T") > + self.coremask =3D utils.create_mask(cores) > + self.build_user_dpdk() > + > + def set_up(self): > + """ > + Run before each test case. > + """ > + self.dut.send_expect('rm -rf ./vhost-net*', '# ') > + self.dut.send_expect('killall -s INT testpmd', '# ') > + self.vhost_user =3D self.dut.new_session(suite=3D'vhost-user') > + > + def build_user_dpdk(self): > + self.dut.send_expect( > + "sed -i > 's/CONFIG_RTE_MAX_ETHPORTS=3D32$/CONFIG_RTE_MAX_ETHPORTS=3D1024/' > config/common_base", '#', 30) > + self.dut.build_install_dpdk(self.target) > + > + def restore_dpdk(self): > + self.dut.send_expect( > + "sed -i > 's/CONFIG_RTE_MAX_ETHPORTS=3D1024$/CONFIG_RTE_MAX_ETHPORTS=3D32/' > config/common_base", '#', 30) > + self.dut.build_install_dpdk(self.target) > + > + def test_launch_vhost_with_1024_ethports(self): > + """ > + Test function of launch vhost with 1024 ethports > + """ > + command_line_vdev =3D '' > + for ethport in range(self.max_ethport): > + command_line_vdev +=3D '--vdev > "eth_vhost%d,iface=3Dvhost-net%d,queues=3D%d" ' %(ethport, ethport, self.= queue) > + command_line_argument =3D '/app/testpmd -c %s -n %d --socket-mem > 10240,10240 '\ > + '--file-prefix=3Dvhost ' %(self.coremask, > self.mem_channels) > + command_line_client =3D self.dut.target + command_line_argument = + > command_line_vdev + '-- -i' > + try: > + out =3D self.vhost_user.send_expect(command_line_client, > 'testpmd> ', 120) > + except Exception as e: > + self.verify(0, 'start testpmd failed') > + self.vhost_user.send_expect("quit", "#", 120) > + self.verify("Done" in out, "launch vhost with 1024 ethports > + failed") > + > + def tear_down(self): > + """ > + Run after each test case. > + """ > + self.dut.send_expect('rm -rf ./vhost-net*', '# ') > + self.dut.close_session(self.vhost_user) > + > + def tear_down_all(self): > + """ > + Run after each test suite. > + """ > + self.restore_dpdk() > -- > 2.17.2