From 2603c8b23be06116bc61bda36fae05b81d906c3f Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Sun, 22 Sep 2024 13:47:02 -0700 Subject: [PATCH] [NFC][sanitizer] Undo "RUN:" part of 4ab22d7b3cc92d08c6371df367ae21716d1b6942 It was not compartible with mobile tests. --- .../sanitizer_common/TestCases/Posix/variadic-open.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 8b269f23dd6396..e32294770b882b 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp @@ -1,6 +1,4 @@ -// RUN: rm -rf %t.tmp -// RUN: mkdir -p %t.tmp -// RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp/1 %t.tmp +// RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp %T #include #include @@ -9,10 +7,9 @@ #include void test(const char *path, int flags) { - assert(path); int fd = open(path, flags, 0600); if (fd == -1) - perror ("open"); + perror(path); assert(fd != -1); struct stat info; int result = fstat(fd, &info); @@ -23,9 +20,12 @@ void test(const char *path, int flags) { int main(int argc, char *argv[]) { assert(argc == 3); + assert(argv[1]); + unlink(argv[1]); test(argv[1], O_RDWR | O_CREAT); #ifdef O_TMPFILE +assert(argv[2]); test(argv[2], O_RDWR | O_TMPFILE); #endif }