Commit eff82a26 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Shuah Khan

selftests: rtc: rtctest: specify timeouts

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: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent d51f1f14
...@@ -49,7 +49,7 @@ TEST_F(rtc, date_read) { ...@@ -49,7 +49,7 @@ TEST_F(rtc, date_read) {
rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); 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; int i, rc, irq = 0;
unsigned long data; unsigned long data;
...@@ -211,7 +211,7 @@ TEST_F(rtc, alarm_wkalm_set) { ...@@ -211,7 +211,7 @@ TEST_F(rtc, alarm_wkalm_set) {
ASSERT_EQ(new, secs); 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 }; struct timeval tv = { .tv_sec = 62 };
unsigned long data; unsigned long data;
struct rtc_time tm; struct rtc_time tm;
...@@ -264,7 +264,7 @@ TEST_F(rtc, alarm_alm_set_minute) { ...@@ -264,7 +264,7 @@ TEST_F(rtc, alarm_alm_set_minute) {
ASSERT_EQ(new, secs); 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 timeval tv = { .tv_sec = 62 };
struct rtc_wkalrm alarm = { 0 }; struct rtc_wkalrm alarm = { 0 };
struct rtc_time tm; struct rtc_time tm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment