mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +00:00
Fix: cpuidle check directory name when numerating idle states
Do not assume that all directories under cpuidle/ represent states; check that the directory name starts with "state" before trying to parse it.
This commit is contained in:
parent
9d5e0cdc00
commit
49d7072440
@ -98,7 +98,8 @@ class Cpuidle(Module):
|
||||
states_dir = self.device.path.join(self.device.path.dirname(self.root_path), cpu, 'cpuidle')
|
||||
idle_states = []
|
||||
for state in self.device.listdir(states_dir):
|
||||
idle_states.append(CpuidleState(self.device, self.device.path.join(states_dir, state)))
|
||||
if state.startswith('state'):
|
||||
idle_states.append(CpuidleState(self.device, self.device.path.join(states_dir, state)))
|
||||
return idle_states
|
||||
|
||||
def _on_device_init(self, context): # pylint: disable=unused-argument
|
||||
|
Loading…
x
Reference in New Issue
Block a user