Linux RTC
 help / color / mirror / Atom feed
* [rtc-linux] rtctest woes
@ 2015-09-16  7:15 Uwe Kleine-König
  2015-09-16  7:16 ` [PATCH] rtc: rtctest: enabling UIE for a chip that doesn't support it returns EINVAL Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2015-09-16  7:15 UTC (permalink / raw)
  To: Alexandre Belloni, rtc-linux; +Cc: Alessandro Zummo

Hello,

I'm running rtctest (i.e. tools/testing/selftests/timers/rtctest.c)
against a pcf2127 i2c rtc. The driver doesn't have alarm support.

The first problem is that calling ioctl(fd, RTC_UIE_ON, 0) returns -1
and sets errno to EINVAL but rtctest expects ENOTTY if update irqs are
not supported. (I'll send a patch in reply to this mail.)

Then with this issue fixed the next failure is at ioctl(fd,
RTC_ALM_READ, &rtc_tm) after ioctl(fd, RTC_ALM_SET, &rtc_tm) succeeded.
If I understand the code correctly the RTC_ALM_SET is emulated using
kernel timers but ALM_GET is not. I'd say the right fix here is that
RTC_ALM_SET should already fail in this case, but as I'm not sure I
didn't create a patch.

BTW, asking scripts/get_maintainer.pl where to send a patch touching
rtctest the reply includes the timekeeping and selftest maintainer
entrys but not the rtc one. I suggest to move rtctest to
tools/testing/selftests/rtc/rtctest.c.

Best regards
Uwe

--=20
Pengutronix e.K.                           | Uwe Kleine-K=C3=B6nig         =
   |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

--=20
--=20
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---=20
You received this message because you are subscribed to the Google Groups "=
rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-03 12:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16  7:15 [rtc-linux] rtctest woes Uwe Kleine-König
2015-09-16  7:16 ` [PATCH] rtc: rtctest: enabling UIE for a chip that doesn't support it returns EINVAL Uwe Kleine-König
2015-10-03 12:25   ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox