提交 a6308bc2 编写于 作者: A Anthony Liguori

Merge remote-tracking branch 'kraxel/build.1' into staging

* kraxel/build.1:
  m48t59-test: don't touch watchdog
  rtc-test: skip year-2038 overflow check in case time_t is 32bit only
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
......@@ -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);
}
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册