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 14CD3A046B for ; Wed, 21 Aug 2019 11:32:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CAD381BEEE; Wed, 21 Aug 2019 11:32:07 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id CF8AD1BEE8 for ; Wed, 21 Aug 2019 11:32:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2019 02:32:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,412,1559545200"; d="scan'208";a="172725460" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 21 Aug 2019 02:32:04 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 21 Aug 2019 02:32:04 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 21 Aug 2019 02:32:04 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by shsmsx102.ccr.corp.intel.com ([169.254.2.19]) with mapi id 14.03.0439.000; Wed, 21 Aug 2019 17:32:02 +0800 From: "Tu, Lijuan" To: "Zhu, WenhuiX" , "dts@dpdk.org" CC: "Zhu, WenhuiX" Thread-Topic: [dts] [PATCH V1] tests/vhost_1024_ethports:add new case Thread-Index: AQHVUOqCJkWlgtiwIUyb5QUuEIG3oKcFZLIQ Date: Wed, 21 Aug 2019 09:32:01 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB0431C@SHSMSX101.ccr.corp.intel.com> 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: 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-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDE4NzVmNDYtNzQyNi00ZDMzLThhNTYtMDlkZmE5MjJmZWZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoia0hWamp4S0JCaG1YYzl5NGZvMUFkYjVjRHVmN3Z5M05Lb2lmRUdxaUZVeklJNyswdlBsK1lYNzNoMkhPVkdHZSJ9 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/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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui > Sent: Monday, August 12, 2019 4:51 PM > 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.m= em_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, 'te= stpmd> ', > 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