Lines Matching +full:test +full:- +full:path
2 * QOS-assisted fuzzing helpers
23 #include "qemu/main-loop.h"
26 #include "tests/qtest/libqos/libqos-malloc.h"
34 #include "qapi/qapi-commands-machine.h"
35 #include "qapi/qapi-commands-qom.h"
67 char **path = fuzz_path_vec; in qos_build_main_args() local
72 if (!path) { in qos_build_main_args()
73 fprintf(stderr, "QOS Path not found\n"); in qos_build_main_args()
77 /* Before test */ in qos_build_main_args()
78 cmd_line = g_string_new(path[0]); in qos_build_main_args()
79 current_path = path; in qos_build_main_args()
80 test_node = qos_graph_get_node(path[(g_strv_length(path) - 1)]); in qos_build_main_args()
81 test_arg = test_node->u.test.arg; in qos_build_main_args()
82 if (test_node->u.test.before) { in qos_build_main_args()
83 test_arg = test_node->u.test.before(cmd_line, test_arg); in qos_build_main_args()
87 TARGET_NAME " -display none -machine accel=qtest -m 64 "); in qos_build_main_args()
92 * This function is largely a copy of qos-test.c:walk_path. Since walk_path
98 QOSGraphNode *path; in walk_path() local
113 char *node_name = orig_path->name, *path_str; in walk_path()
118 path = qos_graph_get_node(node_name); /* root */ in walk_path()
119 node_name = qos_graph_edge_get_dest(path->path_edge); /* machine name */ in walk_path()
125 path = qos_graph_get_node(node_name); in walk_path()
126 if (!path->path_edge) { in walk_path()
130 node_name = qos_graph_edge_get_dest(path->path_edge); in walk_path()
133 if (path->command_line && etype == QEDGE_CONSUMED_BY) { in walk_path()
134 g_string_append(cmd_line, path->command_line); in walk_path()
135 g_string_append(cmd_line, after_device_str->str); in walk_path()
139 path_vec[path_vec_size++] = qos_graph_edge_get_name(path->path_edge); in walk_path()
141 after_cmd = qos_graph_edge_get_after_cmd_line(path->path_edge); in walk_path()
142 after_device = qos_graph_edge_get_extra_device_opts(path->path_edge); in walk_path()
143 before_cmd = qos_graph_edge_get_before_cmd_line(path->path_edge); in walk_path()
144 edge = qos_graph_get_edge(path->name, node_name); in walk_path()
159 g_string_append(cmd_line, after_device_str->str); in walk_path()
162 g_string_append(cmd_line, cmd_line2->str); in walk_path()
167 * The path must not have the <arch>, qtest_add_data_func adds it. in walk_path()
171 /* Check that this is the test we care about: */ in walk_path()
196 fuzz_target_name = t->name; in qos_get_cmdline()
208 qos_add_test(fuzz_opts->name, interface, NULL, opts); in fuzz_add_qos_target()
209 fuzz_opts->get_init_cmdline = qos_get_cmdline; in fuzz_add_qos_target()