Lines Matching +full:- +full:- +full:build +full:- +full:arg
21 #include "libqtest-single.h"
25 #include "qapi/qobject-input-visitor.h"
26 #include "qapi/qapi-visit-machine.h"
27 #include "qapi/qapi-visit-qom.h"
28 #include "libqos/libqos-malloc.h"
40 * This function firstly starts QEMU with "-machine none" option,
59 qtest_start("-machine none"); in qos_set_machines_devices_available()
60 response = qmp("{ 'execute': 'query-machines' }"); in qos_set_machines_devices_available()
74 response = qmp("{'execute': 'qom-list-types'," in qos_set_machines_devices_available()
135 * run_one_test(): given an array of nodes @arg,
144 * ->before callback is also welcome to use g_test_queue_destroy.
146 * Note: as specified in walk_path() too, @arg is an array of
147 * char *, where arg[0] is a pointer to the command line
159 static void run_one_test(const void *arg) in run_one_test() argument
164 char **path = (char **) arg; in run_one_test()
170 test_node = qos_graph_get_node(path[(g_strv_length(path) - 1)]); in run_one_test()
171 test_arg = test_node->u.test.arg; in run_one_test()
172 if (test_node->u.test.before) { in run_one_test()
173 test_arg = test_node->u.test.before(cmd_line, test_arg); in run_one_test()
176 restart_qemu_or_continue(cmd_line->str); in run_one_test()
180 test_node->u.test.function(obj, test_arg, alloc); in run_one_test()
183 static void subprocess_run_one_test(const void *arg) in subprocess_run_one_test() argument
185 const gchar *path = arg; in subprocess_run_one_test()
192 static void destroy_pathv(void *arg) in destroy_pathv() argument
194 g_free(((char **)arg)[0]); in destroy_pathv()
195 g_free(arg); in destroy_pathv()
200 * path_str, a one-string path (ex "pc/i440FX-pcihost/...")
201 * path_vec, a string-array path (ex [0] = "pc", [1] = "i440FX-pcihost").
203 * path_str will be only used to build the test name, and won't need the
210 * the node, (ex for "x86_64/pc" it will be "pc"), used to build the test
216 * and start QEMU with "-M pc". For this reason,
230 /* twice QOS_PATH_MAX_ELEMENT_SIZE since each edge can have its arg */ in walk_path()
236 char *node_name = orig_path->name, *path_str; in walk_path()
242 node_name = qos_graph_edge_get_dest(path->path_edge); /* machine name */ in walk_path()
249 if (!path->path_edge) { in walk_path()
253 node_name = qos_graph_edge_get_dest(path->path_edge); in walk_path()
256 if (path->command_line && etype == QEDGE_CONSUMED_BY) { in walk_path()
257 g_string_append(cmd_line, path->command_line); in walk_path()
258 g_string_append(cmd_line, after_device_str->str); in walk_path()
262 path_vec[path_vec_size++] = qos_graph_edge_get_name(path->path_edge); in walk_path()
264 after_cmd = qos_graph_edge_get_after_cmd_line(path->path_edge); in walk_path()
265 after_device = qos_graph_edge_get_extra_device_opts(path->path_edge); in walk_path()
266 before_cmd = qos_graph_edge_get_before_cmd_line(path->path_edge); in walk_path()
267 edge = qos_graph_get_edge(path->name, node_name); in walk_path()
282 g_string_append(cmd_line, after_device_str->str); in walk_path()
285 g_string_append(cmd_line, cmd_line2->str); in walk_path()
299 if (path->u.test.subprocess) { in walk_path()
319 * - Initializes the glib test framework
320 * - Creates the graph by invoking the various _init constructors
321 * - Starts QEMU to mark the available devices
322 * - Walks the graph, and each path is added to
324 * - Runs the tests, calling allocate_object() and allocating the
326 * - Cleans up everything