Statistics
| Branch: | Revision:

root / tests / rtc-test.c @ c4d9d196

History | View | Annotate | Download (15.7 kB)

# Date Author Comment
eeb29fb9 03/08/2013 11:16 am Cole Robinson

rtc-test: Fix test failures with recent glib

As of glib 2.35.4, glib changed its logic for ordering test cases:

https://bugzilla.gnome.org/show_bug.cgi?id=694487

This was causing failures in rtc-test. Group the reordered test
cases into their own suite, which maintains the original ordering....

f9b3ed40 02/18/2013 06:20 pm Paolo Bonzini

rtc-test: always set register B in its entirety

Eliminate dependencies between one test and the others.

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

cc2832a5 02/18/2013 06:20 pm Paolo Bonzini

rtc-test: add testcases for alarms in 12hour mode

Trying (unsuccessfully) to break the device model as mentioned in
https://bugs.launchpad.net/qemu/+bug/1090558.

At least if someone tries to fix that, it won't break what works...

Signed-off-by: Paolo Bonzini <>...

a05ddd92 01/30/2013 12:18 pm Andreas Färber

tests: Fix {rtc, m48t59}-test build on illumos

Struct tm does not have tm_gmtoff field on illumos.
Fix the build by not zero-initializing these fields on Solaris.

Cc:
Signed-off-by: Andreas Färber <>
Signed-off-by: Stefan Hajnoczi <>

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