| #include "libqos/libqos-spapr.h" |
| static void test_rtas_get_time_of_day(void) |
| qs = qtest_spapr_boot("-machine pseries"); |
| ret = qrtas_get_time_of_day(qs->alloc, &tm, &ns); |
| g_assert_cmpint(ret, ==, 0); |
| g_assert(t2 - t1 < 5); /* 5 sec max to run the test */ |
| int main(int argc, char *argv[]) |
| const char *arch = qtest_get_arch(); |
| g_test_init(&argc, &argv, NULL); |
| if (strcmp(arch, "ppc64")) { |
| g_printerr("RTAS requires ppc64-softmmu/qemu-system-ppc64\n"); |
| qtest_add_func("rtas/get-time-of-day", test_rtas_get_time_of_day); |