test suite reviews and discussions
 help / color / mirror / Atom feed
From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, lei.a.yao@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V1 2/2] tests/power_pbf: resolve high core selection compatibility
Date: Fri,  5 Jun 2020 10:21:46 +0800	[thread overview]
Message-ID: <20200605022146.12015-3-yufengx.mo@intel.com> (raw)
In-Reply-To: <20200605022146.12015-1-yufengx.mo@intel.com>


resolve high core selection compatibility for different pbf cpu topo.
add kill_all to deal with process quit exception.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 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


  parent reply	other threads:[~2020-06-05  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05  2:21 [dts] [PATCH V1 0/2] tests/power_pbf: update test plan and fix compatibility yufengmx
2020-06-05  2:21 ` [dts] [PATCH V1 1/2] tests/power_pbf: add Jansson installation description yufengmx
2020-06-05  2:22   ` Yao, Lei A
2020-06-05  2:21 ` yufengmx [this message]
2020-06-11 12:26 ` [dts] [PATCH V1 0/2] tests/power_pbf: update test plan and fix compatibility Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200605022146.12015-3-yufengx.mo@intel.com \
    --to=yufengx.mo@intel.com \
    --cc=dts@dpdk.org \
    --cc=lei.a.yao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).