1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-07 13:40:48 +00:00

cpufreq: Add possible error message for failing to set governor

I have observerd the error message "write error: Invalid argument"
when using set_all_governors to set a non-existent governor on a
buildroot Linux system
This commit is contained in:
Brendan Jackman 2017-06-06 14:56:57 +01:00
parent 2e106c9f70
commit 0cac92af27

View File

@ -382,7 +382,9 @@ class CpufreqModule(Module):
'cpufreq_set_all_governors {}'.format(governor), 'cpufreq_set_all_governors {}'.format(governor),
as_root=True) as_root=True)
except TargetError as e: except TargetError as e:
if "echo: I/O error" in str(e): if ("echo: I/O error" in str(e) or
"write error: Invalid argument" in str(e)):
cpus_unsupported = [c for c in self.target.list_online_cpus() cpus_unsupported = [c for c in self.target.list_online_cpus()
if governor not in self.list_governors(c)] if governor not in self.list_governors(c)]
raise TargetError("Governor {} unsupported for CPUs {}".format( raise TargetError("Governor {} unsupported for CPUs {}".format(