public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Shuang Qiu <shuang.qiu@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] runpwtests03:skip read check for cpufreq/stats/reset file
Date: Tue, 21 Nov 2017 13:04:13 +0800	[thread overview]
Message-ID: <5A13B3CD.8070607@oracle.com> (raw)
In-Reply-To: <1db5e071-42ca-5cc7-f9d9-e28abd25e01e@oracle.com>

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
>



      reply	other threads:[~2017-11-21  5:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20  8:01 [LTP] [PATCH] runpwtests03:skip read check for cpufreq/stats/reset file shuang.qiu
2017-11-20 11:52 ` Alexey Kodanev
2017-11-21  5:04   ` Shuang Qiu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A13B3CD.8070607@oracle.com \
    --to=shuang.qiu@oracle.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox