summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/timers/rtctest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/timers/rtctest.c')
-rw-r--r--tools/testing/selftests/timers/rtctest.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/selftests/timers/rtctest.c b/tools/testing/selftests/timers/rtctest.c
index f61170f..411eff6 100644
--- a/tools/testing/selftests/timers/rtctest.c
+++ b/tools/testing/selftests/timers/rtctest.c
@@ -221,6 +221,11 @@ test_READ:
/* Read the current alarm settings */
retval = ioctl(fd, RTC_ALM_READ, &rtc_tm);
if (retval == -1) {
+ if (errno == EINVAL) {
+ fprintf(stderr,
+ "\n...EINVAL reading current alarm setting.\n");
+ goto test_PIE;
+ }
perror("RTC_ALM_READ ioctl");
exit(errno);
}
@@ -231,7 +236,7 @@ test_READ:
/* Enable alarm interrupts */
retval = ioctl(fd, RTC_AIE_ON, 0);
if (retval == -1) {
- if (errno == EINVAL) {
+ if (errno == EINVAL || errno == EIO) {
fprintf(stderr,
"\n...Alarm IRQs not supported.\n");
goto test_PIE;
OpenPOWER on IntegriCloud