History | View | Annotate | Download (10.6 kB)
rtc-test: skip year-2038 overflow check in case time_t is 32bit only
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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 RTCdata register (i.e. any of the ten time/calender CMOS bytes) is set, thedata is (as expected) correctly stored in the cmos_data array. However,...
rtc: fix overflow in mktimegm
When setting a date in 1980, Linux is actually disregarding the centurybyte and setting the year to 2080. This causes a year-2038 overflowin mktimegm. Fix this by doing the days-to-seconds computation in64-bit math.
Reported-by: Lucas Meneghel Rodrigues <lookkas@gmail.com>...
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 treata value of 2000 for the base_year property as "use the century byteproperly" (which would be a value of 0)....
qtest: add register fuzzing to RTC test
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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'...
qtest: add rtc-test test-case
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>