Skip to content

Commit

Permalink
[NFC][sanitizer] Skip O_TMPFILE if FS does not support it
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybuka committed Sep 23, 2024
1 parent b8248da commit a0879f2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %run %t 2

#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
Expand All @@ -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);
Expand Down

0 comments on commit a0879f2

Please sign in to comment.