From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsDQi-000152-NS for qemu-devel@nongnu.org; Mon, 07 Jan 2013 09:11:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsDQh-0007g7-No for qemu-devel@nongnu.org; Mon, 07 Jan 2013 09:11:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsDQh-0007fu-GB for qemu-devel@nongnu.org; Mon, 07 Jan 2013 09:11:55 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r07EBsZV018879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Jan 2013 09:11:55 -0500 From: Gerd Hoffmann Date: Mon, 7 Jan 2013 15:11:52 +0100 Message-Id: <1357567913-26175-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1357567913-26175-1-git-send-email-kraxel@redhat.com> References: <1357567913-26175-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- 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