From be88971917d964d5e061a81c26ce94f66d98cf38 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 25 Jul 2018 12:38:23 +0000 Subject: [Asan][Msan] Unit tests Disable some tests for FreeBSD Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D49784 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337913 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/Posix/asan-sigbus.cpp | 2 ++ test/asan/TestCases/Posix/fread_fwrite.cc | 3 +++ test/asan/TestCases/Posix/stack-use-after-return.cc | 4 +++- test/msan/dtls_test.c | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/asan/TestCases/Posix/asan-sigbus.cpp b/test/asan/TestCases/Posix/asan-sigbus.cpp index 1418dc446..baf1e4266 100644 --- a/test/asan/TestCases/Posix/asan-sigbus.cpp +++ b/test/asan/TestCases/Posix/asan-sigbus.cpp @@ -5,6 +5,8 @@ // RUN: %env_asan_opts=handle_sigbus=0 not --crash %run %t 2>&1 | FileCheck %s // UNSUPPORTED: ios +// Instead of getting a SIGBUS error, we get a SIGSEGV +// XFAIL: freebsd #include #include diff --git a/test/asan/TestCases/Posix/fread_fwrite.cc b/test/asan/TestCases/Posix/fread_fwrite.cc index c06292604..640248860 100644 --- a/test/asan/TestCases/Posix/fread_fwrite.cc +++ b/test/asan/TestCases/Posix/fread_fwrite.cc @@ -1,6 +1,9 @@ // RUN: %clangxx_asan -g %s -o %t // RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-FWRITE // RUN: not %run %t 1 2>&1 | FileCheck %s --check-prefix=CHECK-FREAD +// +// On FreeBSD stack overflow error instead +// XFAIL: freebsd #include #include diff --git a/test/asan/TestCases/Posix/stack-use-after-return.cc b/test/asan/TestCases/Posix/stack-use-after-return.cc index 2b9f1d474..237c880f8 100644 --- a/test/asan/TestCases/Posix/stack-use-after-return.cc +++ b/test/asan/TestCases/Posix/stack-use-after-return.cc @@ -16,6 +16,8 @@ // This test runs out of stack on AArch64. // UNSUPPORTED: aarch64 +// stack size log lower than expected +// XFAIL: freebsd // FIXME: Fix this test for dynamic runtime on arm linux. // UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime @@ -95,7 +97,7 @@ int main(int argc, char **argv) { if (stacksize_check != desired_stack_size) { fprintf(stderr, "Unable to set stack size to %d, the stack size is %d.\n", - desired_stack_size, stacksize_check); + (int)desired_stack_size, (int)stacksize_check); abort(); } } diff --git a/test/msan/dtls_test.c b/test/msan/dtls_test.c index bcb1c1803..b9021e0da 100644 --- a/test/msan/dtls_test.c +++ b/test/msan/dtls_test.c @@ -6,7 +6,7 @@ see https://sourceware.org/bugzilla/show_bug.cgi?id=16291 and https://github.com/google/sanitizers/issues/547 - XFAIL: freebsd + XFAIL: FreeBSD UNSUPPORTED: powerpc */ -- cgit v1.2.3