From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CDAC3A034F; Fri, 7 May 2021 08:12:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F71C40686; Fri, 7 May 2021 08:12:48 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 1A2ED40040 for ; Fri, 7 May 2021 08:12:46 +0200 (CEST) IronPort-SDR: xTvdbjbvdOCDgtoxFDE80cXBd151k8UiQKWS540API9ymrt9ewaAsan6WA5Gj6ghxD/YRI6mA5 OlVPsDkeQIsQ== X-IronPort-AV: E=McAfee;i="6200,9189,9976"; a="195543493" X-IronPort-AV: E=Sophos;i="5.82,279,1613462400"; d="scan'208";a="195543493" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2021 23:12:44 -0700 IronPort-SDR: x704V7oPB8Pi5qwDzzaBK7QcKAdAFBgX63oyMdX7HY5UI4vfaKLNeC35YSKS5eGhDwSqyTDsJi /BrFphPrF4hQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,279,1613462400"; d="scan'208";a="431149299" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga008.fm.intel.com with ESMTP; 06 May 2021 23:12:44 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 6 May 2021 23:12:44 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 7 May 2021 14:12:42 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2106.013; Fri, 7 May 2021 14:12:42 +0800 From: "Tu, Lijuan" To: "Ling, WeiX" , "dts@dpdk.org" CC: "Ling, WeiX" Thread-Topic: [dts] [PATCH V1] tests/vm2vm_virtio_net_perf: fix script issue Thread-Index: AQHXNabIIO2fXtecKUyQuf1Pzco1EKrXpDdg Date: Fri, 7 May 2021 06:12:42 +0000 Message-ID: References: <20210420053202.33753-1-weix.ling@intel.com> In-Reply-To: <20210420053202.33753-1-weix.ling@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/vm2vm_virtio_net_perf: fix script issue X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: dts On Behalf Of Wei Ling > Sent: 2021=1B$BG/=1B(B4=1B$B7n=1B(B20=1B$BF|=1B(B 13:32 > To: dts@dpdk.org > Cc: Ling, WeiX > Subject: [dts] [PATCH V1] tests/vm2vm_virtio_net_perf: fix script issue >=20 > 1.Fix testcase 8 iperf test parameter wrong issue. > 2.Add 'killall qemu-system-x86_64' step when use > vm.stop() to quit vm exception. >=20 > Signed-off-by: Wei Ling > --- > tests/TestSuite_vm2vm_virtio_net_perf.py | 41 ++++++++++++------------ > 1 file changed, 21 insertions(+), 20 deletions(-) >=20 > diff --git a/tests/TestSuite_vm2vm_virtio_net_perf.py > b/tests/TestSuite_vm2vm_virtio_net_perf.py > index d1e94093..bb0ccb32 100644 > --- a/tests/TestSuite_vm2vm_virtio_net_perf.py > +++ b/tests/TestSuite_vm2vm_virtio_net_perf.py > @@ -73,12 +73,16 @@ class TestVM2VMVirtioNetPerf(TestCase): > self.device_str =3D None > self.checked_vm =3D False > self.dut.restore_interfaces() > + self.path=3Dself.dut.apps_name['test-pmd'] > + self.testpmd_name=3Dself.path.split("/")[-1] >=20 > def set_up(self): > """ > run before each test case. > """ > self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#"= ) > + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#= ") > + self.dut.send_expect("killall qemu-system-x86_64", "#") > self.vm_dut =3D [] > self.vm =3D [] >=20 > @@ -291,8 +295,12 @@ class TestVM2VMVirtioNetPerf(TestCase): > return iperfdata >=20 > def stop_all_apps(self): > - for i in range(len(self.vm)): > - self.vm[i].stop() > + # add killall qemu-system-x86_64 step when use vm.stop() to quit= vm > exception > + try: > + for i in range(len(self.vm)): > + self.vm[i].stop() > + except: > + self.dut.send_expect("killall qemu-system-x86_64", "#") It's not a good idea to kill all qemu process, DTS records the process id, = prefer to kill the specific process but not all. > self.pmd_vhost.quit() >=20 > def offload_capbility_check(self, vm_client): > @@ -338,20 +346,13 @@ class TestVM2VMVirtioNetPerf(TestCase): > self.verify(md5_send =3D=3D md5_revd, 'the received file is diff= erent with send > file') >=20 > def bind_nic_driver(self, ports, driver=3D""): > - if driver =3D=3D "igb_uio": > - for port in ports: > - netdev =3D self.dut.ports_info[port]['port'] > - driver =3D netdev.get_nic_driver() > - if driver !=3D 'igb_uio': > - netdev.bind_driver(driver=3D'igb_uio') > - else: > - for port in ports: > - netdev =3D self.dut.ports_info[port]['port'] > - driver_now =3D netdev.get_nic_driver() > - if driver =3D=3D "": > - driver =3D netdev.default_driver > - if driver !=3D driver_now: > - netdev.bind_driver(driver=3Ddriver) > + for port in ports: > + netdev =3D self.dut.ports_info[port]['port'] > + driver_now =3D netdev.get_nic_driver() > + if driver =3D=3D "": > + driver =3D netdev.default_driver > + if driver !=3D driver_now: > + netdev.bind_driver(driver=3Ddriver) >=20 > def test_vm2vm_split_ring_iperf_with_tso(self): > """ > @@ -490,7 +491,7 @@ class TestVM2VMVirtioNetPerf(TestCase): > self.vm_args =3D "disable- > modern=3Dfalse,mrg_rxbuf=3Don,csum=3Don,guest_csum=3Don,host_tso4=3Don,gu= est_tso > 4=3Don,guest_ecn=3Don,packed=3Don" > self.prepare_test_env(cbdma=3DTrue, no_pci=3DFalse, client_mode= =3DFalse, > enable_queues=3D1, nb_cores=3D2, > server_mode=3DFalse, opt_queue=3DNone, com= bined=3DFalse, > rxq_txq=3DNone) > - self.start_iperf_and_verify_vhost_xstats_info(iperf_mode=3D'ufo'= ) > + self.start_iperf_and_verify_vhost_xstats_info(iperf_mode=3D'tso'= ) >=20 > def test_vm2vm_packed_ring_iperf_with_ufo(self): > """ > @@ -515,7 +516,7 @@ class TestVM2VMVirtioNetPerf(TestCase): > """ > Test Case 11: VM2VM virtio-net packed ring mergeable 8 queues CB= DMA > enable test with large packet payload valid check > """ > - # This test case need to use QEMU 3.0 to test > + # This test case need to use QEMU version >=3D 4.x to test, but = QEMU > version >=3D 4.x reconnect vm also have issues. > ipef_result =3D [] > self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=3D16, > allow_diff_socket=3DTrue) >=20 > @@ -555,7 +556,7 @@ class TestVM2VMVirtioNetPerf(TestCase): > """ > Test Case 12: VM2VM virtio-net packed ring non-mergeable 8 queue= s > CBDMA enable test with large packet payload valid check > """ > - # This test case need to use QEMU 3.0 to test > + # This test case need to use QEMU version >=3D 4.x to test, but = QEMU > version >=3D 4.x reconnect vm also have issues. > ipef_result =3D [] > self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=3D16, > allow_diff_socket=3DTrue) >=20 > @@ -595,9 +596,9 @@ class TestVM2VMVirtioNetPerf(TestCase): > """ > run after each test case. > """ > + self.bind_cbdma_device_to_kernel() > self.stop_all_apps() > self.dut.kill_all() > - self.bind_cbdma_device_to_kernel() >=20 > def tear_down_all(self): > """ > -- > 2.25.1