From b78de3089d44a7dc5ceb72e3323623e3f99c22ca Mon Sep 17 00:00:00 2001 From: Javi Merino Date: Fri, 16 Sep 2016 10:36:31 +0100 Subject: [PATCH] tests/eas/acceptance: increase accuracy of little cpus test in the Offload Migration testcase The window for test_little_cpus_run_tasks() was loosely defined as just the migrator delay, which doesn't take into account the time it takes for rt-app to spawn and create its tasks. After fa4bce7359ec ("tests/eas/acceptance: Increase required busy time for idle pull test"), the test is more strict, so increase the accuracy of the window to meet the new restrictions. --- tests/eas/acceptance.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/eas/acceptance.py b/tests/eas/acceptance.py index c62d7875..2565968e 100644 --- a/tests/eas/acceptance.py +++ b/tests/eas/acceptance.py @@ -400,6 +400,12 @@ def calculate_end_times(cls): return end_times + def get_migrator_activation_time(self): + start_times_dict = self.m_assert.getStartTime() + start_time = min(t['starttime'] for t in start_times_dict.itervalues()) + + return start_time + OFFLOAD_MIGRATION_MIGRATOR_DELAY + def test_first_cpu_early_starters(self): """Offload Migration and Idle Pull: Test First CPU (Early Starters)""" @@ -470,7 +476,7 @@ def test_little_cpus_run_tasks(self): if not first_task_finish_time or (end_time < first_task_finish_time): first_task_finish_time = end_time - window = (OFFLOAD_MIGRATION_MIGRATOR_DELAY, first_task_finish_time) + window = (self.get_migrator_activation_time(), first_task_finish_time) busy_time = self.a_assert.getCPUBusyTime("cluster", self.env.target.bl.littles, window=window)