diff --git a/compiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp b/compiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp --- a/compiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp +++ b/compiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsanitize=returns-nonnull-attribute -w %s -O3 -o %t -// RUN: %run %t foo 2>&1 | count 0 +// RUN: %run %t foo 2>&1 | FileCheck %s --check-prefix=NOERROR --allow-empty --implicit-check-not='runtime error' // RUN: %run %t 2>&1 | FileCheck %s // RUN: %clangxx -fsanitize=returns-nonnull-attribute -fno-sanitize-recover=returns-nonnull-attribute -w %s -O3 -o %t.abort // RUN: not %run %t.abort &> /dev/null @@ -40,3 +40,5 @@ return 0; } + +// NOERROR-NOT: runtime error diff --git a/compiler-rt/test/ubsan/TestCases/Misc/nullability.c b/compiler-rt/test/ubsan/TestCases/Misc/nullability.c --- a/compiler-rt/test/ubsan/TestCases/Misc/nullability.c +++ b/compiler-rt/test/ubsan/TestCases/Misc/nullability.c @@ -1,6 +1,6 @@ // UNSUPPORTED: android // RUN: %clang -w -fsanitize=nullability-arg,nullability-assign,nullability-return %s -O3 -o %t -// RUN: %run %t foo 2>&1 | count 0 +// RUN: %run %t foo 2>&1 | FileCheck %s --check-prefix=NOERROR --allow-empty --implicit-check-not='runtime error' // RUN: %run %t 2>&1 | FileCheck %s // RUN: echo "nullability-arg:nullability.c" > %t.supp @@ -67,3 +67,5 @@ nonnull_init2(p); return 0; } + +// NOERROR-NOT: runtime error