Commit b49a45ec authored by Christian Kellner's avatar Christian Kellner

test: journal: don't 'exit' but return from fork

In the /journal/object test, a subprocess is created and at the
end of the child process' code an exit call was made to end it.
For some reason (not sure why) that would generate a leak warning
for the child (generating a negative exit code), making the main
test fail at "g_test_trap_assert_passed". Now instead we simply
return in the child.

Child leak warning when using 'exit()':

==18507==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f9b8cccbc88 in realloc (/lib64/libasan.so.5+0xefc88)
    #1 0x7f9b8cb1105d in g_realloc (/lib64/libglib-2.0.so.0+0x5405d)
parent d0626820
Pipeline #10168 passed with stage
in 4 minutes and 2 seconds
......@@ -142,7 +142,7 @@ test_journal_object (TestJournal *tt, gconstpointer user_data)
g_assert_null (j);
g_clear_pointer (&err, g_error_free);
exit (0);
return;
}
g_test_trap_subprocess (NULL, 0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment