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 F0E02A00C4; Fri, 5 Jun 2020 04:20:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE07D1D618; Fri, 5 Jun 2020 04:20:38 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id A385C1D603 for ; Fri, 5 Jun 2020 04:20:36 +0200 (CEST) IronPort-SDR: phQdNSXEl91xI4jSc9agITK6u2rihUHg6dGP/9FjFj5VB3OTFA9acihZBMZlBtr0YAAGDKTcS5 vOG3p5Wjj6XQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2020 19:20:35 -0700 IronPort-SDR: IHiM6VLsWqSECYOhkfhX8O5s8HeTlpsyV+7RDF2k5aDnXvZCDN/l9AjfilhqYHyYgAFNr2KA32 tx4DvVsTGZDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,474,1583222400"; d="scan'208";a="417123025" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.208]) by orsmga004.jf.intel.com with ESMTP; 04 Jun 2020 19:20:34 -0700 From: yufengmx To: dts@dpdk.org, lei.a.yao@intel.com Cc: yufengmx Date: Fri, 5 Jun 2020 10:21:46 +0800 Message-Id: <20200605022146.12015-3-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200605022146.12015-1-yufengx.mo@intel.com> References: <20200605022146.12015-1-yufengx.mo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1 2/2] tests/power_pbf: resolve high core selection compatibility 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" resolve high core selection compatibility for different pbf cpu topo. add kill_all to deal with process quit exception. Signed-off-by: yufengmx --- tests/TestSuite_power_pbf.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_power_pbf.py b/tests/TestSuite_power_pbf.py index 8fcab51..eb5a16e 100644 --- a/tests/TestSuite_power_pbf.py +++ b/tests/TestSuite_power_pbf.py @@ -339,17 +339,15 @@ class TestPowerPbf(TestCase): def get_high_freq_cores_index(self, number=1): ''' get one random high frequency core index, ignore core 0 ''' high_freq = max(self.base_freqs_info.keys()) - cores_index = self.base_freqs_info[high_freq][1:number] \ - if self.base_freqs_info[high_freq][0] == 0 else \ - self.base_freqs_info[high_freq][:number] + cores_index = self.base_freqs_info[high_freq][-number:] return cores_index def get_high_freq_core_mask(self, number=1, min_cores=5): index_list = [] # get high frequency core first - cores_index = self.get_high_freq_cores_index(number + 1) + cores_index = self.get_high_freq_cores_index(number) [index_list.append(core_index) for core_index in cores_index] - high_freq_cores = index_list[1:] + high_freq_cores = index_list[:] # get normal cores to make sure minimum cores are enough cores_index = self.get_normal_cores_index() for core_index in cores_index: @@ -622,7 +620,7 @@ class TestPowerPbf(TestCase): """ Run after each test case. """ - pass + self.dut.kill_all() def tear_down_all(self): """ -- 2.21.0