Skip to contentSkip to conversation

two little testcase fixes

GIT PULL In review Gerd Hoffmann 3 participants 6 messages Jan 10, 2013 – Jan 11, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

Two test case fixes so "make check" works.

please pull,
Gerd

The following changes since commit 7cd5da7eef152a533c5774effd2e7bbfa5976c86:

Merge remote-tracking branch 'mdroth/qga-pull-1-8-2013' into staging (2013-01-09 09:55:51 -0600)

are available in the git repository at:

git://git.kraxel.org/qemu build.1

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(-)
#1 lore raw

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

---
 tests/rtc-test.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
tests/rtc-test.c +4 -0
index 02edbf5..e7123ca 100644
@@ -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
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only

Am 10.01.2013 15:49, schrieb Gerd Hoffmann:

Quoted 1 line

Where did my Reviewed-by go? :)

Andreas

Quoted 20 lines
---
 tests/rtc-test.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
tests/rtc-test.c +4 -0
index 02edbf5..e7123ca 100644
@@ -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 · 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
#3 lore raw

Re: [Qemu-devel] [PATCH 1/2] rtc-test: skip year-2038 overflow check in case time_t is 32bit only

Quoted 4 lines · Andreas Färber

Am 10.01.2013 15:49, schrieb Gerd Hoffmann:

Quoted 1 line

Where did my Reviewed-by go? :)

Anyone happens to have a script to pick up those?

thanks,
Gerd

#4 lore raw

PATCH 2/2 m48t59-test: don't touch watchdog

In reply to Gerd Hoffmann
---
 tests/m48t59-test.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
tests/m48t59-test.c +5 -0
index 5179681..d79f554 100644
@@ -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
#5 lore raw
In reply to Gerd Hoffmann

Pulled, thanks.

N.B. This note may be extraneous because the pull request was sent by a version of git older than 1.7.9 making the pull request ambigious. Please consider upgrading to a newer version of git.

Regards,

Anthony Liguori