From: keescook at chromium.org (Kees Cook)
Subject: [PATCH 2/2] selftests: rtc: rtctest: specify timeouts
Date: Thu, 23 May 2019 15:50:02 -0700 [thread overview]
Message-ID: <201905231549.C19B7A21@keescook> (raw)
In-Reply-To: <20190523224223.11054-3-alexandre.belloni@bootlin.com>
On Fri, May 24, 2019 at 12:42:23AM +0200, Alexandre Belloni wrote:
> uie_read is a commonly failing test that will block forever on buggy rtc
> drivers. Shorten its timeout so it fails earlier. Also increase the timeout
> for the two alarm test on a minute boundary.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>
Reviewed-by: Kees Cook <keescook at chromium.org>
> ---
> tools/testing/selftests/rtc/rtctest.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c
> index b2065536d407..66af608fb4c6 100644
> --- a/tools/testing/selftests/rtc/rtctest.c
> +++ b/tools/testing/selftests/rtc/rtctest.c
> @@ -49,7 +49,7 @@ TEST_F(rtc, date_read) {
> rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
> }
>
> -TEST_F(rtc, uie_read) {
> +TEST_F_TIMEOUT(rtc, uie_read, NUM_UIE + 2) {
> int i, rc, irq = 0;
> unsigned long data;
>
> @@ -211,7 +211,7 @@ TEST_F(rtc, alarm_wkalm_set) {
> ASSERT_EQ(new, secs);
> }
>
> -TEST_F(rtc, alarm_alm_set_minute) {
> +TEST_F_TIMEOUT(rtc, alarm_alm_set_minute, 65) {
> struct timeval tv = { .tv_sec = 62 };
> unsigned long data;
> struct rtc_time tm;
> @@ -264,7 +264,7 @@ TEST_F(rtc, alarm_alm_set_minute) {
> ASSERT_EQ(new, secs);
> }
>
> -TEST_F(rtc, alarm_wkalm_set_minute) {
> +TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) {
> struct timeval tv = { .tv_sec = 62 };
> struct rtc_wkalrm alarm = { 0 };
> struct rtc_time tm;
> --
> 2.21.0
>
--
Kees Cook
WARNING: multiple messages have this Message-ID (diff)
From: keescook@chromium.org (Kees Cook)
Subject: [PATCH 2/2] selftests: rtc: rtctest: specify timeouts
Date: Thu, 23 May 2019 15:50:02 -0700 [thread overview]
Message-ID: <201905231549.C19B7A21@keescook> (raw)
Message-ID: <20190523225002.ZtJ7MmtLqG_S09Gh-UOdUZujcYGiLsQ6fAG6gDOqXmw@z> (raw)
In-Reply-To: <20190523224223.11054-3-alexandre.belloni@bootlin.com>
On Fri, May 24, 2019@12:42:23AM +0200, Alexandre Belloni wrote:
> uie_read is a commonly failing test that will block forever on buggy rtc
> drivers. Shorten its timeout so it fails earlier. Also increase the timeout
> for the two alarm test on a minute boundary.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>
Reviewed-by: Kees Cook <keescook at chromium.org>
> ---
> tools/testing/selftests/rtc/rtctest.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c
> index b2065536d407..66af608fb4c6 100644
> --- a/tools/testing/selftests/rtc/rtctest.c
> +++ b/tools/testing/selftests/rtc/rtctest.c
> @@ -49,7 +49,7 @@ TEST_F(rtc, date_read) {
> rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
> }
>
> -TEST_F(rtc, uie_read) {
> +TEST_F_TIMEOUT(rtc, uie_read, NUM_UIE + 2) {
> int i, rc, irq = 0;
> unsigned long data;
>
> @@ -211,7 +211,7 @@ TEST_F(rtc, alarm_wkalm_set) {
> ASSERT_EQ(new, secs);
> }
>
> -TEST_F(rtc, alarm_alm_set_minute) {
> +TEST_F_TIMEOUT(rtc, alarm_alm_set_minute, 65) {
> struct timeval tv = { .tv_sec = 62 };
> unsigned long data;
> struct rtc_time tm;
> @@ -264,7 +264,7 @@ TEST_F(rtc, alarm_alm_set_minute) {
> ASSERT_EQ(new, secs);
> }
>
> -TEST_F(rtc, alarm_wkalm_set_minute) {
> +TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) {
> struct timeval tv = { .tv_sec = 62 };
> struct rtc_wkalrm alarm = { 0 };
> struct rtc_time tm;
> --
> 2.21.0
>
--
Kees Cook
WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Shuah Khan <shuah@kernel.org>,
Jeffrin Thalakkottoor <jeffrin@rajagiritech.edu.in>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests: rtc: rtctest: specify timeouts
Date: Thu, 23 May 2019 15:50:02 -0700 [thread overview]
Message-ID: <201905231549.C19B7A21@keescook> (raw)
In-Reply-To: <20190523224223.11054-3-alexandre.belloni@bootlin.com>
On Fri, May 24, 2019 at 12:42:23AM +0200, Alexandre Belloni wrote:
> uie_read is a commonly failing test that will block forever on buggy rtc
> drivers. Shorten its timeout so it fails earlier. Also increase the timeout
> for the two alarm test on a minute boundary.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
> ---
> tools/testing/selftests/rtc/rtctest.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c
> index b2065536d407..66af608fb4c6 100644
> --- a/tools/testing/selftests/rtc/rtctest.c
> +++ b/tools/testing/selftests/rtc/rtctest.c
> @@ -49,7 +49,7 @@ TEST_F(rtc, date_read) {
> rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
> }
>
> -TEST_F(rtc, uie_read) {
> +TEST_F_TIMEOUT(rtc, uie_read, NUM_UIE + 2) {
> int i, rc, irq = 0;
> unsigned long data;
>
> @@ -211,7 +211,7 @@ TEST_F(rtc, alarm_wkalm_set) {
> ASSERT_EQ(new, secs);
> }
>
> -TEST_F(rtc, alarm_alm_set_minute) {
> +TEST_F_TIMEOUT(rtc, alarm_alm_set_minute, 65) {
> struct timeval tv = { .tv_sec = 62 };
> unsigned long data;
> struct rtc_time tm;
> @@ -264,7 +264,7 @@ TEST_F(rtc, alarm_alm_set_minute) {
> ASSERT_EQ(new, secs);
> }
>
> -TEST_F(rtc, alarm_wkalm_set_minute) {
> +TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) {
> struct timeval tv = { .tv_sec = 62 };
> struct rtc_wkalrm alarm = { 0 };
> struct rtc_time tm;
> --
> 2.21.0
>
--
Kees Cook
next prev parent reply other threads:[~2019-05-23 22:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 22:42 [PATCH 0/2] kselftest: fix rtctest timeout alexandre.belloni
2019-05-23 22:42 ` Alexandre Belloni
2019-05-23 22:42 ` Alexandre Belloni
2019-05-23 22:42 ` [PATCH 1/2] selftests/harness: Allow test to configure timeout alexandre.belloni
2019-05-23 22:42 ` Alexandre Belloni
2019-05-23 22:42 ` Alexandre Belloni
2019-05-23 22:49 ` keescook
2019-05-23 22:49 ` Kees Cook
2019-05-23 22:49 ` Kees Cook
2019-05-23 22:42 ` [PATCH 2/2] selftests: rtc: rtctest: specify timeouts alexandre.belloni
2019-05-23 22:42 ` Alexandre Belloni
2019-05-23 22:42 ` Alexandre Belloni
2019-05-23 22:50 ` keescook [this message]
2019-05-23 22:50 ` Kees Cook
2019-05-23 22:50 ` Kees Cook
2019-05-23 22:57 ` [PATCH 0/2] kselftest: fix rtctest timeout shuah
2019-05-23 22:57 ` shuah
2019-05-23 22:57 ` shuah
2019-05-23 23:32 ` shuah
2019-05-23 23:32 ` shuah
2019-05-23 23:32 ` shuah
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=201905231549.C19B7A21@keescook \
--to=unknown@example.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.