aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_examples.py
AgeCommit message (Collapse)AuthorLines
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().
2017-04-07Turn tst_mknod() into tst_create()Nikolaus Rath-8/+15
Ensure that we are really creating a new file. Don't attempt to write, we do that in tst_open_write().
2017-04-07Renamed tst_write() to tst_open_write()Nikolaus Rath-7/+12
We are actually testing both opening of an existing file and writing to it.
2017-04-07Added tst_unlink()Nikolaus Rath-0/+13
To check for unlink() support without requiring create()/mknod().
2017-04-07tst_mkdir(): factor out tst_rmdir()Nikolaus Rath-3/+14
This allows testing a filesystem that offers mkdir(), but no rmdir() (and vice versa).
2017-04-07Rename tst_unlink() to tst_open_unlink()Nikolaus Rath-4/+4
This makes more sense, since we are specifically checking unlinking of an open file.
2017-04-07tst_readdir(): don't require create/mkdir supportNikolaus Rath-3/+3
By creating the files in the lower filesystem, we can test readdir() even for filesystems that don't implement create() or mkdir().
2017-01-12Added experimental support for building with Meson+NinjaNikolaus Rath-1/+1
2017-01-10Skip tests if not root and no setuid fusermount3.Nikolaus Rath-1/+3
2016-12-23Added documentation and test case for null exampleNikolaus Rath-0/+22
2016-10-24Fix segfault in debug logging codeNikolaus Rath-1/+4
fi may be NULL, so we need to protect against this.
2016-10-20fuse_new(): don't accept options that don't make sense for end-usersNikolaus Rath-2/+0
Several options (use_ino, etc) depend on the file system implementation. Allowing them to be set from the command line makes no sense.
2016-10-15Unify handling of fuse_conn_info optionsNikolaus Rath-10/+5
Instead of using command line options to modify struct fuse_conn_info before and after calling the init() handler, we now give the file system explicit control over this.
2016-10-13tests: use freshly-build fusermount (instead of system version)Nikolaus Rath-2/+1
When running tests as non-root, make fusermount setuid root.
2016-10-13Only test writeback cache if kernel is recent enough.Nikolaus Rath-1/+5