mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
fuzz: add fuzz_reset API
As we are converting most fuzzers to rely on reboots to reset state, introduce an API to make sure reboots are invoked in a consistent manner. Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
This commit is contained in:
parent
66169c3c60
commit
8d1e76b35b
2 changed files with 7 additions and 1 deletions
|
@ -51,6 +51,12 @@ void flush_events(QTestState *s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fuzz_reset(QTestState *s)
|
||||||
|
{
|
||||||
|
qemu_system_reset(SHUTDOWN_CAUSE_GUEST_RESET);
|
||||||
|
main_loop_wait(true);
|
||||||
|
}
|
||||||
|
|
||||||
static QTestState *qtest_setup(void)
|
static QTestState *qtest_setup(void)
|
||||||
{
|
{
|
||||||
qtest_server_set_send_handler(&qtest_client_inproc_recv, &fuzz_qts);
|
qtest_server_set_send_handler(&qtest_client_inproc_recv, &fuzz_qts);
|
||||||
|
|
|
@ -103,7 +103,7 @@ typedef struct FuzzTarget {
|
||||||
} FuzzTarget;
|
} FuzzTarget;
|
||||||
|
|
||||||
void flush_events(QTestState *);
|
void flush_events(QTestState *);
|
||||||
void reboot(QTestState *);
|
void fuzz_reset(QTestState *);
|
||||||
|
|
||||||
/* Use the QTest ASCII protocol or call address_space API directly?*/
|
/* Use the QTest ASCII protocol or call address_space API directly?*/
|
||||||
void fuzz_qtest_set_serialize(bool option);
|
void fuzz_qtest_set_serialize(bool option);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue