Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
title 'Check the configuration to disable c states'
only_if { !os_properties.on_docker? && os_properties.x86? }

if os_properties.ubuntu2004?
describe file('/etc/default/grub') do
it { should exist }
its('content') { should match(/processor.max_cstate=1/) }
its('content') { should match(/intel_idle.max_cstate=1/) }
end
describe file('/boot/grub/grub.cfg') do
it { should exist }
its('content') { should match(/processor.max_cstate=1/) }
its('content') { should match(/intel_idle.max_cstate=1/) }
if os_properties.ubuntu?
%w(/etc/default/grub /boot/grub/grub.cfg).each do |file_path|
describe file(file_path) do
it { should exist }
its('content') { should match(/processor.max_cstate=1/) }
its('content') { should match(/intel_idle.max_cstate=1/) }
end
end
else
describe bash('cpupower idle-info') do
Expand Down
Loading