From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only
Date: Mon, 7 Jan 2013 15:11:52 +0100 [thread overview]
Message-ID: <1357567913-26175-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1357567913-26175-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
tests/rtc-test.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tests/rtc-test.c b/tests/rtc-test.c
index 02edbf5..e7123ca 100644
--- a/tests/rtc-test.c
+++ b/tests/rtc-test.c
@@ -201,6 +201,10 @@ static void set_year_20xx(void)
g_assert_cmpint(cmos_read(RTC_YEAR), ==, 0x11);
g_assert_cmpint(cmos_read(RTC_CENTURY), ==, 0x20);
+ if (sizeof(time_t) == 4) {
+ return;
+ }
+
/* Set a date in 2080 to ensure there is no year-2038 overflow. */
cmos_write(RTC_REG_A, 0x76);
cmos_write(RTC_YEAR, 0x80);
--
1.7.1
next prev parent reply other threads:[~2013-01-07 14:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 14:11 [Qemu-devel] [PATCH 0/2] fix tests Gerd Hoffmann
2013-01-07 14:11 ` Gerd Hoffmann [this message]
2013-01-07 14:37 ` [Qemu-devel] [PATCH 1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only Andreas Färber
2013-01-07 14:11 ` [Qemu-devel] [PATCH 2/2] m48t59-test: don't touch watchdog Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2013-01-10 14:49 [Qemu-devel] [PULL 0/2] two little testcase fixes Gerd Hoffmann
2013-01-10 14:49 ` [Qemu-devel] [PATCH 1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only Gerd Hoffmann
2013-01-10 15:03 ` Andreas Färber
2013-01-11 7:55 ` Gerd Hoffmann
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=1357567913-26175-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.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).