Skip to content

Commit

Permalink
tests/eas/acceptance: increase accuracy of little cpus test in the Of…
Browse files Browse the repository at this point in the history
…fload 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
fa4bce7 ("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.
  • Loading branch information
Javi Merino committed Sep 16, 2016
1 parent cf9fad2 commit b78de30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/eas/acceptance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)"""

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b78de30

Please sign in to comment.