[compiler-rt] 2603c8b - [NFC][sanitizer] Undo "RUN:" part of 4ab22d7b3cc92d08c6371df367ae21716d1b6942

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 22 13:48:09 PDT 2024


Author: Vitaly Buka
Date: 2024-09-22T13:47:58-07:00
New Revision: 2603c8b23be06116bc61bda36fae05b81d906c3f

URL: https://github.com/llvm/llvm-project/commit/2603c8b23be06116bc61bda36fae05b81d906c3f
DIFF: https://github.com/llvm/llvm-project/commit/2603c8b23be06116bc61bda36fae05b81d906c3f.diff

LOG: [NFC][sanitizer] Undo "RUN:" part of 4ab22d7b3cc92d08c6371df367ae21716d1b6942

It was not compartible with mobile tests.

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 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 <assert.h>
 #include <fcntl.h>
@@ -9,10 +7,9 @@
 #include <unistd.h>
 
 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
 }


        


More information about the llvm-commits mailing list