[LTP] [PATCH] runpwtests03:skip read check for cpufreq/stats/reset file
Shuang Qiu
shuang.qiu@oracle.com
Tue Nov 21 06:04:13 CET 2017
On 11/20/2017 07:52 PM, Alexey Kodanev wrote:
> 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.
That is a better solution.
-readable option takes into account access control lists and other
permissions artefacts which the -perm test ignores,may not work here.
-perm /400 option should work.
I will send another patch.
Thanks
Shuang
>
> Thanks,
> Alexey
>
More information about the ltp
mailing list