73 Commits

Author SHA1 Message Date
fangzhiyi18 bd5ee7c317 升级1.17.3
Signed-off-by: fangzhiyi18 <fangzhiyi1@h-partners.com>
2025-11-08 13:04:30 +08:00
psycho c99f6182b4 libfuse升级
Signed-off-by: psycho <wangmingxuan6@h-partners.com>
2024-01-09 09:19:42 +08:00
Amir Goldstein e4e615af0e Do not run unlinked files test on passthrough_hp with old kernels
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>
2021-06-23 11:46:19 +01:00
Jean-Pierre André 3dec359766 Fix returning d_ino and d_type by readdir(3) in non-plus mode
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>
2021-03-18 09:52:30 +00:00
Martin Pärtel 884b57886b Fix returning inode numbers from readdir() in offset==0 mode. (#584)
- 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.
2021-02-03 09:53:21 +00:00
Anthony Rebello b5100afd63 Fixes 477, optional src_dir in tst_(rmdir,unlink) (#493)
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.
2020-01-25 10:17:09 +00:00
Nikolaus Rath de31610486 Do not run passthrough test when caching is active.
Readdir caching means that direct modifications to the source
directory will not be seen immediately, so the test becomes flaky.

Fixes: #416.
2019-07-09 05:29:49 -07:00
Nikolaus Rath 725ca46d8c test_cuse: fix runtime error
We are no longer using the capfd mechanism.
2019-07-05 11:03:31 +01:00
Nikolaus Rath 1343f59c27 Fix output checking in test cases
py.test's capture plugin does not work reliably when used by
other fixtures. Therefore, implement our own version.
2019-07-04 21:20:41 +01:00
Alan Somers 1f842c996e passthrough: fix unix-domain sockets on FreeBSD (#413)
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.
2019-05-15 21:35:57 +01:00
Nikolaus Rath 055f272517 Added new example filesystem
passthrough_hp puts emphasis and performance and correctness, rather
than simplicity.
2019-05-09 14:16:37 -05:00
Nikolaus Rath b35afb000a Added testcase for "big" readdir. 2018-11-24 20:51:47 +00:00
Nikolaus Rath 68f177d238 Kill filesystem process on test cleanup. 2018-11-24 20:51:34 +00:00
Nikolaus Rath fd588b59e0 Enable more tests for passthrough_ll 2018-10-10 10:49:48 +01:00
Mattias Nissler da7c9b228a Add unprivileged option in mount.fuse3
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.
2018-10-09 20:36:22 +01:00
Scott Worley 161fffd979 Fix unlink errno check 2018-09-27 09:29:22 +01:00
Nikolaus Rath 415f084ec1 Don't assume sub-second resolution for st_atime/st_mtime.
Fixes: #224
2018-07-11 10:33:16 +01:00
Nikolaus Rath 21b55a05a1 example/ioctl: build on FreeBSD, but add protocol check instead. 2017-08-25 10:48:09 +02:00
Nikolaus Rath 6b0d363b6a examples/{ioctl,null}: don't build under FreeBSD instead of skipping tests. 2017-08-25 09:46:50 +02:00
Nikolaus Rath 4e3a30b6f5 Skip testing null and ioctl examples under FreeBSD.
This seems to be unsupported. However, me may also be
doing it wrong. I've asked on the freebsd-fs list for help.
2017-08-24 21:56:00 +02:00
Nikolaus Rath 00e6794c81 Removed unused import. 2017-08-24 21:56:00 +02:00
Nikolaus Rath 937467b6a0 Use printcap() to control test execution
That way, we run only tests that are supported by the running kernel.
2017-08-24 17:19:07 +02:00
Nikolaus Rath ead57767f7 Added testcase for examples/printcap 2017-08-24 17:19:07 +02:00
Nikolaus Rath 07636c619d Skip tests that aren't supported under FreeBSD. 2017-08-11 21:13:40 +02:00
Nikolaus Rath 4fcb574d10 Don't build passthrough_ll under BSD. 2017-08-11 10:41:58 +02:00
Nikolaus Rath e1482cd02c os_open(): don't attempt to close fd if open failed. 2017-08-06 13:24:20 +02:00
Nikolaus Rath b3109e71fa Added writeback cache to passthrough_ll
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.
2017-08-06 10:13:43 +02:00
Nikolaus Rath 0f1fdd2205 Added append and seek tests 2017-08-04 20:14:31 +02:00
Nikolaus Rath 1243beff20 Don't check st_nlink value for mkdir
Some filesystems don't track this for directories.

Fixes: #180.
2017-08-03 13:08:40 +02:00
Nikolaus Rath f2c2157166 tst_readdir(): actually go through FUSE
The previous code didn't actually go through the mountpoint at all.
2017-06-20 16:37:51 -07:00
Nikolaus Rath f13526ed66 examples/passthrough_ll: added support for create() 2017-06-05 07:01:30 -04:00
Nikolaus Rath bb3770f38a example/passthrough_ll: added write support 2017-06-05 06:57:36 -04:00
Nikolaus Rath 5e20b4da8e tst_link(): wait for RELEASE request
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.
2017-05-31 09:36:51 -07:00
Nikolaus Rath 952492ff43 Factored out C-based tests 2017-05-25 13:23:56 -07:00
Nikolaus Rath db8c33e07e tst_link(): add more assertions
Hopefully this helps debugging issue #157.
2017-05-25 12:15:51 -07:00
Nikolaus Rath cb6da12694 Added tst_open_read()
Slightly increases coverage of examples/passthrough_ll.c (which
supports open for reading, but not for writing).
2017-05-24 16:20:04 -07:00
Nikolaus Rath eb97211415 Actually test passthrough* examples
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
2017-04-07 16:40:15 -07:00
Nikolaus Rath d3c352142c test_examples(): test without debug messages first
That way, we are not drowning in messages when a test would also fail
without debugging enabled.
2017-04-07 16:40:15 -07:00
Nikolaus Rath 3f656efe98 test_examples(): avoid false positives from fuse debug output 2017-04-07 16:40:15 -07:00
Nikolaus Rath c24cc19f43 passthrough_ll: only test functions that are actually provided
This appeared to work because of an unrelated bug that caused us to
actually never access the mountpoint at all and do all tests on the
lower filesystem. This issue will be fixed in a separate commit.
2017-04-07 16:40:15 -07:00
Nikolaus Rath c1ebb9b9b8 Remove checked_unlink()
There is no reason why so many tests require the file system
to support unlink() and/or rmdir().
2017-04-07 16:40:15 -07:00
Nikolaus Rath 4cfc2740b2 Turn tst_mknod() into tst_create()
Ensure that we are really creating a new file.
Don't attempt to write, we do that in tst_open_write().
2017-04-07 16:40:15 -07:00
Nikolaus Rath deb2fa355a Renamed tst_write() to tst_open_write()
We are actually testing both opening of an existing file
and writing to it.
2017-04-07 16:40:15 -07:00
Nikolaus Rath d4092d70db Added tst_unlink()
To check for unlink() support without requiring create()/mknod().
2017-04-07 16:40:15 -07:00
Nikolaus Rath 68d9584e04 tst_mkdir(): factor out tst_rmdir()
This allows testing a filesystem that offers mkdir(), but no
rmdir() (and vice versa).
2017-04-07 16:40:15 -07:00
Nikolaus Rath aaa7a7c3b7 Rename tst_unlink() to tst_open_unlink()
This makes more sense, since we are specifically checking
unlinking of an open file.
2017-04-07 16:40:15 -07:00
Nikolaus Rath 3b04359dfb tst_readdir(): don't require create/mkdir support
By creating the files in the lower filesystem, we
can test readdir() even for filesystems that don't implement
create() or mkdir().
2017-04-07 16:40:15 -07:00
Nikolaus Rath 9f96db7125 Added experimental support for building with Meson+Ninja 2017-01-12 15:19:04 -08:00
Nikolaus Rath 5c76353fe6 Skip tests if not root and no setuid fusermount3. 2017-01-10 14:42:26 -08:00
Nikolaus Rath 8e69b19cdc Added documentation and test case for null example 2016-12-23 18:31:45 -08:00