Comment 28 for bug 1988440

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Hmmm... the bugs are in the test_xmlb.c file, not in the library! These variables are defined as autofree/autoptr

    g_autofree gchar *blobfn = NULL;
    g_autoptr(GPtrArray) parent_appdata = g_ptr_array_new_with_free_func (g_free);
    g_autoptr(GPtrArray) parent_appstream = g_ptr_array_new_with_free_func (g_free);

but then, they are assigned static values:

    blobfn = ("/tmp/components.xmlb");

    g_ptr_array_add (parent_appstream, "test_files/xmls1");
    g_ptr_array_add (parent_appstream, "test_files/xmls4");
    g_ptr_array_add (parent_appstream, "test_files/xmls5");
    g_ptr_array_add (parent_appstream, "test_files/yaml6");
    g_ptr_array_add (parent_appdata, "test_files/metainfo1");
    g_ptr_array_add (parent_appdata, "test_files/metainfo2");
    g_ptr_array_add (parent_appdata, "test_files/appdata2");

That's why the test fails. It's not a problem in libxmlb. I'll fix this.