diff options
author | Luis Henriques <luis-henrix@users.noreply.github.com> | 2021-11-20 10:09:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-20 10:09:25 +0000 |
commit | cee6de8d6619aeeb70f3318dfd35f2fdf5e43848 (patch) | |
tree | ce29e2dcc5d96b5544e602792a301b7efbf8a907 | |
parent | d709c24cbd9e1041264c551c2a4445e654eaf429 (diff) | |
download | fuse-cee6de8d6619aeeb70f3318dfd35f2fdf5e43848.tar.gz |
test/test_syscalls.c: allow EBADF in fcheck_stat() (#631)
Test test/test_examples.py::test_passthrough_hp[False] fails because, on
kernels >= 5.14, fstat() will return -EBADF:
3 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
4 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
5 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
9 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
...
This patch simply whitelists the EBADF errno code.
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Co-authored-by: Luís Henriques <lhenriques@suse.de>
-rw-r--r-- | test/test_syscalls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_syscalls.c b/test/test_syscalls.c index 160a2ac..65292ed 100644 --- a/test/test_syscalls.c +++ b/test/test_syscalls.c @@ -277,7 +277,8 @@ static int fcheck_stat(int fd, int flags, struct stat *st) if (flags & O_PATH) { // With O_PATH fd, the server does not have to keep // the inode alive so FUSE inode may be stale or bad - if (errno == ESTALE || errno == EIO || errno == ENOENT) + if (errno == ESTALE || errno == EIO || + errno == ENOENT || errno == EBADF) return 0; } PERROR("fstat"); |