mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
libqos: Use explicit QTestState for rtas operations
Drop one more client of global_qtest by teaching all rtas test functionality to pass in an explicit QTestState, adjusting all callers. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Use nicer indentation in rtas.h] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
05e520f1c7
commit
9b67af76db
4 changed files with 40 additions and 28 deletions
|
@ -16,7 +16,7 @@ static void test_rtas_get_time_of_day(void)
|
|||
qs = qtest_spapr_boot("-machine pseries");
|
||||
|
||||
t1 = time(NULL);
|
||||
ret = qrtas_get_time_of_day(qs->alloc, &tm, &ns);
|
||||
ret = qrtas_get_time_of_day(qs->qts, qs->alloc, &tm, &ns);
|
||||
g_assert_cmpint(ret, ==, 0);
|
||||
t2 = mktimegm(&tm);
|
||||
g_assert(t2 - t1 < 5); /* 5 sec max to run the test */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue