From 43fc558549166fd5099b656f116a549c9540952f Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Tue, 28 Mar 2017 18:42:32 +0100 Subject: [PATCH] tests/eas/preliminary: Add test for presence of energy model --- tests/eas/preliminary.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/eas/preliminary.py b/tests/eas/preliminary.py index 8cb12b84f..920848e5c 100644 --- a/tests/eas/preliminary.py +++ b/tests/eas/preliminary.py @@ -164,3 +164,13 @@ class TestWorkThroughput(BasicCheckTest): msg='Work done did not scale with CPU Freq on CPUs: {}'\ .format(failed_cpus) self.assertFalse(len(failed_cpus), msg=msg) + +class TestEnergyModelPresent(BasicCheckTest): + def test_energy_model_present(self): + """Test that we can see the energy model in sysctl""" + if not self.target.file_exists( + '/proc/sys/kernel/sched_domain/cpu0/domain0/group0/energy/'): + raise AssertionError( + 'No energy model visible in procfs. Possible causes: \n' + '- Kernel built without (CONFIG_SCHED_DEBUG && CONFIG_SYSCTL)\n' + '- No energy model in kernel') -- GitLab