Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1667825
| From | Shuah Khan <shuah@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0/3] rtc: make st-lpc robust against y2038/2106 bug |
| Date | 2017-06-16 17:20 +0200 |
| Message-ID | <tT1ct-1LU-9@gated-at.bofh.it> (permalink) |
| References | <tT06K-14T-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/16/2017 08:03 AM, Benjamin Gaignard wrote: > On 32bits platforms "struct timeval" or "time_t" are using u32 to code the > date, this cause tools like "date" or "hwclock" failed even before setting > the RTC device if the date is superior to year 2038 (or 2106). > > To avoid this problem I add two RTC tests files which directly use RTC ioctl > to set and read RTC time and alarm values. > rtctest_setdate allow to set any date/time given in the command line. > rtctest-2038 perform a basic test by writing 1-1-2200 in RTC time and alarm > and checking that the read back values are correct. > > Finally that had allowed me to test and fix rtc-st-lpc driver. > > Benjamin Gaignard (3): > tools: timer: add rtctest_setdate > tools: timer: add test to check y2038/2106 bug > rtc: st-lpc: make it robust against y2038/2106 bug > > drivers/rtc/rtc-st-lpc.c | 19 ++-- > tools/testing/selftests/timers/Makefile | 4 +- > tools/testing/selftests/timers/rtctest-2038.c | 135 +++++++++++++++++++++++ > tools/testing/selftests/timers/rtctest_setdate.c | 86 +++++++++++++++ > 4 files changed, 232 insertions(+), 12 deletions(-) > create mode 100644 tools/testing/selftests/timers/rtctest-2038.c > create mode 100644 tools/testing/selftests/timers/rtctest_setdate.c > Hi John/Thomas, Please review them and let me know. Looks to me these will make good additions to 4.13-rc1 kselftest content. thanks, -- Shuah
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/3] rtc: make st-lpc robust against y2038/2106 bug Benjamin Gaignard <benjamin.gaignard@linaro.org> - 2017-06-16 16:10 +0200 Re: [PATCH 0/3] rtc: make st-lpc robust against y2038/2106 bug Shuah Khan <shuah@kernel.org> - 2017-06-16 17:20 +0200
csiph-web