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 090CFA04DD; Thu, 22 Oct 2020 03:11:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D6A046A1A; Thu, 22 Oct 2020 03:11:16 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A59AE69FD for ; Thu, 22 Oct 2020 03:11:14 +0200 (CEST) IronPort-SDR: 4ASNSYoe/cE9QE+XM9MLTEbtyQkAKBCbwr/89XemUlKB5EnHM/JEQ9McAzlFp7uKNxdr6H8RtH vgchB3p4NUmQ== X-IronPort-AV: E=McAfee;i="6000,8403,9781"; a="155238857" X-IronPort-AV: E=Sophos;i="5.77,402,1596524400"; d="scan'208";a="155238857" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2020 18:10:54 -0700 IronPort-SDR: xST5Sxy738il30vNZHuICHkL2s7kNWcBFhxh+rxCl4Vb7eyxK+kXS+JabSrJwSfVw8QDXIqUaP jHRE2N2lxjzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,402,1596524400"; d="scan'208";a="321204547" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.174]) by orsmga006.jf.intel.com with ESMTP; 21 Oct 2020 18:10:53 -0700 From: LihongX Ma To: dts@dpdk.org Cc: LihongX Ma Date: Thu, 22 Oct 2020 01:36:19 +0800 Message-Id: <1603301779-28431-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] tests/dpdk_hugetlbfs_mount_size: get the app path from config instead of hard code 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" modify suite to get the path of testpmd from conf file Signed-off-by: LihongX Ma --- tests/TestSuite_dpdk_hugetlbfs_mount_size.py | 37 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/tests/TestSuite_dpdk_hugetlbfs_mount_size.py b/tests/TestSuite_dpdk_hugetlbfs_mount_size.py index de52323..25c4ed2 100644 --- a/tests/TestSuite_dpdk_hugetlbfs_mount_size.py +++ b/tests/TestSuite_dpdk_hugetlbfs_mount_size.py @@ -70,6 +70,7 @@ class DpdkHugetlbfsMountSize(TestCase): self.socket_mem = "0,1024" self.socket_mem2 = "0,2048" self.umount_huge([DEFAULT_MNT]) + self.app_path = self.dut.apps_name['test-pmd'] def set_up(self): @@ -115,8 +116,8 @@ class DpdkHugetlbfsMountSize(TestCase): # Bind one nic port to igb_uio driver, launch testpmd self.dut.send_expect("mount -t hugetlbfs hugetlbfs %s" % MNT_PATH[0], "#", 15) self.logger.info("test default hugepage size start testpmd without numa") - ttd = './%s/app/testpmd -l %s -n %d --huge-dir %s --file-prefix=%s -w %s -- -i' - launch_ttd = ttd % (self.target, self.core_list1, self.mem_channels, MNT_PATH[0], vhost_name[0], self.pci_info_0) + ttd = '%s -l %s -n %d --huge-dir %s --file-prefix=%s -w %s -- -i' + launch_ttd = ttd % (self.app_path, self.core_list1, self.mem_channels, MNT_PATH[0], vhost_name[0], self.pci_info_0) self.dut.send_expect(launch_ttd, "testpmd> ", 120) self.dut.send_expect("set promisc all off", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) @@ -127,8 +128,8 @@ class DpdkHugetlbfsMountSize(TestCase): # resart testpmd with numa support self.logger.info("test default hugepage size start testpmd with numa") - ttd_secondary = './%s/app/testpmd -l %s -n %d --huge-dir %s --file-prefix=%s -w %s -- -i --numa' - launch_ttd_secondary = ttd_secondary % (self.target, self.core_list1, self.mem_channels, MNT_PATH[0], vhost_name[0], self.pci_info_0) + ttd_secondary = '%s -l %s -n %d --huge-dir %s --file-prefix=%s -w %s -- -i --numa' + launch_ttd_secondary = ttd_secondary % (self.app_path, self.core_list1, self.mem_channels, MNT_PATH[0], vhost_name[0], self.pci_info_0) self.dut.send_expect(launch_ttd_secondary, "testpmd> ", 120) self.dut.send_expect("set promisc all off", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) @@ -146,18 +147,18 @@ class DpdkHugetlbfsMountSize(TestCase): self.dut.send_expect("mount -t hugetlbfs -o size=4G hugetlbfs %s" % MNT_PATH[1], "#", 15) self.logger.info("start first testpmd") - ttd = 'numactl --membind=%d ./%s/app/testpmd -l %s -n %d --legacy-mem --socket-mem %s' \ + ttd = 'numactl --membind=%d %s -l %s -n %d --legacy-mem --socket-mem %s' \ ' --huge-dir %s --file-prefix=%s -w %s -- -i --socket-num=%d --no-numa' - launch_ttd = ttd % (self.numa_id, self.target, self.core_list1, self.mem_channels, self.socket_mem2, MNT_PATH[0], vhost_name[0], self.pci_info_0, self.numa_id) + launch_ttd = ttd % (self.numa_id, self.app_path, self.core_list1, self.mem_channels, self.socket_mem2, MNT_PATH[0], vhost_name[0], self.pci_info_0, self.numa_id) self.session_first.send_expect(launch_ttd, "testpmd> ", 120) self.session_first.send_expect("set promisc all off", "testpmd> ", 120) self.session_first.send_expect("start", "testpmd> ", 120) self.session_first.send_expect("clear port stats all", "testpmd> ", 120) self.logger.info("start secondary testpmd") - ttd_secondary = 'numactl --membind=%d ./%s/app/testpmd -l %s -n %d --legacy-mem --socket-mem %s' \ + ttd_secondary = 'numactl --membind=%d %s -l %s -n %d --legacy-mem --socket-mem %s' \ ' --huge-dir %s --file-prefix=%s -w %s -- -i --socket-num=%d --no-numa' - launch_ttd_secondary = ttd_secondary % (self.numa_id, self.target, self.core_list2, self.mem_channels, self.socket_mem2, MNT_PATH[1], vhost_name[1], self.pci_info_1, self.numa_id) + launch_ttd_secondary = ttd_secondary % (self.numa_id, self.app_path, self.core_list2, self.mem_channels, self.socket_mem2, MNT_PATH[1], vhost_name[1], self.pci_info_1, self.numa_id) self.session_secondary.send_expect(launch_ttd_secondary, "testpmd> ", 120) self.session_secondary.send_expect("set promisc all off", "testpmd> ", 120) self.session_secondary.send_expect("start", "testpmd> ", 120) @@ -174,8 +175,8 @@ class DpdkHugetlbfsMountSize(TestCase): def test_mount_size_greater_than_hugepage_size_single_mount_point(self): # Bind one nic port to igb_uio driver self.dut.send_expect("mount -t hugetlbfs -o size=9G hugetlbfs %s" % MNT_PATH[0], "#", 15) - ttd = './%s/app/testpmd -l %s -n %d --legacy-mem --huge-dir %s --file-prefix=%s -w %s -- -i' - launch_ttd = ttd % (self.target, self.core_list1, self.mem_channels, MNT_PATH[0], vhost_name[0], self.pci_info_0) + ttd = '%s -l %s -n %d --legacy-mem --huge-dir %s --file-prefix=%s -w %s -- -i' + launch_ttd = ttd % (self.app_path, self.core_list1, self.mem_channels, MNT_PATH[0], vhost_name[0], self.pci_info_0) self.dut.send_expect(launch_ttd, "testpmd> ", 120) self.dut.send_expect("set promisc all off", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) @@ -194,9 +195,9 @@ class DpdkHugetlbfsMountSize(TestCase): self.dut.send_expect("mount -t hugetlbfs -o size=1G hugetlbfs %s" % MNT_PATH[2], "#", 15) # launch first testpmd self.logger.info("launch first testpmd") - ttd = 'numactl --membind=%d ./%s/app/testpmd -l %s -n %d --legacy-mem --socket-mem %s --huge-dir %s' \ + ttd = 'numactl --membind=%d %s -l %s -n %d --legacy-mem --socket-mem %s --huge-dir %s' \ ' --file-prefix=%s -w %s -- -i --socket-num=%d --no-numa' - launch_ttd = ttd % (self.numa_id, self.target, self.core_list1, self.mem_channels, self.socket_mem2, MNT_PATH[0], vhost_name[0], self.pci_info_0, self.numa_id) + launch_ttd = ttd % (self.numa_id, self.app_path, self.core_list1, self.mem_channels, self.socket_mem2, MNT_PATH[0], vhost_name[0], self.pci_info_0, self.numa_id) self.session_first.send_expect(launch_ttd, "testpmd> ", 120) self.session_first.send_expect("set promisc all off", "testpmd> ", 120) self.session_first.send_expect("start", "testpmd> ", 120) @@ -204,9 +205,9 @@ class DpdkHugetlbfsMountSize(TestCase): # launch secondary testpmd self.logger.info("launch secondary testpmd") - ttd_secondary = 'numactl --membind=%d ./%s/app/testpmd -l %s -n %d --legacy-mem --socket-mem %s --huge-dir' \ + ttd_secondary = 'numactl --membind=%d %s -l %s -n %d --legacy-mem --socket-mem %s --huge-dir' \ ' %s --file-prefix=%s -w %s -- -i --socket-num=%d --no-numa' - launch_ttd_secondary = ttd_secondary % (self.numa_id, self.target, self.core_list2, self.mem_channels, self.socket_mem2, MNT_PATH[1], vhost_name[1], self.pci_info_0, self.numa_id) + launch_ttd_secondary = ttd_secondary % (self.numa_id, self.app_path, self.core_list2, self.mem_channels, self.socket_mem2, MNT_PATH[1], vhost_name[1], self.pci_info_0, self.numa_id) self.session_secondary.send_expect(launch_ttd_secondary, "testpmd> ", 120) self.session_secondary.send_expect("set promisc all off", "testpmd> ", 120) self.session_secondary.send_expect("start", "testpmd> ", 120) @@ -214,9 +215,9 @@ class DpdkHugetlbfsMountSize(TestCase): # launch third testpmd self.logger.info("launch third testpmd") - ttd_third = 'numactl --membind=%d ./%s/app/testpmd -l %s -n %d --legacy-mem --socket-mem %s --huge-dir' \ + ttd_third = 'numactl --membind=%d %s -l %s -n %d --legacy-mem --socket-mem %s --huge-dir' \ ' %s --file-prefix=%s -w %s -- -i --socket-num=%d --no-numa' - launch_ttd_third = ttd_third % (self.numa_id, self.target, self.core_list3, self.mem_channels, self.socket_mem, MNT_PATH[2], vhost_name[2], self.pci_info_0, self.numa_id) + launch_ttd_third = ttd_third % (self.numa_id, self.app_path, self.core_list3, self.mem_channels, self.socket_mem, MNT_PATH[2], vhost_name[2], self.pci_info_0, self.numa_id) expect_str = 'Not enough memory available on socket' self.dut.get_session_output(timeout=2) try: @@ -246,8 +247,8 @@ class DpdkHugetlbfsMountSize(TestCase): self.dut.send_expect("mount -t hugetlbfs nodev %s" % MNT_PATH[0], "#", 15) self.dut.send_expect("cgcreate -g hugetlb:/test-subgroup", "# ", 15) self.dut.send_expect("cgset -r hugetlb.1GB.limit_in_bytes=2147483648 test-subgroup", "#", 15) - ttd = 'cgexec -g hugetlb:test-subgroup numactl -m %d ./%s/app/testpmd -l %s -n %d -w %s -- -i --socket-num=%d --no-numa' - launch_ttd = ttd % (self.numa_id, self.target, self.core_list1, self.mem_channels, self.pci_info_0, self.numa_id) + ttd = 'cgexec -g hugetlb:test-subgroup numactl -m %d %s -l %s -n %d -w %s -- -i --socket-num=%d --no-numa' + launch_ttd = ttd % (self.numa_id, self.app_path, self.core_list1, self.mem_channels, self.pci_info_0, self.numa_id) self.dut.send_expect(launch_ttd, "testpmd> ", 120) self.dut.send_expect("set promisc all off", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) -- 2.7.4