Skip to content

Commit e9fac59

Browse files
committed
DCVS script fix
Signed-off-by: Vamsee Narapareddi <[email protected]>
1 parent 1801f32 commit e9fac59

File tree

1 file changed

+15
-7
lines changed
  • Runner/suites/Kernel/FunctionalArea/DCVS/Freq_Scaling

1 file changed

+15
-7
lines changed

Runner/suites/Kernel/FunctionalArea/DCVS/Freq_Scaling/run.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,24 @@ check_kernel_config "$CONFIGS" || {
4949
CPUFREQ_BASE_PATH="/sys/devices/system/cpu"
5050
i=0
5151

52-
while [ "$i" -le 7 ]; do
53-
CPUFREQ_PATH="$CPUFREQ_BASE_PATH/cpu$i/cpufreq"
54-
if [ ! -d "$CPUFREQ_PATH" ]; then
55-
log_fail "CPUFreq interface not found for cpu$i"
56-
echo "$TESTNAME FAIL" > "$res_file"
57-
exit 1
52+
miss=0
53+
54+
for cpu_dir in /sys/devices/system/cpu/cpu[0-8]*; do
55+
CPUFREQ_PATH="$cpu_dir/cpufreq"
56+
if [ -d "$CPUFREQ_PATH" ]; then
57+
cpu_name="${cpu_dir##*/}"
58+
log_pass "$cpu_name has cpufreq interface"
59+
else
60+
miss=1
5861
fi
59-
i=`expr "$i" + 1`
6062
done
6163

64+
if [ "$miss" -eq 1 ]; then
65+
echo "CPUFreq interface not found. Test Failed"
66+
echo "$TESTNAME FAIL" > "$res_file"
67+
exit 1
68+
fi
69+
6270
log_info "Reading scaling governor..."
6371
GOVERNOR=$(cat $CPUFREQ_PATH/scaling_governor)
6472
log_info "Current governor: $GOVERNOR"

0 commit comments

Comments
 (0)