fix tests
cover fix tests
Hi,
Two little test case fixes so "make check" passes.
cheers,
Gerd
Gerd Hoffmann (2):
rtc-test: skip year-2038 overflow check in case time_t is 32bit only
m48t59-test: don't touch watchdog
tests/m48t59-test.c | 5 +++++ tests/rtc-test.c | 4 ++++ 2 files changed, 9 insertions(+), 0 deletions(-)
PATCH 1/2 rtc-test: skip year-2038 overflow check in case time_t is 32bit only
Signed-off-by Gerd Hoffmann <[email protected]>
--- tests/rtc-test.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
tests/rtc-test.c +4 -0
@@ -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 );
Signature · 1 line
1.7.1
Re: [Qemu-devel] [PATCH 1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only
Am 07.01.2013 15:11, schrieb Gerd Hoffmann:
Quoted 1 line
Signed-off-by Gerd Hoffmann <[email protected]>
Reviewed-by Andreas Färber <[email protected]>
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH 2/2 m48t59-test: don't touch watchdog
In reply to Gerd HoffmannSigned-off-by Gerd Hoffmann <[email protected]>
--- tests/m48t59-test.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
tests/m48t59-test.c +5 -0
@@ -233,6 +233,11 @@ static void fuzz_registers(void) reg = (uint8_t )g_test_rand_int_range (0 ,16 ); val = (uint8_t )g_test_rand_int_range (0 ,256 ); +if (reg ==7 ) { +/* watchdog setup register, may trigger system reset, skip */ +continue ; + } +cmos_write (reg, val);cmos_read (reg); }
Signature · 1 line
1.7.1