diff options
author | Markus Armbruster | 2020-04-24 09:11:41 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-04-29 08:01:52 +0200 |
commit | a56f3cdbdf328d95398c70432bba638a6b3f63fa (patch) | |
tree | 7b083e39e2b4760589e0d42a0fa94cc58c96f39c /tests/qtest/libqos/qos_external.h | |
parent | Makefile: Drop unused, broken target recurse-fuzz (diff) | |
download | qemu-a56f3cdbdf328d95398c70432bba638a6b3f63fa.tar.gz qemu-a56f3cdbdf328d95398c70432bba638a6b3f63fa.tar.xz qemu-a56f3cdbdf328d95398c70432bba638a6b3f63fa.zip |
fuzz: Simplify how we compute available machines and types
apply_to_qlist(), apply_to_node() work with QObjects. This is
designed for use by tests/qtest/qos-test.c, which gets the data in
that form via QMP. Goes back to commit fc281c8020 "tests: qgraph API
for the qtest driver framework".
Commit 275ab39d86 "fuzz: add support for qos-assisted fuzz targets"
added another user: qtest/fuzz/qos_fuzz.c. To get the data as
QObjects, it uses qmp_marshal_query_machines() and
qmp_marshal_qom_list_types().
All this code is rather cumbersome. Switch to working with generated
QAPI types instead:
* Replace apply_to_qlist() & friends by machines_apply_to_node() and
types_apply_to_node().
* Have qos_fuzz.c use qmp_query_machines() and qmp_qom_list_types()
instead.
* Have qos_test.c convert from QObject to the QAPI types.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200424071142.3525-3-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Diffstat (limited to 'tests/qtest/libqos/qos_external.h')
-rw-r--r-- | tests/qtest/libqos/qos_external.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/qtest/libqos/qos_external.h b/tests/qtest/libqos/qos_external.h index 7b44930c55..f63388cb30 100644 --- a/tests/qtest/libqos/qos_external.h +++ b/tests/qtest/libqos/qos_external.h @@ -20,8 +20,12 @@ #define QOS_EXTERNAL_H #include "libqos/qgraph.h" -void apply_to_node(const char *name, bool is_machine, bool is_abstract); -void apply_to_qlist(QList *list, bool is_machine); +#include "libqos/malloc.h" +#include "qapi/qapi-types-machine.h" +#include "qapi/qapi-types-qom.h" + +void machines_apply_to_node(MachineInfoList *mach_info); +void types_apply_to_node(ObjectTypeInfoList *type_info); QGuestAllocator *get_machine_allocator(QOSGraphObject *obj); void *allocate_objects(QTestState *qts, char **path, QGuestAllocator **p_alloc); |