tests: Mark tests with AddressSanitizer-detected leaks

Various tests have leaks where it isn't clear whether the data is
intentionally not freed, or leaked due to a bug. If we mark these
tests as TODO, we can skip them under AddressSanitizer and get the
rest to pass, giving us a baseline from which to avoid regressions.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2021-01-29 19:28:25 +00:00
parent 41ed1c6d5d
commit f378352051
7 changed files with 104 additions and 3 deletions

View File

@@ -4,6 +4,8 @@
#include <stdlib.h>
#include <gio/gio.h>
#include "glib/glib-private.h"
/* These tests were written for the inotify implementation.
* Other implementations may require slight adjustments in
* the tests, e.g. the length of timeouts
@@ -954,6 +956,11 @@ static void
test_file_hard_links (Fixture *fixture,
gconstpointer user_data)
{
#ifdef _GLIB_ADDRESS_SANITIZER
g_test_incomplete ("FIXME: Leaks an inotify data structure, see glib#2311");
(void) file_hard_links_output;
(void) file_hard_links_step;
#else
GError *error = NULL;
TestData data;
@@ -1004,6 +1011,7 @@ test_file_hard_links (Fixture *fixture,
g_object_unref (data.monitor);
g_object_unref (data.file);
g_object_unref (data.output_stream);
#endif
}
int