On 21/10/2021 22:48:51+0300, Sam Protsenko wrote: > After testing thoroughly, I can confirm that Alexandre is right about > leap years (Exynos850 RTC treats both 2000 and 2100 as leap years). > And it also overflows internally on 2159 year, limiting the actual > time range at 160 years. So I'll keep that range at 100 years for all > RTCs. As Krzysztof said, there is no practical reasons in trying to > increase it anyway. Will send v2 soon. > > What I'm curious about is RTC testing. I've found this test suite: > > tools/testing/selftests/rtc/rtctest.c > > But it doesn't seem to cover corner cases (like checking leap years, > which was discussed here). Just a thought: maybe it should be added > there, so everyone can benefit from that? For example, I know that in > Linaro we are running LKFT tests for different boards, so that might > theoretically reveal some bugs. Though I understand possible > implications: we probably don't know which ranges are supported in > driver that's being tested. Anyway, just saying. > Sorry, I should have pointed to: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/rtc-tools.git/tree/rtc-range.c This does check for the actual range of an RTC. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com