Skip to content

Commit a0879f2

Browse files
committed
[NFC][sanitizer] Skip O_TMPFILE if FS does not support it
1 parent b8248da commit a0879f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %run %t 2
55

66
#include <assert.h>
7+
#include <errno.h>
78
#include <fcntl.h>
89
#include <stdio.h>
910
#include <stdlib.h>
@@ -13,8 +14,11 @@
1314

1415
void test(const char *path, int flags) {
1516
int fd = open(path, flags, 0600);
16-
if (fd == -1)
17+
if (fd == -1) {
1718
perror(path);
19+
if (errno == EOPNOTSUPP)
20+
return;
21+
}
1822
assert(fd != -1);
1923
struct stat info;
2024
int result = fstat(fd, &info);

0 commit comments

Comments
 (0)