Skip to content

Commit

Permalink
selftests: rtc: rtctest: specify timeouts
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Alexandre Belloni authored and Shuah Khan committed May 24, 2019
1 parent d51f1f1 commit eff82a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/testing/selftests/rtc/rtctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit eff82a2

Please sign in to comment.