File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler-rt/test/sanitizer_common/TestCases/Posix Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 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
4
2
5
3
#include < assert.h>
6
4
#include < fcntl.h>
9
7
#include < unistd.h>
10
8
11
9
void test (const char *path, int flags) {
12
- assert (path);
13
10
int fd = open (path, flags, 0600 );
14
11
if (fd == -1 )
15
- perror ( " open " );
12
+ perror (path );
16
13
assert (fd != -1 );
17
14
struct stat info;
18
15
int result = fstat (fd, &info);
@@ -23,9 +20,12 @@ void test(const char *path, int flags) {
23
20
24
21
int main (int argc, char *argv[]) {
25
22
assert (argc == 3 );
23
+ assert (argv[1 ]);
24
+ unlink (argv[1 ]);
26
25
test (argv[1 ], O_RDWR | O_CREAT);
27
26
28
27
#ifdef O_TMPFILE
28
+ assert (argv[2 ]);
29
29
test (argv[2 ], O_RDWR | O_TMPFILE);
30
30
#endif
31
31
}
You can’t perform that action at this time.
0 commit comments