File tree 1 file changed +2
-9
lines changed
compiler-rt/test/sanitizer_common/TestCases/Posix
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp 2>&1 | FileCheck %s
1
+ // RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp
2
2
3
- #include < stdio.h>
4
3
#include < assert.h>
5
4
#include < fcntl.h>
6
5
#include < unistd.h>
7
6
#include < sys/stat.h>
8
7
9
8
int main (int argc, char *argv[]) {
10
- fprintf (stderr, " Hello world.\n " );
11
9
assert (argv[1 ]);
12
10
unlink (argv[1 ]);
13
11
int fd = open (argv[1 ], O_RDWR | O_CREAT, 0600 );
14
12
assert (fd != -1 );
15
13
struct stat info;
16
14
int result = fstat (fd, &info);
17
- fprintf (stderr, " permissions = 0%o \n " , info.st_mode & ~S_IFMT);
15
+ assert (( info.st_mode & ~S_IFMT) == 0600 );
18
16
assert (result == 0 );
19
17
close (fd);
20
- fprintf (stderr, " Done.\n " );
21
18
}
22
-
23
- // CHECK: Hello world.
24
- // CHECK: permissions = 0600
25
- // CHECK: Done.
You can’t perform that action at this time.
0 commit comments