unhandled exception when running cpufreq_test.py as a non-root user
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Fix Released
|
Medium
|
Jeff Lane |
Bug Description
Forgot to use sudo to run cpufreq_test.py manually and instead of a useful message I got a traceback:
$ /usr/lib/
-------
| CpuFreqTest Begin |
-------
* disabling thread siblings (hyperthreading):
- disabling cores: {4, 5, 6, 7}
Unable to write file: /sys/devices/
ERROR: Unable to write file: /sys/devices/
Traceback (most recent call last):
File "/usr/lib/
with open(abs_path, 'wb') as _file:
PermissionError: [Errno 13] Permission denied: '/sys/devices/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
sys.
File "/usr/lib/
return cpu_freq_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
'Unable to write file: %s' % abs_path)
__main_
This exception should be handled (and realistically, should never be hit, the script should immeidately exit if the user is not root/sudo)
Related branches
- Jonathan Cave (community): Approve
-
Diff: 24 lines (+5/-1)1 file modifiedbin/cpufreq_test.py (+5/-1)
Changed in plainbox-provider-checkbox: | |
assignee: | Adrian Lane (alanec) → Jeff Lane (bladernr) |
status: | Confirmed → In Progress |
milestone: | none → 0.58.0 |
Changed in plainbox-provider-checkbox: | |
status: | In Progress → Fix Committed |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |