Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Alexandre Belloni and committed by
Shuah Khan
eff82a26 d51f1f14

+3 -3
+3 -3
tools/testing/selftests/rtc/rtctest.c
··· 49 49 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); 50 50 } 51 51 52 - TEST_F(rtc, uie_read) { 52 + TEST_F_TIMEOUT(rtc, uie_read, NUM_UIE + 2) { 53 53 int i, rc, irq = 0; 54 54 unsigned long data; 55 55 ··· 211 211 ASSERT_EQ(new, secs); 212 212 } 213 213 214 - TEST_F(rtc, alarm_alm_set_minute) { 214 + TEST_F_TIMEOUT(rtc, alarm_alm_set_minute, 65) { 215 215 struct timeval tv = { .tv_sec = 62 }; 216 216 unsigned long data; 217 217 struct rtc_time tm; ··· 264 264 ASSERT_EQ(new, secs); 265 265 } 266 266 267 - TEST_F(rtc, alarm_wkalm_set_minute) { 267 + TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) { 268 268 struct timeval tv = { .tv_sec = 62 }; 269 269 struct rtc_wkalrm alarm = { 0 }; 270 270 struct rtc_time tm;