harness: proc_mgmt_test: improve core selection for test runner
@@ -24,7 +24,11 @@ class ProcMgmtTest(TestCommon):
def get_modules(self, build, machine):
modules = super(ProcMgmtTest, self).get_modules(build, machine)
- modules.add_module("proc_mgmt_test", ["core=3", "0", "starter"])
+ # ensure we never try to run the test runner on a core that doesn't
+ # exist.
+ ncores = machine.get_ncores()
+ testcore = ncores - 1 if ncores < 4 else 3
+ modules.add_module("proc_mgmt_test", ["core=%d" % testcore, "0", "starter"])
return modules
def get_finish_string(self):
