Re: [LTP] [PATCH 3/3] pounder/cpufreq: Skip the test if processors are not supported by cpufreq

Cyril Hrubis
2015-08-20T15:59:27Z

Hi!
> # Do any CPU support cpufreq?
> -#CPUFREQ_ENABLED_CPUS=`/bin/ls -lad /sys/devices/system/cpu/cpu*/cpufreq 2> /dev/null | wc -l`
> +CPUFREQ_ENABLED_CPUS=`/bin/ls -lad /sys/devices/system/cpu/cpu*/cpufreq 2> /dev/null | wc -l`

Calling ls by full path is simply wrong.

> -#if [ "$CPUFREQ_ENABLED_CPUS" -lt 1 ]; then
> -# echo "None of your CPUs support cpufreq. Bye."
> -# exit 255
> -#fi
> +if [ "$CPUFREQ_ENABLED_CPUS" -lt 1 ]; then
> + echo "None of your CPUs support cpufreq. Bye."
> + exit 255
> +fi

This part of code was specially disabled in one commit, unfortunately it
does not say why exactly it was disabled. So I'm hesitant to enable it
unless we are sure that the code actually works fine on several
distributions.