aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/fs/fusefs/opendir.cc
Commit message (Collapse)AuthorAgeFilesLines
* fusefs: implement FUSE_NO_OPEN_SUPPORT and FUSE_NO_OPENDIR_SUPPORTAlan Somers2021-09-271-0/+48
| | | | | | | | | | For file systems that allow it, fusefs will skip FUSE_OPEN, FUSE_RELEASE, FUSE_OPENDIR, and FUSE_RELEASEDIR operations, a minor optimization. MFC after: 2 weeks Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D32141
* fusefs tests: quell Coverity "Argument cannot be negative" warningsAlan Somers2020-10-021-1/+1
| | | | | | | | | | | | | Must abort tests early if open(2) fails. Reported by: Coverity Coverity CID: 1432810 and many others Reviewed by: kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26635 Notes: svn path=/head/; revision=366365
* fusefs: fix intermittency in some ENOENT testsAlan Somers2020-05-181-0/+11
| | | | | | | | | | | | | When a FUSE operation other than LOOKUP returns ENOENT, the kernel will reclaim that vnode, resuling in a FUSE_FORGET being sent a short while later. Many of the ENOENT tests weren't expecting those FUSE_FORGET operations. They usually passed by luck since FUSE_FORGET is often delayed. This commit adds appropriate expectations. MFC after: 2 weeks Notes: svn path=/head/; revision=361223
* fusefs: fix some minor Coverity CIDs in the testsAlan Somers2019-09-161-1/+1
| | | | | | | | | | | | | | Where open(2) is expected to fail, the tests should assert or expect that its return value is -1. These tests all accepted too much but happened to pass anyway. Reported by: Coverity Coverity CID: 1404512, 1404378, 1404504, 1404483 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=352413
* fusefs: coverity cleanup in the testsAlan Somers2019-09-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address the following defects reported by Coverity: * Structurally dead code (CID 1404366): set m_quit before FAIL, not after * Unchecked return value of sysctlbyname (CID 1404321) * Unchecked return value of stat(2) (CID 1404471) * Unchecked return value of open(2) (CID 1404402, 1404529) * Unchecked return value of dup(2) (CID 1404478) * Buffer overflows. These are all false positives caused by the fact that Coverity thinks I'm using a buffer to store strings, when in fact I'm really just using it to store a byte array that happens to be initialized with a string. I'm changing the type from char to uint8_t in the hopes that it will placate Coverity. (CID 1404338, 1404350, 1404367, 1404376, 1404379, 1404381, 1404388, 1404403, 1404425, 1404433, 1404434, 1404474, 1404480, 1404484, 1404503, 1404505) * False positive file descriptor leak. I'm going to try to fix this with Coverity modeling, but I'll also change an EXPECT to ASSERT so we don't perform meaningless assertions after the failure. (CID 1404320, 1404324, 1404440, 1404445). * Unannotated file descriptor leak. This will be followed up by a Coverity modeling change. (CID 1404326, 1404334, 1404336, 1404357, 1404361, 1404372, 1404391, 1404395, 1404409, 1404430, 1404448, 1404451, 1404455, 1404457, 1404458, 1404460) * Uninitialized variables in C++ constructors (CID 1404327, 1404346). In the case of m_maxphys, this actually led to part of the FUSE_INIT's response being set to stack garbage during the WriteCluster::clustering test. * Uninitialized sun_len field in struct sockaddr_un (CID 1404330, 1404371, 1404429). Reported by: Coverity Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21457 Notes: svn path=/head/; revision=351963
* fusefs: add SVN Keywords to the test filesAlan Somers2019-08-131-0/+2
| | | | | | | | | | Reported by: SVN pre-commit hooks MFC after: 15 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350990
* fusefs: fix warnings in the tests reported by GCCAlan Somers2019-07-201-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350163
* fusefs: make the tests more cplusplusyAlan Somers2019-05-271-8/+8
| | | | | | | | | | | | * Prefer std::unique_ptr to raw pointers * Prefer pass-by-reference to pass-by-pointer * Prefer static_cast to C-style cast, unless it's too much typing Reported by: ngie Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=348307
* fusefs: allow opening files O_EXECAlan Somers2019-04-011-41/+49
| | | | | | | | | | | | O_EXEC is useful for fexecve(2) and fchdir(2). Treat it as another fufh type alongside the existing RDONLY, WRONLY, and RDWR. Prior to r345742 this would've caused a memory and performance penalty. PR: 236329 Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=345768
* fusefs: adapt the tests to the fuse => fusefs renameAlan Somers2019-03-211-0/+147
Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=345356