From e9b6ff3730619604e9146cc464f7b74e3a7f97e9 Mon Sep 17 00:00:00 2001 From: Himani Anil Deshpande Date: Wed, 19 Mar 2025 17:04:20 -0400 Subject: [PATCH] [Kitchen test] Add Ubuntu Os for C_state Install phase tests --- .../test/controls/c_states_spec.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/cookbooks/aws-parallelcluster-platform/test/controls/c_states_spec.rb b/cookbooks/aws-parallelcluster-platform/test/controls/c_states_spec.rb index 86b5686008..e560019afd 100644 --- a/cookbooks/aws-parallelcluster-platform/test/controls/c_states_spec.rb +++ b/cookbooks/aws-parallelcluster-platform/test/controls/c_states_spec.rb @@ -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