diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2010-08-27 18:07:28 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-08-27 18:20:52 +0100 |
commit | 5873b31d471a40644b421c98adf5dc9d78d414f1 (patch) | |
tree | 84924fdd16939ea7b935633697f0def5df910535 /test | |
parent | c02bc1b59ef2463ef542c1f08d77a42e9de6d003 (diff) |
Convert loader to use GIO
Direct use of POSIX/stdc I/O is deprecated in favour of
the GIO system. Re-write the OsinfoLoader to use GIO
for loading XML from arbitrary paths/uris.
* configure.ac: Check for GIO library
* osinfo/Makefile.am: Link to GIO
* osinfo/osinfo_loader.c, osinfo/osinfo_loader.h: Port
to GIO
* test/osinfo.suppression: Supress many GIO data types
* test/test-loader.c: update for new GIO api.
Diffstat (limited to 'test')
-rw-r--r-- | test/osinfo.suppression | 223 | ||||
-rw-r--r-- | test/test-loader.c | 2 |
2 files changed, 224 insertions, 1 deletions
diff --git a/test/osinfo.suppression b/test/osinfo.suppression index c8bf4d9..9d1be18 100644 --- a/test/osinfo.suppression +++ b/test/osinfo.suppression @@ -99,6 +99,42 @@ { <insert_a_suppression_name_here> Memcheck:Leak + fun:realloc + fun:g_realloc + fun:type_node_any_new_W + fun:g_type_register_static + fun:g_type_register_static_simple + fun:g_input_stream_get_type + fun:g_file_input_stream_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_add_iface_entry_W + fun:type_add_interface_Wm + fun:g_type_add_interface_static + fun:_g_local_file_input_stream_get_type + fun:_g_local_file_input_stream_new +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_add_iface_entry_W + fun:type_add_interface_Wm + fun:g_type_add_interface_static + fun:g_io_module_load +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak fun:malloc fun:realloc fun:g_realloc @@ -112,6 +148,193 @@ { <insert_a_suppression_name_here> Memcheck:Leak + fun:malloc + fun:realloc + fun:g_memdup + fun:type_iface_vtable_base_init_Wm + fun:g_type_class_ref + fun:g_type_class_ref + fun:g_object_newv + fun:g_object_new + fun:_g_local_file_input_stream_new + fun:g_local_file_read +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_memdup + fun:type_iface_vtable_base_init_Wm + fun:g_type_class_ref + fun:g_object_newv + fun:g_object_new + fun:_g_local_file_new +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_memdup + fun:type_iface_vtable_base_init_Wm + fun:g_type_class_ref + fun:g_type_class_ref + fun:g_object_newv + fun:g_object_new + fun:_g_local_file_input_stream_new +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:realloc + fun:g_realloc + fun:type_node_any_new_W + fun:g_type_register_static + fun:g_type_register_static_simple + fun:g_file_descriptor_based_get_type + fun:_g_local_file_input_stream_get_type + fun:_g_local_file_input_stream_new +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_memdup + fun:type_iface_vtable_base_init_Wm + fun:g_type_class_ref + fun:g_object_new_valist + fun:g_object_new +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_memdup + fun:type_iface_vtable_base_init_Wm + fun:g_type_class_ref + fun:g_type_class_ref + fun:g_object_newv + fun:g_object_new +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_any_new_W + fun:g_type_register_static + fun:g_type_register_static_simple + fun:_g_local_file_input_stream_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_add_iface_entry_W + fun:type_add_interface_Wm + fun:g_type_add_interface_static + fun:g_file_input_stream_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_add_iface_entry_W + fun:type_add_interface_Wm + fun:g_type_add_interface_static + fun:g_themed_icon_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_add_iface_entry_W + fun:type_add_interface_Wm + fun:g_type_add_interface_static + fun:g_vfs_icon_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:realloc + fun:g_realloc + fun:type_node_any_new_W + fun:g_type_register_static + fun:g_type_register_static_simple + fun:g_io_module_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_any_new_W + fun:g_type_register_static + fun:g_type_register_static_simple + fun:g_io_module_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:type_node_add_iface_entry_W + fun:type_add_interface_Wm + fun:g_type_add_interface_static + fun:g_type_module_get_type +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_slice_alloc + fun:_g_atomic_array_copy + fun:iface_node_set_offset_L + fun:type_node_add_iface_entry_W + fun:type_add_interface_Wm + fun:g_type_add_interface_static +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:realloc + fun:g_realloc + fun:type_node_any_new_W + fun:g_type_register_static + fun:g_boxed_type_register_static +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_memdup + fun:type_iface_vtable_base_init_Wm + fun:g_type_class_ref + fun:g_object_newv +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak fun:realloc fun:g_realloc fun:type_node_any_new_W diff --git a/test/test-loader.c b/test/test-loader.c index 8f65f58..0645040 100644 --- a/test/test-loader.c +++ b/test/test-loader.c @@ -9,7 +9,7 @@ START_TEST(test_basic) fail_unless(OSINFO_IS_LOADER(loader), "Loader is not a LOADER"); GError *error = NULL; - osinfo_loader_process(loader, "../data", &error); + osinfo_loader_process_path(loader, "../data", &error); fail_unless(error == NULL, error ? error->message : "none"); g_object_unref(loader); |