From patchwork Fri Sep 4 08:18:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, XiX" X-Patchwork-Id: 76527 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1ACD6A04DB; Fri, 4 Sep 2020 10:17:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 581A31C0C0; Fri, 4 Sep 2020 10:17:50 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id DB0641C0BF for ; Fri, 4 Sep 2020 10:17:46 +0200 (CEST) IronPort-SDR: ls6msap1cILC959uVlfeNoRwaSXfkYJ/IQY8z97Rt1TMHZ15rBhk7rc6OD4HMBdi5NOHZOjr8D Lt4TgEWCFFlQ== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="175763324" X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="175763324" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2020 01:17:46 -0700 IronPort-SDR: jL9e3bFwtDD1GdM9HXONzBcRYY4UlIZWoNfLIowoaIQvOD/KvvYO4tObBeHoqNtfKYXZPMDaOl esdb9W5c4P4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="315782781" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.150]) by orsmga002.jf.intel.com with ESMTP; 04 Sep 2020 01:17:45 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Fri, 4 Sep 2020 16:18:38 +0800 Message-Id: <1599207525-22123-31-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1599207525-22123-1-git-send-email-xix.zhang@intel.com> References: <1599207525-22123-1-git-send-email-xix.zhang@intel.com> Subject: [dts] [dts 31/38] tests/TestSuite_pvp_vhost_user_reconnect.py:support meson build 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" Signed-off-by: xizhan4x --- tests/TestSuite_pvp_vhost_user_reconnect.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py index b609115..026e03d 100644 --- a/tests/TestSuite_pvp_vhost_user_reconnect.py +++ b/tests/TestSuite_pvp_vhost_user_reconnect.py @@ -82,13 +82,15 @@ class TestPVPVhostUserReconnect(TestCase): self.tester.send_expect('mkdir -p %s' % self.out_path, '# ') # create an instance to set stream field setting self.pktgen_helper = PacketGeneratorHelper() + self.path=self.dut.apps_name['test-pmd'] + self.testpmd_name = self.path.split("/")[-1] def set_up(self): """ run before each test case. clear the execution ENV """ - self.dut.send_expect("killall -s INT testpmd", "# ") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ") self.dut.send_expect("rm -rf ./vhost-net*", "# ") self.vhost_user = self.dut.new_session(suite="vhost-user") @@ -100,7 +102,7 @@ class TestPVPVhostUserReconnect(TestCase): vdev_info = "" for i in range(self.vm_num): vdev_info += "--vdev 'net_vhost%d,iface=vhost-net%d,client=1,queues=1' " % (i, i) - testcmd = self.dut.base_dir + "/%s/app/testpmd " % self.target + testcmd = self.dut.base_dir + self.path eal_params = self.dut.create_eal_parameters(cores=self.cores, prefix='vhost', ports=[self.pci_info]) para = " -- -i --port-topology=chained --nb-cores=1 --txd=1024 --rxd=1024" self.vhostapp_testcmd = testcmd + eal_params + vdev_info + para @@ -115,7 +117,7 @@ class TestPVPVhostUserReconnect(TestCase): vdev_info = "" for i in range(self.vm_num): vdev_info += "--vdev 'net_vhost%d,iface=vhost-net%d,client=1,queues=1' " % (i, i) - testcmd = self.dut.base_dir + "/%s/app/testpmd " % self.target + testcmd = self.dut.base_dir + self.path eal_params = self.dut.create_eal_parameters(cores=self.cores, no_pci=True, prefix='vhost', ports=[self.pci_info]) para = " -- -i --nb-cores=1 --txd=1024 --rxd=1024" @@ -198,7 +200,7 @@ class TestPVPVhostUserReconnect(TestCase): """ start testpmd in vm """ - vm_testpmd = self.dut.target + "/app/testpmd -c 0x3 -n 4 " + \ + vm_testpmd = self.path+ " -c 0x3 -n 4 " + \ "-- -i --port-topology=chained --txd=1024 --rxd=1024 " for i in range(len(self.vm_dut)): self.vm_dut[i].send_expect(vm_testpmd, "testpmd> ", 20) @@ -329,7 +331,7 @@ class TestPVPVhostUserReconnect(TestCase): # reconnet from vhost self.logger.info('now reconnect from vhost') for i in range(self.reconnect_times): - self.dut.send_expect("killall -s INT testpmd", "# ") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.launch_testpmd_as_vhost_user() self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") self.check_reconnect_perf() @@ -362,7 +364,7 @@ class TestPVPVhostUserReconnect(TestCase): # reconnet from vhost self.logger.info('now reconnect from vhost') for i in range(self.reconnect_times): - self.dut.send_expect("killall -s INT testpmd", "# ") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.launch_testpmd_as_vhost_user() self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") self.check_reconnect_perf() @@ -395,7 +397,7 @@ class TestPVPVhostUserReconnect(TestCase): # reconnet from vhost self.logger.info('now reconnect from vhost') for i in range(self.reconnect_times): - self.dut.send_expect("killall -s INT testpmd", "# ") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.launch_testpmd_as_vhost_user_with_no_pci() self.start_iperf() self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vhost') @@ -433,7 +435,7 @@ class TestPVPVhostUserReconnect(TestCase): # reconnet from vhost self.logger.info('now reconnect from vhost') for i in range(self.reconnect_times): - self.dut.send_expect("killall -s INT testpmd", "# ") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.launch_testpmd_as_vhost_user() self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") self.check_reconnect_perf() @@ -466,7 +468,7 @@ class TestPVPVhostUserReconnect(TestCase): # reconnet from vhost self.logger.info('now reconnect from vhost') for i in range(self.reconnect_times): - self.dut.send_expect("killall -s INT testpmd", "# ") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.launch_testpmd_as_vhost_user() self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") self.check_reconnect_perf() @@ -498,7 +500,7 @@ class TestPVPVhostUserReconnect(TestCase): # reconnet from vhost self.logger.info('now reconnect from vhost') for i in range(self.reconnect_times): - self.dut.send_expect("killall -s INT testpmd", "# ") + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.launch_testpmd_as_vhost_user_with_no_pci() self.start_iperf() self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vhost')