From 4d6bf4bd476271970967d2e0c511056026863853 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Wed, 2 Nov 2022 11:49:19 +0100 Subject: [PATCH] Disable test_MtaskerException on Apple Silicon if asan is enabled. Works around #12151 --- pdns/recursordist/test-mtasker.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pdns/recursordist/test-mtasker.cc b/pdns/recursordist/test-mtasker.cc index 6df5fc181c..fb678897be 100644 --- a/pdns/recursordist/test-mtasker.cc +++ b/pdns/recursordist/test-mtasker.cc @@ -40,6 +40,19 @@ BOOST_AUTO_TEST_CASE(test_Simple) BOOST_CHECK_EQUAL(g_result, o); } +#if defined(HAVE_FIBER_SANITIZER) && defined(__APPLE__) && defined(__arm64__) + +// This test is buggy on MacOS when compiled with asan. It also causes subsequents tests to report spurious issues. +// So switch it off for now +// See https://github.com/PowerDNS/pdns/issues/12151 + +BOOST_AUTO_TEST_CASE(test_MtaskerException) +{ + cerr << "test_MtaskerException test disabled on this platform with asan enabled, please fix" << endl; +} + +#else + static void willThrow(void* p) { throw std::runtime_error("Help!"); @@ -59,4 +72,7 @@ BOOST_AUTO_TEST_CASE(test_MtaskerException) }, std::exception); } + +#endif // defined(HAVE_FIBER_SANITIZER) && defined(__APPLE__) && defined(__arm64__) + BOOST_AUTO_TEST_SUITE_END() -- 2.47.2