gio/tests/subprocess: Skip the trapped test under ASAN since it uses ptrace

And as the sanitizer tells us, it doesn't support it
This commit is contained in:
Marco Trevisan (Treviño) 2024-05-08 23:03:31 +02:00
parent 19d7040047
commit 84259c46fa

View File

@ -1,3 +1,4 @@
#include "glib-private.h"
#include <gio/gio.h>
#include <string.h>
@ -2073,6 +2074,8 @@ trace_children (pid_t main_child)
static void
test_exit_status_trapped (void)
{
#ifndef _GLIB_ADDRESS_SANITIZER
#ifdef __linux__
GPtrArray *args = NULL;
pid_t test_child;
@ -2103,6 +2106,13 @@ test_exit_status_trapped (void)
#else
g_test_skip ("ptrace() support for this test is only tested on Linux");
#endif
#else /* if defined (_GLIB_ADDRESS_SANITIZER) */
g_test_skip ("LeakSanitizer does not work under ptrace");
(void) trace_children;
#endif /* _GLIB_ADDRESS_SANITIZER */
}
#endif /* G_OS_UNIX */