From 36143b8df147977136dee14f60dab30c7e5cbc65 Mon Sep 17 00:00:00 2001 From: Dietmar Eggemann Date: Mon, 28 May 2018 17:07:18 +0200 Subject: [PATCH 1/2] tests/eas/generic.py: Remove configuration item sched_features The new Energy Model/EAS mainline code does not use the ENERGY_AWARE sched feature any more. Disable it temporarily. We don't have feedback from lkml about the new Energy Model/EAS mainline code yet so I would like to avoid to change the test code permanently. Once we can be more certain that this sched feature is not needed any more it would have to be removed. This will allow that the generic tests run against a target with the new Energy Model/EAS mainline code. Signed-off-by: Dietmar Eggemann --- tests/eas/generic.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/eas/generic.py b/tests/eas/generic.py index b9acb4f62..336574213 100644 --- a/tests/eas/generic.py +++ b/tests/eas/generic.py @@ -89,7 +89,6 @@ class _EnergyModelTest(LisaTest): conf = { 'tag' : 'energy_aware', 'flags' : ['ftrace', 'freeze_userspace'], - 'sched_features' : 'ENERGY_AWARE', } if 'cpufreq' in test_env.target.modules: -- GitLab From 20d4d534570ed03f817526afd3c44a0a4ab190ca Mon Sep 17 00:00:00 2001 From: Dietmar Eggemann Date: Mon, 28 May 2018 17:18:11 +0200 Subject: [PATCH 2/2] tests/eas/generic.py: Add slack logging per task in _EnergyModelTest::_test_slack The slack test case allows a task slack error percentage of 15%. In case a test case passes it is impossible to know if it did so with 0% or almost 15% error rate. Log the slack percentage value per task to make even in case the task stays under the slack error percentage to make it easier to post process a test run. Signed-off-by: Dietmar Eggemann --- tests/eas/generic.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/eas/generic.py b/tests/eas/generic.py index 336574213..7863b3a28 100644 --- a/tests/eas/generic.py +++ b/tests/eas/generic.py @@ -16,6 +16,7 @@ # import os +import logging import numpy as np import pandas as pd import matplotlib.pyplot as plt @@ -75,6 +76,8 @@ class _EnergyModelTest(LisaTest): def setUpClass(cls, *args, **kwargs): super(_EnergyModelTest, cls).runExperiments(*args, **kwargs) + cls._log = logging.getLogger('_EnergyModelTest') + @classmethod def _getExperimentsConf(cls, test_env): if not test_env.nrg_model: @@ -343,9 +346,14 @@ class _EnergyModelTest(LisaTest): slack = pa.df(task)["Slack"] bad_activations_pct = len(slack[slack < 0]) * 100. / len(slack) + + msg = 'task {} missed {}% of activations ({}% allowed)'.format( + task, bad_activations_pct, self.negative_slack_allowed_pct) + if bad_activations_pct > self.negative_slack_allowed_pct: - raise AssertionError("task {} missed {}% of activations".format( - task, bad_activations_pct)) + raise AssertionError(msg) + else: + self._log.info(msg) def _test_task_placement(self, experiment, tasks): """ -- GitLab