qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Fix autotest-exposed RTC bug 1058225
@ 2012-10-01 12:22 Paolo Bonzini
  2012-10-01 12:22 ` [Qemu-devel] [PATCH 1/3] rtc: fix overflow in mktimegm Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Paolo Bonzini @ 2012-10-01 12:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: lookkas

> Very easy to reproduce:
>
> 1) Build the latest qemu.git (we've captured this on internal automated
> testing, verified manually), the commit for reference is:
>
> 14:07:02 INFO | git commit ID is
> 6f8fd2530e9a530f237240daf1c981fa5df7f978 (tag v1.2.0-461-g6f8fd25)
>
> 2) Install a linux guest in it (caught with RHEL 6.2, verified with
> Fedora 17)
>
> 3) In the linux guest, set the hardware clock with hwclock:
>
> /sbin/hwclock --set --date "2/2/80 03:04:00"
>
> 4) Verify if hardware clock was set back to the eighties:
>
> LC_ALL=C /sbin/hwclock
>
> 5) Observe amazed that hwclock reports a date in the year 2043:
>
> 14:09:34 INFO |          ('hwclock', 'FAIL', 2, "Failed to set hwclock
> back to the eighties. Output of hwclock is 'Sun Dec 27 20:35:46 2043
> -0.489664 seconds'")

The testcase of patch 1 exposes the bug on an unpatched QEMU.

Paolo

Paolo Bonzini (3):
  rtc: fix overflow in mktimegm
  rtc: map CMOS index 0x37 to 0x32 on read and writes
  rtc: implement century byte

 cutils.c              |  2 +-
 hw/mc146818rtc.c      | 40 ++++++++++++++++++----------
 hw/mc146818rtc_regs.h |  4 +++
 tests/rtc-test.c      | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++
 4 file modificati, 104 inserzioni(+), 15 rimozioni(-)

-- 
1.7.12

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-05 21:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01 12:22 [Qemu-devel] [PATCH 0/3] Fix autotest-exposed RTC bug 1058225 Paolo Bonzini
2012-10-01 12:22 ` [Qemu-devel] [PATCH 1/3] rtc: fix overflow in mktimegm Paolo Bonzini
2012-10-05 21:19   ` Anthony Liguori
2012-10-01 12:22 ` [Qemu-devel] [PATCH 2/3] rtc: map CMOS index 0x37 to 0x32 on read and writes Paolo Bonzini
2012-10-01 12:22 ` [Qemu-devel] [PATCH 3/3] rtc: implement century byte Paolo Bonzini

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).