Skip to content

Commit 2603c8b

Browse files
committed
[NFC][sanitizer] Undo "RUN:" part of 4ab22d7
It was not compartible with mobile tests.
1 parent 123e8c7 commit 2603c8b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// RUN: rm -rf %t.tmp
2-
// RUN: mkdir -p %t.tmp
3-
// RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp/1 %t.tmp
1+
// RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp %T
42

53
#include <assert.h>
64
#include <fcntl.h>
@@ -9,10 +7,9 @@
97
#include <unistd.h>
108

119
void test(const char *path, int flags) {
12-
assert(path);
1310
int fd = open(path, flags, 0600);
1411
if (fd == -1)
15-
perror ("open");
12+
perror(path);
1613
assert(fd != -1);
1714
struct stat info;
1815
int result = fstat(fd, &info);
@@ -23,9 +20,12 @@ void test(const char *path, int flags) {
2320

2421
int main(int argc, char *argv[]) {
2522
assert(argc == 3);
23+
assert(argv[1]);
24+
unlink(argv[1]);
2625
test(argv[1], O_RDWR | O_CREAT);
2726

2827
#ifdef O_TMPFILE
28+
assert(argv[2]);
2929
test(argv[2], O_RDWR | O_TMPFILE);
3030
#endif
3131
}

0 commit comments

Comments
 (0)