Skip to content

Commit

Permalink
[NFC][sanitizer] Undo "RUN:" part of 4ab22d7
Browse files Browse the repository at this point in the history
It was not compartible with mobile tests.
  • Loading branch information
vitalybuka committed Sep 22, 2024
1 parent 123e8c7 commit 2603c8b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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);
Expand All @@ -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
}

0 comments on commit 2603c8b

Please sign in to comment.