From: Joseph Jang <jjang@nvidia.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: "shuah@kernel.org" <shuah@kernel.org>,
"avagin@google.com" <avagin@google.com>,
"amir73il@gmail.com" <amir73il@gmail.com>,
"brauner@kernel.org" <brauner@kernel.org>,
Matt Ochs <mochs@nvidia.com>, Koba Ko <kobak@nvidia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 2/2] selftest: rtc: Check if could access /dev/rtc0 before testing
Date: Tue, 24 Sep 2024 13:37:58 +0800 [thread overview]
Message-ID: <8c92ef18-6648-4348-9008-4f646d8b6956@nvidia.com> (raw)
In-Reply-To: <202406201937464fc96b1c@mail.local>
Hi Alexandre,
Thank you for looking at the rtc patch.
I saw you Acked the [PATCH 2/2], not sure when could we see the patch
in kernel master or next branch ?
Thank you,
Joseph.
On 2024/6/21 3:37 AM, Alexandre Belloni wrote:
> On 23/05/2024 18:38:07-0700, Joseph Jang wrote:
>> The rtctest requires the read permission on /dev/rtc0. The rtctest will
>> be skipped if the /dev/rtc0 is not readable.
>>
>> Reviewed-by: Koba Ko <kobak@nvidia.com>
>> Reviewed-by: Matthew R. Ochs <mochs@nvidia.com>
>> Signed-off-by: Joseph Jang <jjang@nvidia.com>
>
> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
>
>> ---
>> tools/testing/selftests/rtc/rtctest.c | 11 ++++++++++-
>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c
>> index 2b12497eb30d..d104f5326cf4 100644
>> --- a/tools/testing/selftests/rtc/rtctest.c
>> +++ b/tools/testing/selftests/rtc/rtctest.c
>> @@ -483,6 +483,8 @@ __constructor_order_last(void)
>>
>> int main(int argc, char **argv)
>> {
>> + int ret = -1;
>> +
>> switch (argc) {
>> case 2:
>> rtc_file = argv[1];
>> @@ -494,5 +496,12 @@ int main(int argc, char **argv)
>> return 1;
>> }
>>
>> - return test_harness_run(argc, argv);
>> + /* Run the test if rtc_file is accessible */
>> + if (access(rtc_file, R_OK) == 0)
>> + ret = test_harness_run(argc, argv);
>> + else
>> + ksft_exit_skip("[SKIP]: Cannot access rtc file %s - Exiting\n",
>> + rtc_file);
>> +
>> + return ret;
>> }
>> --
>> 2.34.1
>>
>
next prev parent reply other threads:[~2024-09-24 5:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 1:38 [PATCH 0/2] selftest: rtc: Add rtc feature detection and rtc file check Joseph Jang
2024-05-24 1:38 ` [PATCH 1/2] selftest: rtc: Add to check rtc alarm status for alarm related test Joseph Jang
2024-06-20 19:36 ` Alexandre Belloni
2024-06-24 1:35 ` Joseph Jang
2024-06-24 1:43 ` Joseph Jang
2024-10-18 4:26 ` Joseph Jang
2024-10-18 8:27 ` Alexandre Belloni
2024-10-18 15:42 ` Shuah Khan
2024-05-24 1:38 ` [PATCH 2/2] selftest: rtc: Check if could access /dev/rtc0 before testing Joseph Jang
2024-06-20 19:37 ` Alexandre Belloni
2024-09-24 5:37 ` Joseph Jang [this message]
2024-09-24 16:05 ` Shuah Khan
2024-09-24 19:31 ` Alexandre Belloni
2024-09-24 19:57 ` Shuah Khan
2024-10-18 4:18 ` Joseph Jang
2024-10-18 15:39 ` Shuah Khan
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=8c92ef18-6648-4348-9008-4f646d8b6956@nvidia.com \
--to=jjang@nvidia.com \
--cc=alexandre.belloni@bootlin.com \
--cc=amir73il@gmail.com \
--cc=avagin@google.com \
--cc=brauner@kernel.org \
--cc=kobak@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mochs@nvidia.com \
--cc=shuah@kernel.org \
/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