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 B9F25A0547; Tue, 20 Apr 2021 07:33:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA6D24159C; Tue, 20 Apr 2021 07:33:52 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id EE91941598 for ; Tue, 20 Apr 2021 07:33:50 +0200 (CEST) IronPort-SDR: vE5ken1zaJfngLFtW7o3IUnPLxMHwJXufdNllGEWV6e/h1o0YAVPqs0gYTIrOMOJJOUCh992qr gV7gcEJ4TUtg== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="175553046" X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="175553046" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 22:33:50 -0700 IronPort-SDR: QAsWK1Y3OzOYkVmD1h1bC6xVyxMlLlGBlNooSsdhlOac0NrjzFpnK0DPNBE6WyKCIePvaRWaEj HQmwhHbA7v3w== X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="426783714" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 22:33:48 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Tue, 20 Apr 2021 13:32:02 +0800 Message-Id: <20210420053202.33753-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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" 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. Signed-off-by: Wei Ling --- tests/TestSuite_vm2vm_virtio_net_perf.py | 41 ++++++++++++------------ 1 file changed, 21 insertions(+), 20 deletions(-) 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 = None self.checked_vm = False self.dut.restore_interfaces() + self.path=self.dut.apps_name['test-pmd'] + self.testpmd_name=self.path.split("/")[-1] 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 = [] self.vm = [] @@ -291,8 +295,12 @@ class TestVM2VMVirtioNetPerf(TestCase): return iperfdata 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", "#") self.pmd_vhost.quit() def offload_capbility_check(self, vm_client): @@ -338,20 +346,13 @@ class TestVM2VMVirtioNetPerf(TestCase): self.verify(md5_send == md5_revd, 'the received file is different with send file') def bind_nic_driver(self, ports, driver=""): - if driver == "igb_uio": - for port in ports: - netdev = self.dut.ports_info[port]['port'] - driver = netdev.get_nic_driver() - if driver != 'igb_uio': - netdev.bind_driver(driver='igb_uio') - else: - for port in ports: - netdev = self.dut.ports_info[port]['port'] - driver_now = netdev.get_nic_driver() - if driver == "": - driver = netdev.default_driver - if driver != driver_now: - netdev.bind_driver(driver=driver) + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver_now = netdev.get_nic_driver() + if driver == "": + driver = netdev.default_driver + if driver != driver_now: + netdev.bind_driver(driver=driver) def test_vm2vm_split_ring_iperf_with_tso(self): """ @@ -490,7 +491,7 @@ class TestVM2VMVirtioNetPerf(TestCase): self.vm_args = "disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on" self.prepare_test_env(cbdma=True, no_pci=False, client_mode=False, enable_queues=1, nb_cores=2, server_mode=False, opt_queue=None, combined=False, rxq_txq=None) - self.start_iperf_and_verify_vhost_xstats_info(iperf_mode='ufo') + self.start_iperf_and_verify_vhost_xstats_info(iperf_mode='tso') 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 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 >= 4.x to test, but QEMU version >= 4.x reconnect vm also have issues. ipef_result = [] self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True) @@ -555,7 +556,7 @@ class TestVM2VMVirtioNetPerf(TestCase): """ Test Case 12: VM2VM virtio-net packed ring non-mergeable 8 queues 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 >= 4.x to test, but QEMU version >= 4.x reconnect vm also have issues. ipef_result = [] self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True) @@ -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() def tear_down_all(self): """ -- 2.25.1