aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorLines
2018-10-10Enable more tests for passthrough_llNikolaus Rath-48/+18
2018-10-09Add unprivileged option in `mount.fuse3`Mattias Nissler-16/+56
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-23test_write_cache: Use fuse_session_exit() to stop filesystem threadRostislav Skudnov-2/+3
Using fuse_session_exit() followed by fuse_session_unmount() ensures that a proper cleanup and shutdown is performed.
2018-07-23test_write_cache: Fix memory leaksRostislav Skudnov-0/+3
2018-07-21Fix readdir() bug when a non-zero offset is specified in filler (#269)Rostislav-0/+61
The bug occurs when a filesystem client reads a directory until the end, seeks using seekdir() to some valid non-zero position and calls readdir(). A valid 'struct dirent *' is expected, but NULL is returned instead. Pseudocode demonstrating the bug: DIR *dp = opendir("some_dir"); struct dirent *de = readdir(dp); /* Get offset of the second entry */ long offset = telldir(dp); /* Read directory until the end */ while (de) de = readdir(de); seekdir(dp, offset); de = readdir(dp); /* de must contain the second entry, but NULL is returned instead */ The reason of the bug is that when the end of directory is reached, the kernel calls FUSE_READDIR op with an offset at the end of directory, so the filesystem's .readdir callback never calls the filler function, and we end up with dh->filled set to 1. After seekdir(), FUSE_READDIR is called again with a new offset, but this time the filesystem's .readdir callback is never called, and an empty reply is returned. Fix by setting dh->filled to 1 only when zero offsets are given to filler function.
2018-07-11Don't assume sub-second resolution for st_atime/st_mtime.Nikolaus Rath-2/+2
Fixes: #224
2018-05-18rename: perform user mode dir loop check when not done in kernelBill Zissimooulos-0/+216
Linux performs the dir loop check (rename(a, a/b/c) or rename(a/b/c, a), etc.) in kernel. Unfortunately other systems do not perform this check (e.g. FreeBSD). This results in a deadlock in get_path2, because libfuse did not expect to handle such cases. We add a check_dir_loop function that performs the dir loop check in user mode and enable it on systems that need it.
2018-04-13Fix path to pytest cache directory.Nikolaus Rath-1/+1
2018-03-31Travis: remove root-owned cache files.Nikolaus Rath-0/+3
2018-03-31Fix Travis build environmentNikolaus Rath-1/+2
Newest Meson requires Python 3.5 which isn't available in Trusty. Pip version pin no longer necessary.
2018-03-28Fix build error on DragonFlyBSD (sync with other *BSD) (#240)Tomohiro Kusumi-3/+3
DragonFlyBSD has no "bsd" in uname, so add 'dragonfly' to conditionals. -- e.g. uname(1) in DragonFlyBSD [root@ ~]# uname DragonFly [root@ ~]# python -c "import sys; print(sys.platform)" dragonfly5
2017-09-20Travis CI: Don't use deprecated environmentNikolaus Rath-1/+0
Travis support recommends to install specific pip version to work around problems in new environment.
2017-08-25example/ioctl: build on FreeBSD, but add protocol check instead.Nikolaus Rath-0/+2
2017-08-25Fix writeback capability check.Nikolaus Rath-1/+1
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-24Don't use -o auto_unmount under FreeBSD.Nikolaus Rath-0/+4
2017-08-24Dropped support for building with autotoolsNikolaus Rath-18/+0
It's just too much pain to keep it working.
2017-08-24Use printcap() to control test executionNikolaus Rath-15/+54
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-24Renamed notify_inval_inode_fh to invalidate_pathNikolaus Rath-2/+2
The previous name didn't make much sense.
2017-08-24Allow inode cache invalidation in high-level APISławek Rudnicki-2/+26
We re-introduce the functionality of invalidating the caches for an inode specified by path by adding a new routine fuse_invalidate_path. This is useful for network-based file systems which use the high-level API, enabling them to notify the kernel about external changes. This is a revival of Miklos Szeredi's original code for the fuse_invalidate routine.
2017-08-11Skip tests that aren't supported under FreeBSD.Nikolaus Rath-8/+25
2017-08-11Don't attempt to run fusermount3 under BSD.Nikolaus Rath-10/+21
2017-08-11Call cp with -p instead of --preserve=modeNikolaus Rath-1/+1
Preserving other attributes doesn't hurt, and --preserve is not supported under FreeBSD.
2017-08-11Don't pass --update to cpNikolaus Rath-1/+1
Doesn't work on FreeBSD, and not strictly necessary.
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-1/+4
Some filesystems don't track this for directories. Fixes: #180.
2017-07-07Don't use emacs' python-mode for meson filesNikolaus Rath-3/+0
There is a proper meson-mode now.
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-48/+65
2017-05-25tst_link(): add more assertionsNikolaus Rath-3/+17
Hopefully this helps debugging issue #157.
2017-05-24Travis-CI: Don't abort on first failed testNikolaus Rath-4/+6
This should help 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-05-24Make tests build on bsdBrian Naylor-0/+10
2017-04-10Fix travis build script. Broken in e372d.Nikolaus Rath-3/+3
2017-04-10Remove 'tests' target in favor of calling py.test directly.Nikolaus Rath-10/+2
Together with the previous commit, this fixes #156.
2017-04-10Build tests by default.Nikolaus Rath-7/+6
2017-04-10Only build test/*.py if out of date.Nikolaus Rath-1/+1
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