Make ubsan suppression test pass on Windows.
llvm-svn: 257183
This commit is contained in:
parent
2a6368f609
commit
2beaab358c
|
@ -1,31 +1,23 @@
|
||||||
// XFAIL: win32
|
|
||||||
// On Windows, %t starts with c:\. lit's ShLexer helpfully strips the
|
|
||||||
// quotes in the suppressions="%t..." lines below, so the UBSAN_OPTIONS
|
|
||||||
// env var that ubsan effectively sees is halt_on_error=1:suppressions=c:\...
|
|
||||||
// without any quotes. Since : is ubsan's UBSAN_OPTIONS separator, this
|
|
||||||
// confuses sanitizer_flag_parser.
|
|
||||||
// FIXME: Figure out how to make this test go on Windows.
|
|
||||||
|
|
||||||
// RUN: %clangxx -fsanitize=integer -g0 %s -o %t
|
// RUN: %clangxx -fsanitize=integer -g0 %s -o %t
|
||||||
|
|
||||||
// Fails without any suppression.
|
// Fails without any suppression.
|
||||||
// RUN: %env_ubsan_opts=halt_on_error=1 not %run %t 2>&1 | FileCheck %s
|
// RUN: %env_ubsan_opts=halt_on_error=1 not %run %t 2>&1 | FileCheck %s
|
||||||
|
|
||||||
// RUN: echo "signed-integer-overflow:%t" > %t.wrong-supp
|
// RUN: echo "signed-integer-overflow:%t" > %t.wrong-supp
|
||||||
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions="%t.wrong-supp" not %run %t 2>&1 | FileCheck %s
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.wrong-supp"' not %run %t 2>&1 | FileCheck %s
|
||||||
|
|
||||||
// RUN: echo "unsigned-integer-overflow:do_overflow" > %t.func-supp
|
// RUN: echo "unsigned-integer-overflow:do_overflow" > %t.func-supp
|
||||||
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions="%t.func-supp" %run %t
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.func-supp"' %run %t
|
||||||
// RUN: echo "unsigned-integer-overflow:%t" > %t.module-supp
|
// RUN: echo "unsigned-integer-overflow:%t" > %t.module-supp
|
||||||
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions="%t.module-supp" %run %t
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.module-supp"' %run %t
|
||||||
|
|
||||||
// Note: file-level suppressions should work even without debug info.
|
// Note: file-level suppressions should work even without debug info.
|
||||||
// RUN: echo "unsigned-integer-overflow:%s" > %t.file-supp
|
// RUN: echo "unsigned-integer-overflow:%s" > %t.file-supp
|
||||||
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions="%t.file-supp" %run %t
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.file-supp"' %run %t
|
||||||
|
|
||||||
// Suppressions don't work for unrecoverable kinds.
|
// Suppressions don't work for unrecoverable kinds.
|
||||||
// RUN: %clangxx -fsanitize=integer -fno-sanitize-recover=integer %s -o %t-norecover
|
// RUN: %clangxx -fsanitize=integer -fno-sanitize-recover=integer %s -o %t-norecover
|
||||||
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions="%t.module-supp" not %run %t-norecover 2>&1 | FileCheck %s
|
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.module-supp"' not %run %t-norecover 2>&1 | FileCheck %s
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue