aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* test_write_cache: Use fuse_session_exit() to stop filesystem threadGravatar Rostislav Skudnov2018-07-23
| | | | | Using fuse_session_exit() followed by fuse_session_unmount() ensures that a proper cleanup and shutdown is performed.
* test_write_cache: Fix memory leaksGravatar Rostislav Skudnov2018-07-23
|
* Fix readdir() bug when a non-zero offset is specified in filler (#269)Gravatar Rostislav2018-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't assume sub-second resolution for st_atime/st_mtime.Gravatar Nikolaus Rath2018-07-11
| | | | Fixes: #224
* rename: perform user mode dir loop check when not done in kernelGravatar Bill Zissimooulos2018-05-18
| | | | | | | | | | | | 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.
* Fix path to pytest cache directory.Gravatar Nikolaus Rath2018-04-13
|
* Travis: remove root-owned cache files.Gravatar Nikolaus Rath2018-03-31
|
* Fix Travis build environmentGravatar Nikolaus Rath2018-03-31
| | | | | Newest Meson requires Python 3.5 which isn't available in Trusty. Pip version pin no longer necessary.
* Fix build error on DragonFlyBSD (sync with other *BSD) (#240)Gravatar Tomohiro Kusumi2018-03-28
| | | | | | | | | 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
* Travis CI: Don't use deprecated environmentGravatar Nikolaus Rath2017-09-20
| | | | | Travis support recommends to install specific pip version to work around problems in new environment.
* example/ioctl: build on FreeBSD, but add protocol check instead.Gravatar Nikolaus Rath2017-08-25
|
* Fix writeback capability check.Gravatar Nikolaus Rath2017-08-25
|
* examples/{ioctl,null}: don't build under FreeBSD instead of skipping tests.Gravatar Nikolaus Rath2017-08-25
|
* Skip testing null and ioctl examples under FreeBSD.Gravatar Nikolaus Rath2017-08-24
| | | | | This seems to be unsupported. However, me may also be doing it wrong. I've asked on the freebsd-fs list for help.
* Removed unused import.Gravatar Nikolaus Rath2017-08-24
|
* Don't use -o auto_unmount under FreeBSD.Gravatar Nikolaus Rath2017-08-24
|
* Dropped support for building with autotoolsGravatar Nikolaus Rath2017-08-24
| | | | It's just too much pain to keep it working.
* Use printcap() to control test executionGravatar Nikolaus Rath2017-08-24
| | | | That way, we run only tests that are supported by the running kernel.
* Added testcase for examples/printcapGravatar Nikolaus Rath2017-08-24
|
* Renamed notify_inval_inode_fh to invalidate_pathGravatar Nikolaus Rath2017-08-24
| | | | The previous name didn't make much sense.
* Allow inode cache invalidation in high-level APIGravatar SÅ‚awek Rudnicki2017-08-24
| | | | | | | | | | | 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.
* Skip tests that aren't supported under FreeBSD.Gravatar Nikolaus Rath2017-08-11
|
* Don't attempt to run fusermount3 under BSD.Gravatar Nikolaus Rath2017-08-11
|
* Call cp with -p instead of --preserve=modeGravatar Nikolaus Rath2017-08-11
| | | | | Preserving other attributes doesn't hurt, and --preserve is not supported under FreeBSD.
* Don't pass --update to cpGravatar Nikolaus Rath2017-08-11
| | | | Doesn't work on FreeBSD, and not strictly necessary.
* Don't build passthrough_ll under BSD.Gravatar Nikolaus Rath2017-08-11
|
* os_open(): don't attempt to close fd if open failed.Gravatar Nikolaus Rath2017-08-06
|
* Added writeback cache to passthrough_llGravatar Nikolaus Rath2017-08-06
| | | | | | | | 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.
* Added append and seek testsGravatar Nikolaus Rath2017-08-04
|
* Don't check st_nlink value for mkdirGravatar Nikolaus Rath2017-08-03
| | | | | | Some filesystems don't track this for directories. Fixes: #180.
* Don't use emacs' python-mode for meson filesGravatar Nikolaus Rath2017-07-07
| | | | There is a proper meson-mode now.
* tst_readdir(): actually go through FUSEGravatar Nikolaus Rath2017-06-20
| | | | The previous code didn't actually go through the mountpoint at all.
* examples/passthrough_ll: added support for create()Gravatar Nikolaus Rath2017-06-05
|
* example/passthrough_ll: added write supportGravatar Nikolaus Rath2017-06-05
|
* tst_link(): wait for RELEASE requestGravatar Nikolaus Rath2017-05-31
| | | | | | | | | | 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.
* Factored out C-based testsGravatar Nikolaus Rath2017-05-25
|
* tst_link(): add more assertionsGravatar Nikolaus Rath2017-05-25
| | | | Hopefully this helps debugging issue #157.
* Travis-CI: Don't abort on first failed testGravatar Nikolaus Rath2017-05-24
| | | | This should help debugging issue #157.
* Added tst_open_read()Gravatar Nikolaus Rath2017-05-24
| | | | | Slightly increases coverage of examples/passthrough_ll.c (which supports open for reading, but not for writing).
* Make tests build on bsdGravatar Brian Naylor2017-05-24
|
* Fix travis build script. Broken in e372d.Gravatar Nikolaus Rath2017-04-10
|
* Remove 'tests' target in favor of calling py.test directly.Gravatar Nikolaus Rath2017-04-10
| | | | Together with the previous commit, this fixes #156.
* Build tests by default.Gravatar Nikolaus Rath2017-04-10
|
* Only build test/*.py if out of date.Gravatar Nikolaus Rath2017-04-10
|
* Actually test passthrough* examplesGravatar Nikolaus Rath2017-04-07
| | | | | | | | 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
* test_examples(): test without debug messages firstGravatar Nikolaus Rath2017-04-07
| | | | | That way, we are not drowning in messages when a test would also fail without debugging enabled.
* test_examples(): avoid false positives from fuse debug outputGravatar Nikolaus Rath2017-04-07
|
* passthrough_ll: only test functions that are actually providedGravatar Nikolaus Rath2017-04-07
| | | | | | 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.
* Remove checked_unlink()Gravatar Nikolaus Rath2017-04-07
| | | | | There is no reason why so many tests require the file system to support unlink() and/or rmdir().
* Turn tst_mknod() into tst_create()Gravatar Nikolaus Rath2017-04-07
| | | | | Ensure that we are really creating a new file. Don't attempt to write, we do that in tst_open_write().