Lines Matching refs:thp
77 test_deserialize(topo_hdl_t *thp, const char *path) in test_deserialize() argument
103 tdg = topo_digraph_deserialize(thp, buf, statbuf.st_size); in test_deserialize()
122 test_paths_cb(topo_hdl_t *thp, topo_vertex_t *vtx, boolean_t last_vtx, in test_paths_cb() argument
134 test_paths(topo_hdl_t *thp, topo_digraph_t *tdg) in test_paths() argument
143 if (topo_vertex_iter(thp, tdg, test_paths_cb, &cbarg) != 0) { in test_paths()
149 if (topo_digraph_paths(thp, tdg, vertices[0], vertices[4], &paths, in test_paths()
159 topo_path_destroy(thp, paths[i]); in test_paths()
161 topo_hdl_free(thp, paths, np * sizeof (topo_path_t *)); in test_paths()
164 if (topo_digraph_paths(thp, tdg, vertices[6], vertices[4], &paths, in test_paths()
174 topo_path_destroy(thp, paths[i]); in test_paths()
176 topo_hdl_free(thp, paths, np * sizeof (topo_path_t *)); in test_paths()
179 if (topo_digraph_paths(thp, tdg, vertices[5], vertices[1], &paths, in test_paths()
193 topo_path_destroy(thp, paths[i]); in test_paths()
195 topo_hdl_free(thp, paths, np * sizeof (topo_path_t *)); in test_paths()
201 test_serialize(topo_hdl_t *thp, topo_digraph_t *tdg, const char *path) in test_serialize() argument
211 if (topo_digraph_serialize(thp, tdg, xml_out) != 0) { in test_serialize()
223 topo_hdl_t *thp = NULL; in main() local
240 if ((thp = topo_open(TOPO_VERSION, root, &err)) == NULL) { in main()
246 if ((tdg = test_deserialize(thp, TEST_HOME TEST_XML_IN)) == NULL) { in main()
260 if (test_serialize(thp, tdg, out_path) != 0) { in main()
267 topo_close(thp); in main()
270 if ((thp = topo_open(TOPO_VERSION, root, &err)) == NULL) { in main()
276 if ((tdg = test_deserialize(thp, out_path)) == NULL) { in main()
283 if (test_paths(thp, tdg) != 0) { in main()
290 topo_close(thp); in main()
293 if ((thp = topo_open(TOPO_VERSION, root, &err)) == NULL) { in main()
306 if ((tdg = test_deserialize(thp, TEST_HOME TEST_XML_IN_BADSCHEME)) != in main()
310 } else if (topo_hdl_errno(thp) == 0) { in main()
319 if ((tdg = test_deserialize(thp, TEST_HOME TEST_XML_IN_BADNUM)) != in main()
323 } else if (topo_hdl_errno(thp) == 0) { in main()
332 if ((tdg = test_deserialize(thp, TEST_HOME TEST_XML_IN_BADEDGE)) != in main()
336 } else if (topo_hdl_errno(thp) == 0) { in main()
345 if ((tdg = test_deserialize(thp, TEST_HOME TEST_XML_IN_BADELEMENT)) != in main()
349 } else if (topo_hdl_errno(thp) == 0) { in main()
367 if (thp != NULL) { in main()
368 topo_close(thp); in main()