mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
tests: add RTAS command in the protocol
Add a first test to validate the protocol: - rtas/get-time-of-day compares the time from the guest with the time from the host. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
8d6ef7c9fe
commit
eeddd59f59
9 changed files with 197 additions and 0 deletions
|
@ -751,6 +751,16 @@ void qtest_memread(QTestState *s, uint64_t addr, void *data, size_t size)
|
|||
g_strfreev(args);
|
||||
}
|
||||
|
||||
uint64_t qtest_rtas_call(QTestState *s, const char *name,
|
||||
uint32_t nargs, uint64_t args,
|
||||
uint32_t nret, uint64_t ret)
|
||||
{
|
||||
qtest_sendf(s, "rtas %s %u 0x%"PRIx64" %u 0x%"PRIx64"\n",
|
||||
name, nargs, args, nret, ret);
|
||||
qtest_rsp(s, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void qtest_add_func(const char *str, void (*fn)(void))
|
||||
{
|
||||
gchar *path = g_strdup_printf("/%s/%s", qtest_get_arch(), str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue