def test_all_tasks_finish_on_a_big_cpu(self): """Offload Migration and Idle Pull: All tasks finish on a big cpu Note: this test may fail in big.LITTLE systems where the little cpus' performance is comparable to the bigs' and they can take almost the same time as a big cpu to complete a task. """ for task in self.params.keys(): sa = SchedAssert(self.trace, self.env.topology, execname=task) msg = "Task {} did not finish on a big cpu".format(task) self.assertIn(sa.getLastCpu(), self.env.target.bl.bigs, msg=msg)
def test_get_last_cpu(self): """SchedAssert.getLastCpu() gives you the last cpu in which a task ran""" expected_last_cpu = 5 sa = SchedAssert("trace.dat", self.topology, execname="ls") self.assertEqual(sa.getLastCpu(), expected_last_cpu)