[compiler-rt] e5d174c - [NFC][sanitizer] Don't use FileCheck in test
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 22 12:36:23 PDT 2024
Author: Vitaly Buka
Date: 2024-09-22T12:35:56-07:00
New Revision: e5d174c792481d3b5094fd24be3b42d867a42dd9
URL: https://github.com/llvm/llvm-project/commit/e5d174c792481d3b5094fd24be3b42d867a42dd9
DIFF: https://github.com/llvm/llvm-project/commit/e5d174c792481d3b5094fd24be3b42d867a42dd9.diff
LOG: [NFC][sanitizer] Don't use FileCheck in test
`assert` is enough.
Added:
Modified:
compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp
index 1d77eb3765f504..88f9eb17c3439d 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp
@@ -1,25 +1,18 @@
-// RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp 2>&1 | FileCheck %s
+// RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp
-#include <stdio.h>
#include <assert.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
int main(int argc, char *argv[]) {
- fprintf(stderr, "Hello world.\n");
assert(argv[1]);
unlink(argv[1]);
int fd = open(argv[1], O_RDWR | O_CREAT, 0600);
assert(fd != -1);
struct stat info;
int result = fstat(fd, &info);
- fprintf(stderr, "permissions = 0%o\n", info.st_mode & ~S_IFMT);
+ assert((info.st_mode & ~S_IFMT) == 0600);
assert(result == 0);
close(fd);
- fprintf(stderr, "Done.\n");
}
-
-// CHECK: Hello world.
-// CHECK: permissions = 0600
-// CHECK: Done.
More information about the llvm-commits
mailing list