Statistics
| Branch: | Revision:

root / tests / rtc-test.c @ 067f0691

History | View | Annotate | Download (10.6 kB)

# Date Author Comment
4e45deed 01/10/2013 04:23 pm Gerd Hoffmann

rtc-test: skip year-2038 overflow check in case time_t is 32bit only

Signed-off-by: Gerd Hoffmann <>

02c6ccc6 11/27/2012 07:04 pm Alex Horn

rtc: Only call rtc_set_cmos when Register B SET flag is disabled.

This bug occurs when the SET flag of Register B is enabled. When an RTC
data register (i.e. any of the ten time/calender CMOS bytes) is set, the
data is (as expected) correctly stored in the cmos_data array. However,...

b6db4aca 10/05/2012 04:02 pm Paolo Bonzini

rtc: fix overflow in mktimegm

When setting a date in 1980, Linux is actually disregarding the century
byte and setting the year to 2080. This causes a year-2038 overflow
in mktimegm. Fix this by doing the days-to-seconds computation in
64-bit math.

Reported-by: Lucas Meneghel Rodrigues <>...

b8994faf 10/05/2012 04:02 pm Paolo Bonzini

rtc: implement century byte

Implement the century byte in the RTC emulation, and test that it works.
This leads to some annoying compatibility code because we need to treat
a value of 2000 for the base_year property as "use the century byte
properly" (which would be a value of 0)....

85215d41 04/19/2012 09:14 pm Blue Swirl

qtest: add register fuzzing to RTC test

Reviewed-by: Anthony Liguori <>
Signed-off-by: Blue Swirl <>

02b3efcb 03/30/2012 09:58 pm Blue Swirl

qtest: avoid a warning with RTC test

Avoid this warning on OpenBSD:
CC tests/rtc-test.o
/src/qemu/tests/rtc-test.c: In function 'check_time':
/src/qemu/tests/rtc-test.c:171: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t'...

d1aaf543 03/30/2012 04:14 pm Anthony Liguori

qtest: add rtc-test test-case

Signed-off-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>