File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
compiler-rt/test/sanitizer_common/TestCases/Posix Expand file tree Collapse file tree 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
22
3- #include < stdio.h>
43#include < assert.h>
54#include < fcntl.h>
65#include < unistd.h>
76#include < sys/stat.h>
87
98int main (int argc, char *argv[]) {
10- fprintf (stderr, " Hello world.\n " );
119 assert (argv[1 ]);
1210 unlink (argv[1 ]);
1311 int fd = open (argv[1 ], O_RDWR | O_CREAT, 0600 );
1412 assert (fd != -1 );
1513 struct stat info;
1614 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 );
1816 assert (result == 0 );
1917 close (fd);
20- fprintf (stderr, " Done.\n " );
2118}
22-
23- // CHECK: Hello world.
24- // CHECK: permissions = 0600
25- // CHECK: Done.
You can’t perform that action at this time.
0 commit comments