History log of /src/tests/sys/fs/fusefs/create.cc (Results 1 – 25 of 31)
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 0bef4927 04-May-2022 Alan Somers <asomers@FreeBSD.org>

fusefs: handle evil servers that return illegal inode numbers

* If during FUSE_CREATE, FUSE_MKDIR, etc the server returns the same
inode number for the new file as for its parent directory, reject

fusefs: handle evil servers that return illegal inode numbers

* If during FUSE_CREATE, FUSE_MKDIR, etc the server returns the same
inode number for the new file as for its parent directory, reject it.
Previously this would triggers a recurse-on-non-recursive lock panic.

* If during FUSE_LINK the server returns a different inode number for
the new name as for the old one, reject it. Obviously, that can't be
a hard link.

* If during FUSE_LOOKUP the server returns the same inode number for the
new file as for its parent directory, reject it. Nothing good can
come of this.

PR: 263662
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 2 weeks
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D35128

show more ...


# 45825a12 28-Apr-2022 Alan Somers <asomers@FreeBSD.org>

fusefs: fix FUSE_CREATE with file handles and fuse protocol < 7.9

Prior to fuse protocol version 7.9, the fuse_entry_out structure had a
smaller size. But fuse_vnop_create did not take that into ac

fusefs: fix FUSE_CREATE with file handles and fuse protocol < 7.9

Prior to fuse protocol version 7.9, the fuse_entry_out structure had a
smaller size. But fuse_vnop_create did not take that into account when
working with servers that use older protocols. The bug does not matter
for servers which don't use file handles or open flags (the only fields
affected).

PR: 263625
Submitted by: Ali Abdallah <ali.abdallah@suse.com>
MFC after: 2 weeks

show more ...


# d2621689 02-Oct-2020 Alan Somers <asomers@FreeBSD.org>

fusefs tests: quell Coverity "Argument cannot be negative" warnings

Must abort tests early if open(2) fails.

Reported by: Coverity
Coverity CID: 1432810 and many others
Reviewed by: kevans
MFC afte

fusefs tests: quell Coverity "Argument cannot be negative" warnings

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

show more ...


# 4ca1c0b7 16-Sep-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: fix some minor Coverity CIDs in the tests

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

fusefs: fix some minor Coverity CIDs in the tests

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

show more ...


# 1fa8ebfb 13-Aug-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: add SVN Keywords to the test files

Reported by: SVN pre-commit hooks
MFC after: 15 days
MFC-With: r350665
Sponsored by: The FreeBSD Foundation


# 7fc0921d 26-Jun-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: annotate deliberate file descriptor leaks in the tests

closing a file descriptor causes FUSE activity that is superfluous to the
purpose of most tests, but would nonetheless require matching

fusefs: annotate deliberate file descriptor leaks in the tests

closing a file descriptor causes FUSE activity that is superfluous to the
purpose of most tests, but would nonetheless require matching expectations.
Rather than do that, most tests deliberately leak file descriptors instead.
This commit moves the leakage from each test into two trivial functions:
leak and leakdir. Hopefully Coverity will only complain about those
functions and not all of their callers.

Sponsored by: The FreeBSD Foundation

show more ...


# a34cdd26 31-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: prefer FUSE_ROOT_ID to literal 1 in the tests

Sponsored by: The FreeBSD Foundation


# a4856c96 29-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: raise protocol level to 7.12

This commit raises the protocol level and adds backwards-compatibility code
to handle structure size changes. It doesn't implement any new features.
The new fea

fusefs: raise protocol level to 7.12

This commit raises the protocol level and adds backwards-compatibility code
to handle structure size changes. It doesn't implement any new features.
The new features added in protocol 7.12 are:

