aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_examples.py
AgeCommit message (Collapse)AuthorLines
2025-02-17tests: Skip the ioctl test for x86 cross compilationBernd Schubert-0/+13
Probably some weird corner case in cross compilation, for now we ignore this. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2024-12-17tests: Add debug messages to some tests and umountBernd Schubert-4/+21
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.
2024-01-29make FUSE_CAP_EXPIRE_ONLY test depend on available cap and not on versionHereThereBeDragons-2/+2
2023-12-17Allow *xattr operations on root directory (ino 1)amitgeron-2/+3
2023-06-30Make expire only function fail if no kernel support (#789)HereThereBeDragons-0/+2
2023-05-11Fix issue #746. (#782)Peri-0/+59
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.
2023-04-12Fuse mount: make auto_unmount compatible with suid/dev mount options (#762)Matthias Görgens-0/+31
* 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
2023-04-11Migrate away from deprecated distutilsMatthias Goergens-1/+1
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 ```
2023-04-01Add unit tests for setxattr() et alNikolaus Rath-3/+11
Hopefully, this will catch issues as in commit 024eccbf3
2023-01-13passthrough_hp: Add options for clone_fd, max_threads, daemonizeBernd Schubert-0/+2
This is useful for benchmarking. Note: This changes behavior - passthrough_hp runs in background by default now.
2023-01-06Test for fuse_lowlevel_notify_expire_entry.HereThereBeDragons-1/+4
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)
2021-06-23Do not run unlinked files test on passthrough_hp with old kernelsAmir Goldstein-0/+7
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-03-18Fix returning d_ino and d_type by readdir(3) in non-plus modeJean-Pierre André-4/+10
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-02-03Fix returning inode numbers from readdir() in offset==0 mode. (#584)Martin Pärtel-1/+18
- 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.
2020-01-25Fixes 477, optional src_dir in tst_(rmdir,unlink) (#493)Anthony Rebello-8/+20
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.
2019-07-09Do not run passthrough test when caching is active.Nikolaus Rath-1/+2
Readdir caching means that direct modifications to the source directory will not be seen immediately, so the test becomes flaky. Fixes: #416.
2019-07-05test_cuse: fix runtime errorNikolaus Rath-4/+4
We are no longer using the capfd mechanism.
2019-07-04Fix output checking in test casesNikolaus Rath-20/+29
py.test's capture plugin does not work reliably when used by other fixtures. Therefore, implement our own version.
2019-05-15passthrough: fix unix-domain sockets on FreeBSD (#413)Alan Somers-8/+23
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-09Added new example filesystemNikolaus Rath-0/+54
passthrough_hp puts emphasis and performance and correctness, rather than simplicity.
2018-11-24Added testcase for "big" readdir.Nikolaus Rath-0/+26
2018-11-24Kill filesystem process on test cleanup.Nikolaus Rath-6/+6
2018-10-10Enable more tests for passthrough_llNikolaus Rath-48/+18
2018-10-09Add unprivileged option in `mount.fuse3`Mattias Nissler-11/+27
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-09-27Fix unlink errno checkScott Worley-1/+1
2018-07-11Don't assume sub-second resolution for st_atime/st_mtime.Nikolaus Rath-2/+2
Fixes: #224
2017-08-25example/ioctl: build on FreeBSD, but add protocol check instead.Nikolaus Rath-0/+2
2017-08-25examples/{ioctl,null}: don't build under FreeBSD instead of skipping tests.Nikolaus Rath-20/+15
2017-08-24Skip testing null and ioctl examples under FreeBSD.Nikolaus Rath-0/+10
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-24Removed unused import.Nikolaus Rath-1/+1
2017-08-24Use printcap() to control test executionNikolaus Rath-11/+15
That way, we run only tests that are supported by the running kernel.
2017-08-24Added testcase for examples/printcapNikolaus Rath-0/+6
2017-08-11Skip tests that aren't supported under FreeBSD.Nikolaus Rath-4/+11
2017-08-11Don't build passthrough_ll under BSD.Nikolaus Rath-0/+3
2017-08-06os_open(): don't attempt to close fd if open failed.Nikolaus Rath-1/+1
2017-08-06Added writeback cache to passthrough_llNikolaus Rath-21/+59
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-04Added append and seek testsNikolaus Rath-3/+41
2017-08-03Don't check st_nlink value for mkdirNikolaus Rath-0/+1
Some filesystems don't track this for directories. Fixes: #180.
2017-06-20tst_readdir(): actually go through FUSENikolaus Rath-6/+9
The previous code didn't actually go through the mountpoint at all.
2017-06-05examples/passthrough_ll: added support for create()Nikolaus Rath-2/+2
2017-06-05example/passthrough_ll: added write supportNikolaus Rath-1/+1
2017-05-31tst_link(): wait for RELEASE requestNikolaus Rath-9/+16
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-25Factored out C-based testsNikolaus Rath-47/+0
2017-05-25tst_link(): add more assertionsNikolaus Rath-3/+17
Hopefully this helps debugging issue #157.
2017-05-24Added tst_open_read()Nikolaus Rath-0/+9
Slightly increases coverage of examples/passthrough_ll.c (which supports open for reading, but not for writing).
2017-04-07Actually test passthrough* examplesNikolaus Rath-1/+1
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-07test_examples(): test without debug messages firstNikolaus Rath-1/+1
That way, we are not drowning in messages when a test would also fail without debugging enabled.
2017-04-07test_examples(): avoid false positives from fuse debug outputNikolaus Rath-1/+7
2017-04-07passthrough_ll: only test functions that are actually providedNikolaus Rath-19/+23
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-07Remove checked_unlink()Nikolaus Rath-18/+7
There is no reason why so many tests require the file system to support unlink() and/or rmdir().