From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbdGIUdY (ORCPT ); Sun, 9 Jul 2017 16:33:24 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:51681 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553AbdGIUdW (ORCPT ); Sun, 9 Jul 2017 16:33:22 -0400 Date: Sun, 9 Jul 2017 22:33:20 +0200 From: Alexandre Belloni To: Benjamin Gaignard Cc: john.stultz@linaro.org, tglx@linutronix.de, sboyd@codeaurora.org, shuah@kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, patrice.chotard@st.com, a.zummo@towertech.it, linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com, linaro-kernel@lists.linaro.org Subject: Re: [PATCH v2 0/3] rtc: make st-lpc robust against y2038/2106 bug Message-ID: <20170709203320.aub7iiub2bcwmuvm@piout.net> References: <1497864982-29284-1-git-send-email-benjamin.gaignard@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1497864982-29284-1-git-send-email-benjamin.gaignard@linaro.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/06/2017 at 11:36:19 +0200, 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 one RTC test file 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. > > On this version 2 I add check of problematics years in rtctest like suggest > by Alexandre. > > Finally that had allowed me to test and fix rtc-st-lpc driver. > > Benjamin Gaignard (3): > tools: timer: add rtctest_setdate > tool: timer: rtctest add check for problematic dates > rtc: st-lpc: make it robust against y2038/2106 bug > > drivers/rtc/rtc-st-lpc.c | 19 ++-- > tools/testing/selftests/timers/Makefile | 2 +- > tools/testing/selftests/timers/rtctest.c | 121 ++++++++++++++++++++++- > tools/testing/selftests/timers/rtctest_setdate.c | 86 ++++++++++++++++ > 4 files changed, 212 insertions(+), 16 deletions(-) > create mode 100644 tools/testing/selftests/timers/rtctest_setdate.c > Applied, thanks. I've fixed up the date to meaningful ones in patch 2. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com