[LTP] [PATCH] runpwtests03:skip read check for cpufreq/stats/reset file

Alexey Kodanev alexey.kodanev@oracle.com
Mon Nov 20 12:52:14 CET 2017


On 11/20/2017 11:01 AM, shuang.qiu@oracle.com wrote:
> From: Shuang Qiu <shuang.qiu@oracle.com>
>
> According to the cpufreq-stats doc,cpufreq/stats/reset is
> write-only attribute of cpu freq sysfs file.
> So skip the cat checking for this file.
>
> Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
> ---
>  testcases/kernel/power_management/runpwtests03.sh |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/testcases/kernel/power_management/runpwtests03.sh b/testcases/kernel/power_management/runpwtests03.sh
> index d4ea88b..00f6e02 100755
> --- a/testcases/kernel/power_management/runpwtests03.sh
> +++ b/testcases/kernel/power_management/runpwtests03.sh
> @@ -35,6 +35,7 @@ check_cpufreq_sysfs_files() {
>  			-name "*" -type f)
>  		for files in ${cpufiles}
>  		do
> +			[ "$files" = "/sys/devices/system/cpu/cpu${cpu}/cpufreq/stats/reset" ] && continue
>  			cat ${files} >/dev/null 2>&1

May be better update the above 'find' command to match only files that
have read permission, e.g. add '-readable' option?

Thanks,
Alexey



More information about the ltp mailing list