Age | Commit message (Collapse) | Author | Lines |
|
The test had multiple issues
- default passthrough_ll timeout was used - the created
file was then not listed if timeout was not passed
yet
- mnt_name was actually point to src_dir, file comparison
of stat, etc succeeded, because the same file was compared.
Switching to the right dir made stat to always fail,
because st_dev is different for source and mount.
I.e. the test must not compare all stat values.
Not sure how this test ever passed, but in a very slow
debug VM with lots of kernel debug options enabled,
the default passthrough_ll timeout it systematically
failed.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
The high-level interface triggers flag conversion twice: once in the
high-level init and once in the low-level init. This caused false
"both 'want' and 'want_ext' are set" errors when using
fuse_set_feature_flag() or fuse_unset_feature_flag().
The existing check for duplicate conversion only worked when 32-bit
flags were set directly. When using the preferred flag manipulation
functions, conn->want and the lower 32 bits of conn->want_ext
would differ, triggering the error.
Fix this by synchronizing conn->want with the lower 32 bits of
conn->want_ext after conversion, ensuring consistent state for
subsequent calls.
Closes: https://github.com/libfuse/libfuse/issues/1171
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Probably some weird corner case in cross compilation,
for now we ignore this.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
On my nfs mount the tests were hanging and it was impossible
to diagnoze what is actually the issue.
Also get rid of 'looseversion' python package dependency,
as that package is not in ubuntu - add a handcode kernel
version parser.
|
|
|
|
|
|
|
|
Added a secondary check in fuse_lib_unlink() after hide_node()
to check again under a lock if the (now hidden) file is still open.
If not then delete it.
This should synchronise fuse_lib_unlink() with fuse_lib_release(),
when nullpath_ok is set.
|
|
* Fuse mount: make auto_unmount compatible with suid/dev mount options
> When you run as root, fuse normally does not call fusermount but uses
> the mount system call directly. When you specify auto_unmount, it goes
> through fusermount instead. However, fusermount is a setuid binary that
> is normally called by regular users, so it cannot in general accept suid
> or dev options.
In this patch, we split up how fuse mounts as root when `auto_unmount`
is specified.
First, we mount using system calls directly, then we reach out to
fusermount to set up auto_unmount only (with no actual mounting done in
fusermount).
Fixes: #148
|
|
Before:
```
=============================== warnings summary ===============================
test/test_ctests.py:12
/tmp/libfuse-build-mB50ZC/build-gcc-9/test/test_ctests.py:12: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
```
|
|
Hopefully, this will catch issues as in commit 024eccbf3
|
|
This is useful for benchmarking.
Note: This changes behavior - passthrough_hp runs in background by default
now.
|
|
This test is too simple to check for all functionalities of notify_expire as it always successfully passes when libfuse supports the function (even if kernel does not support it - it just takes it as notify_inval)
|
|
test_syscalls unlinked testfiles check fails on passthourhg_hp without
the kernel commit "fuse: fix illegal access to inode with reused nodeid"
queued for kernel 5.14 [1].
Make this check opt-in and do not run it with kernel version before 5.14.
[1] https://lore.kernel.org/linux-fsdevel/CAJfpegtGKjeK8E5QsHKF0=re1J9wVHuGRVgg9NDJ_OOwQdCUNg@mail.gmail.com/
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
When not using the readdir_plus mode, the d_type was not returned,
and the use_ino flag was not used for returning d_ino.
This patch fixes the returned values for d_ino and d_type by readdir(3)
The test for the returned value of d_ino has been adjusted to also
take the d_type into consideration and to check the returned values in
both basic readdir and readdir_plus modes. This is done by executing
the passthrough test twice.
Co-authored-by: Jean-Pierre André <jpandre@users.sourceforge.net>
|
|
- Test added for all passthrough examples.
- passthrough.c uses offset==0 mode. The others don't.
- passthrough.c changed to set FUSE_FILL_DIR_PLUS to make the test pass.
- This fixes #583.
|
|
tst_rmdir and tst_unlink now pass for passthrough_hp.
Previously, tst_rmdir and tst_unlink created the directory / file
using src_dir, causing the test to fail as the cache was stale.
Now, the src_dir is optional. When cache is enabled, tst_rmdir
and tst_unlink do not provide a src_dir, forcing the test to
use mnt_dir itself.
|
|
Readdir caching means that direct modifications to the source
directory will not be seen immediately, so the test becomes flaky.
Fixes: #416.
|
|
We are no longer using the capfd mechanism.
|
|
py.test's capture plugin does not work reliably when used by
other fixtures. Therefore, implement our own version.
|
|
FreeBSD doesn't allow creating sockets using mknod(2). Instead, one has to use socket(2)
and bind(2). Add appropriate logic to the examples and add a test case.
|
|
passthrough_hp puts emphasis and performance and correctness, rather
than simplicity.
|
|
|
|
|
|
|
|
The unprivileged option allows to run the FUSE file system process
without privileges by dropping capabilities and preventing them from
being re-acquired via setuid / fscaps etc. To accomplish this,
mount.fuse sets up the `/dev/fuse` file descriptor and mount itself
and passes the file descriptor via the `/dev/fd/%u` mountpoint syntax
to the FUSE file system.
|
|
|
|
Fixes: #224
|
|
|
|
|
|
This seems to be unsupported. However, me may also be
doing it wrong. I've asked on the freebsd-fs list for help.
|
|
|
|
That way, we run only tests that are supported by the running kernel.
|
|
|
|
|
|
|
|
|
|
This fixes issue #191 (where the test was done by simply adding
FUSE_CAP_WRITEBACK_CACHE without adjusting the flags in the
open() call).
Fixes: #191.
|
|
|
|
Some filesystems don't track this for directories.
Fixes: #180.
|
|
The previous code didn't actually go through the mountpoint at all.
|
|
|
|
|
|
Since RELEASE requests are asynchronous, it is possible that libfuse
still considers the file to be open when userspace has closed it, so
that a successive unlink() call from userspace actually triggers
a rename(). We avoid the resulting test failure by re-trying a few
times.
Fixes: #157.
|
|
|
|
Hopefully this helps debugging issue #157.
|
|
Slightly increases coverage of examples/passthrough_ll.c (which
supports open for reading, but not for writing).
|
|
Since os.path.join() interprets leading slashes, we were
actually never accessing the mountpoint and doing all the
tests in the source directory.
Fixes: #139
|
|
That way, we are not drowning in messages when a test would also fail
without debugging enabled.
|
|
|