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 2F208A04B7; Wed, 2 Sep 2020 11:14:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 232C11C08C; Wed, 2 Sep 2020 11:14:25 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DF32B1C0C2 for ; Wed, 2 Sep 2020 11:14:21 +0200 (CEST) IronPort-SDR: LCZMILnk+0t7nnowLokmTar4pP6r7bYVhU1STJIlAoxx+7u0zs5xdJpfhpYYygneDOi9YgjtBw bSWTq4wdZ25g== X-IronPort-AV: E=McAfee;i="6000,8403,9731"; a="158348279" X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="158348279" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 02:14:21 -0700 IronPort-SDR: dbZO2IgzPyA4jtmRzsvSzZhfYyPwROqUavtCQY5FH/2qIlxdRsRX5LtgYbUF7cjnBAiVVaqfxM vB6zG5NL040A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="405099326" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by fmsmga001.fm.intel.com with ESMTP; 02 Sep 2020 02:14:20 -0700 From: Xie wei To: dts@dpdk.org Cc: Xie wei Date: Wed, 2 Sep 2020 17:15:09 +0800 Message-Id: <20200902091510.6043-8-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902091510.6043-1-weix.xie@intel.com> References: <20200902091510.6043-1-weix.xie@intel.com> Subject: [dts] [dts 7/8] tests/TestSuite_vm_power_manager:support meson build method 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: Xie wei --- tests/TestSuite_vm_power_manager.py | 31 ++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/tests/TestSuite_vm_power_manager.py b/tests/TestSuite_vm_power_manager.py index c34d38c..00910eb 100644 --- a/tests/TestSuite_vm_power_manager.py +++ b/tests/TestSuite_vm_power_manager.py @@ -90,8 +90,11 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator): "examples/vm_power_manager/guest_cli") self.verify("Error" not in out, "Compilation error") self.verify("No such" not in out, "Compilation error") - self.vm_power_dir = "./examples/vm_power_manager/" - mgr_cmd = self.vm_power_dir + "build/vm_power_mgr -c 0x7 -n 4" + + self.path = self.vm_dut.apps_name['guest_cli'] + self.guest_cmd = self.path + "-c 0xf -n 4 -- --vm-name=%s --vcpu-list=0,1,2,3" % self.vm_name + self.vm_power_dir = self.vm_dut.apps_name['vm_power_manager'] + mgr_cmd = self.vm_power_dir + "-c 0x7 -n 4" out = self.dut.send_expect(mgr_cmd, "vmpower>", 120) self.dut.send_expect("add_vm %s" % self.vm_name, "vmpower>") self.dut.send_expect("add_channels %s all" % self.vm_name, "vmpower>") @@ -113,9 +116,7 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator): Check power monitor channel connection """ # check Channels and vcpus - guest_cmd = self.vm_power_dir + \ - "guest_cli/build/guest_vm_power_mgr -c 0xf -n 4 -- --vm-name=%s --vcpu-list=0,1,2,3" % self.vm_name - out = self.vm_dut.send_expect(guest_cmd, "vmpower\(guest\)>", 120) + out = self.vm_dut.send_expect(self.guest_cmd, "vmpower\(guest\)>", 120) self.vm_dut.send_expect("quit", "# ") def get_cpu_frequency(self, core_id): @@ -132,9 +133,7 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator): """ Check host cpu frequency can scale down in VM """ - guest_cmd = self.vm_power_dir + \ - "guest_cli/build/guest_vm_power_mgr -c 0xf -n 4 -- --vm-name=%s --vcpu-list=0,1,2,3" % self.vm_name - out = self.vm_dut.send_expect(guest_cmd, "vmpower\(guest\)>", 120) + out = self.vm_dut.send_expect(self.guest_cmd, "vmpower\(guest\)>", 120) for vcpu in range(self.core_num): self.vm_dut.send_expect( @@ -162,9 +161,7 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator): """ Check host cpu frequency can scale up in VM """ - guest_cmd = self.vm_power_dir + \ - "guest_cli/build/guest_vm_power_mgr -c 0xf -n 4 -- --vm-name=%s --vcpu-list=0,1,2,3" % self.vm_name - out = self.vm_dut.send_expect(guest_cmd, "vmpower\(guest\)>", 120) + out = self.vm_dut.send_expect(self.guest_cmd, "vmpower\(guest\)>", 120) for vcpu in range(self.core_num): self.vm_dut.send_expect( @@ -189,9 +186,7 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator): """ Check host cpu frequency can scale to max in VM """ - guest_cmd = self.vm_power_dir + \ - "guest_cli/build/guest_vm_power_mgr -c 0xf -n 4 -- --vm-name=%s --vcpu-list=0,1,2,3" % self.vm_name - out = self.vm_dut.send_expect(guest_cmd, "vmpower\(guest\)>", 120) + out = self.vm_dut.send_expect(self.guest_cmd, "vmpower\(guest\)>", 120) max_freq_path = "cat /sys/devices/system/cpu/cpu%s/cpufreq/" + \ "cpuinfo_max_freq" @@ -212,9 +207,7 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator): """ Check host cpu frequency can scale to min in VM """ - guest_cmd = self.vm_power_dir + \ - "guest_cli/build/guest_vm_power_mgr -c 0xf -n 4 -- --vm-name=%s --vcpu-list=0,1,2,3" % self.vm_name - out = self.vm_dut.send_expect(guest_cmd, "vmpower\(guest\)>", 120) + out = self.vm_dut.send_expect(self.guest_cmd, "vmpower\(guest\)>", 120) min_freq_path = "cat /sys/devices/system/cpu/cpu%s/cpufreq/" + \ "cpuinfo_min_freq" @@ -276,9 +269,7 @@ class TestVmPowerManager(TestCase, IxiaPacketGenerator): self.verify("Error" not in out, "Compilation error") self.verify("No such" not in out, "Compilation error") - guest_cmd = self.vm_power_dir + \ - "guest_cli/build/guest_vm_power_mgr -c 0xf -n 4 -- --vm-name=%s --vcpu-list=0,1,2,3" % self.vm_name - out = vm2_dut.send_expect(guest_cmd, "vmpower\(guest\)>", 120) + out = vm2_dut.send_expect(self.guest_cmd, "vmpower\(guest\)>", 120) vm2_dut.send_expect("quit", "# ") vm2.stop() -- 2.17.1