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:
Eric Blake 2017-09-11 12:19:58 -05:00 committed by Thomas Huth
parent 05e520f1c7
commit 9b67af76db
4 changed files with 40 additions and 28 deletions

View file

@ -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 */