diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp index 62fcab0316f78f..81696680c549ea 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp @@ -4,6 +4,7 @@ // RUN: %run %t 2 #include +#include #include #include #include @@ -13,8 +14,11 @@ void test(const char *path, int flags) { int fd = open(path, flags, 0600); - if (fd == -1) + if (fd == -1) { perror(path); + if (errno == EOPNOTSUPP) + return; + } assert(fd != -1); struct stat info; int result = fstat(fd, &info);