* server-side umask processing (which FreeBSD won't do)
* asynchronous inode and directory entry invalidation (which I'll do next)

Sponsored by: The FreeBSD Foundation

show more ...


# 29edc611 27-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: make the tests more cplusplusy

* 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

Repor

fusefs: make the tests more cplusplusy

* 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

show more ...


# 16bd2d47 16-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: Upgrade FUSE protocol to version 7.9.

This commit upgrades the FUSE API to protocol 7.9 and adds unit tests for
backwards compatibility with servers built for version 7.8. It doesn't
implem

fusefs: Upgrade FUSE protocol to version 7.9.

This commit upgrades the FUSE API to protocol 7.9 and adds unit tests for
backwards compatibility with servers built for version 7.8. It doesn't
implement any of 7.9's new features yet.

Sponsored by: The FreeBSD Foundation

show more ...


# d5ff2688 09-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: create sockets with FUSE_MKNOD, not FUSE_CREATE

libfuse expects sockets to be created with FUSE_MKNOD, not FUSE_CREATE,
because that's how Linux does it. My first attempt at creating socket

fusefs: create sockets with FUSE_MKNOD, not FUSE_CREATE

libfuse expects sockets to be created with FUSE_MKNOD, not FUSE_CREATE,
because that's how Linux does it. My first attempt at creating sockets
(r346894) used FUSE_CREATE because FreeBSD uses VOP_CREATE for this purpose.
There are no backwards-compatibility concerns with this change, because
socket support hasn't yet been merged to head.

Sponsored by: The FreeBSD Foundation

show more ...


# 002e54b0 09-May-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: clear a dir's attr cache when its contents change

Any change to a directory's contents should cause its mtime and ctime to be
updated by the FUSE daemon. Clear its attribute cache so we'll

fusefs: clear a dir's attr cache when its contents change

Any change to a directory's contents should cause its mtime and ctime to be
updated by the FUSE daemon. Clear its attribute cache so we'll get the new
attributs the next time that they're needed. This affects the following
VOPs: VOP_CREATE, VOP_LINK, VOP_MKDIR, VOP_MKNOD, VOP_REMOVE, VOP_RMDIR, and
VOP_SYMLINK

Reported by: pjdfstest
Sponsored by: The FreeBSD Foundation

show more ...


# ede571e4 29-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: support unix-domain sockets

Also, fix the teardown of the Fifo.read_write test

Sponsored by: The FreeBSD Foundation


# cad67791 08-Apr-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: cache file attributes

FUSE_LOOKUP, FUSE_GETATTR, FUSE_SETATTR, FUSE_MKDIR, FUSE_LINK,
FUSE_SYMLINK, FUSE_MKNOD, and FUSE_CREATE all return file attributes with a
cache validity period. fuse

fusefs: cache file attributes

FUSE_LOOKUP, FUSE_GETATTR, FUSE_SETATTR, FUSE_MKDIR, FUSE_LINK,
FUSE_SYMLINK, FUSE_MKNOD, and FUSE_CREATE all return file attributes with a
cache validity period. fusefs will now cache the attributes, if the server
returns a non-zero cache validity period.

This change does _not_ implement finite attr cache timeouts. That will
follow as part of PR 235773.

PR: 235775
Reported by: cem
Sponsored by: The FreeBSD Foundation

show more ...


# 2d445be1 29-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: test that open(2) can return a writable fd for a readonly file

Surprisingly, open(..., O_WRONLY | O_CREAT, 0444) should work. POSIX
requires it. But it didn't work in early FUSE implementa

fusefs: test that open(2) can return a writable fd for a readonly file

Surprisingly, open(..., O_WRONLY | O_CREAT, 0444) should work. POSIX
requires it. But it didn't work in early FUSE implementations. Add a
regression test so that our FUSE driver doesn't make the same mistake.

Sponsored by: The FreeBSD Foundation

show more ...


# 19ef317d 23-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: fallback to MKNOD/OPEN if a filesystem doesn't support CREATE

If a FUSE filesystem returns ENOSYS for FUSE_CREATE, then fallback to
FUSE_MKNOD/FUSE_OPEN.

Also, fix a memory leak in the erro

fusefs: fallback to MKNOD/OPEN if a filesystem doesn't support CREATE

If a FUSE filesystem returns ENOSYS for FUSE_CREATE, then fallback to
FUSE_MKNOD/FUSE_OPEN.

Also, fix a memory leak in the error path of fuse_vnop_create. And do a
little cleanup in fuse_vnop_open.

PR: 199934
Reported by: samm@os2.kiev.ua
Sponsored by: The FreeBSD Foundation

show more ...


# 6248288e 21-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: correctly handle cacheable negative LOOKUP responses

The FUSE protocol allows for LOOKUP to return a cacheable negative response,
which means that the file doesn't exist and the kernel can c

fusefs: correctly handle cacheable negative LOOKUP responses

The FUSE protocol allows for LOOKUP to return a cacheable negative response,
which means that the file doesn't exist and the kernel can cache its
nonexistence. As of this commit fusefs doesn't cache the nonexistence, but
it does correctly handle such responses. Prior to this commit attempting to
create a file, even with O_CREAT would fail with ENOENT if the daemon
returned a cacheable negative response.

PR: 236231
Sponsored by: The FreeBSD Foundation

show more ...


# 9821f1d3 21-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fusefs: adapt the tests to the fuse => fusefs rename

Sponsored by: The FreeBSD Foundation


# 51786f27 15-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fuse(4): add tests for the FOPEN_KEEP_CACHE option

PR: 236560
Sponsored by: The FreeBSD Foundation


# 71885041 15-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fuse(4): add tests for ENOSYS special cases

PR: 236557
Sponsored by: The FreeBSD Foundation


# 90384791 15-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fuse(4): combine common code in the tests

Sponsored by: The FreeBSD Foundation


# 94ef9d62 14-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fuse(4): add tests for FUSE_INTERRUPT

This required changing the way that all operations are mocked. Previously
MockFS::process had one input argument and one output argument. Now, it
returns a ve

fuse(4): add tests for FUSE_INTERRUPT

This required changing the way that all operations are mocked. Previously
MockFS::process had one input argument and one output argument. Now, it
returns a vector of zero or more responses. This allows tests to simulate
conditions where the filesystem daemon has a queue depth > 1.

PR: 236530
Sponsored by: The FreeBSD Foundation

show more ...


# 0e125f5f 14-Mar-2019 Alan Somers <asomers@FreeBSD.org>

fuse(4): combine common code in the tests

Combine a bunch of mostly similar expect_* methods into utils.cc, and only
define FH in a single place.

Sponsored by: The FreeBSD Foundation


12