From: shuah@kernel.org (Shuah Khan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] rtc: make st-lpc robust against y2038/2106 bug
Date: Fri, 16 Jun 2017 09:19:06 -0600 [thread overview]
Message-ID: <fe91e845-7218-af8a-16ec-f4c0692e609f@kernel.org> (raw)
In-Reply-To: <1497621833-9942-1-git-send-email-benjamin.gaignard@linaro.org>
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
prev parent reply other threads:[~2017-06-16 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 14:03 [PATCH 0/3] rtc: make st-lpc robust against y2038/2106 bug Benjamin Gaignard
2017-06-16 14:03 ` [PATCH 1/3] tools: timer: add rtctest_setdate Benjamin Gaignard
2017-06-16 15:34 ` Alexandre Belloni
2017-06-16 14:03 ` [PATCH 2/3] tools: timer: add test to check y2038/2106 bug Benjamin Gaignard
2017-06-16 15:52 ` Alexandre Belloni
2017-06-16 14:03 ` [PATCH 3/3] rtc: st-lpc: make it robust against " Benjamin Gaignard
2017-06-19 7:57 ` Patrice CHOTARD
2017-06-16 15:19 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe91e845-7218-af8a-16ec-f4c0692e609f@kernel.org \
--to=shuah@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).