From 9aad9022e8b91e9772bd2ead53dd8a982826c52c Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 19 May 2016 14:19:57 +0200 Subject: [PATCH] libnm-util: skip linking test when address sanitizer is enabled The linking test causes a crash to check whether libnm and libnm-util are both linked. If abrt or systemd-coredump are enabled, the core dump processing will take a long time when the address sanitizer is enabled, due to the huge process address space. It seems a good choice to disable the test when NM was compiled with -fsanitize=address. --- libnm-util/tests/test-general.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c index 9299bd5b11..d4a7cd4a90 100644 --- a/libnm-util/tests/test-general.c +++ b/libnm-util/tests/test-general.c @@ -2392,6 +2392,13 @@ test_connection_normalize_virtual_iface_name (void) g_object_unref (con); } +#if defined (__SANITIZE_ADDRESS__) +static void +test_libnm_linking (void) +{ + g_test_skip ("Skipping test since address sanitizer is enabled"); +} +#else /* __SANITIZE_ADDRESS__ */ static void _test_libnm_linking_setup_child_process (gpointer user_data) { @@ -2431,6 +2438,7 @@ test_libnm_linking (void) g_free (out); g_free (err); } +#endif /* __SANITIZE_ADDRESS__ */ /******************************************************************************/