Commit Graph

189 Commits

Author SHA1 Message Date
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
31ebb7b975 Don't use emacs' python-mode for meson files
There is a proper meson-mode now.
2017-07-07 15:48:50 +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
dfd13ca3b8 Travis-CI: Don't abort on first failed test
This should help debugging issue #157.
2017-05-24 16:53:14 -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
Brian Naylor
cc96e8d783 Make tests build on bsd 2017-05-24 09:58:45 -07:00
Nikolaus Rath
021672f518 Fix travis build script. Broken in e372d. 2017-04-10 17:23:28 -07:00
Nikolaus Rath
e372d610ba Remove 'tests' target in favor of calling py.test directly.
Together with the previous commit, this fixes #156.
2017-04-10 17:08:58 -07:00
Nikolaus Rath
3e14366834 Build tests by default. 2017-04-10 16:57:32 -07:00
Nikolaus Rath
001b7dc194 Only build test/*.py if out of date. 2017-04-10 16:39:01 -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
578c8e03d4 Put -Werror in mesonconf, not CFLAGS
Putting it in CFLAGS interferes with feature detection.
2017-01-23 12:07:09 -08:00
Nikolaus Rath
4f1a929fed Only use valgrind if requested explicitly + enable address sanitizer 2017-01-12 15:19:04 -08:00
Nikolaus Rath
bcb8f75995 Switch Travis build to Meson+Ninja 2017-01-12 15:19:04 -08: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
Przemysław Pawełczyk
dfbfee07ab Rename more things from fuse to fuse3 2016-11-28 21:33:14 -08:00
Nikolaus Rath
eb9f12639f Don't expect EACCESS errors as root
Fixes #111.
2016-11-10 13:10:03 -08:00
Nikolaus Rath
1fe4258932 Don't hardcode test file name. 2016-11-06 21:01:38 -08:00
Nikolaus Rath
a50b2ab170 Added test for fchmod
At the moment this test fails (cf. issue #62). If that gets fixed in the
kernel, this test can be activated conditionally.
2016-11-06 21:01:38 -08:00
Nikolaus Rath
695e45a4de Renamed fusermount / mount.fuse to fusermount3 / mount.fuse3 2016-10-28 14:43:44 -07:00
Nikolaus Rath
f84f2db692 Fix segfault in debug logging code
fi may be NULL, so we need to protect against this.
2016-10-24 21:09:00 -07:00
Nikolaus Rath
8ee553dac0 fuse_new(): don't accept options that don't make sense for end-users
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-20 15:32:20 -07:00
Nikolaus Rath
d49f2e77b4 Unify handling of fuse_conn_info options
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-15 16:49:23 -07:00
Nikolaus Rath
a47dedd47f tests: use freshly-build fusermount (instead of system version)
When running tests as non-root, make fusermount setuid root.
2016-10-13 11:02:04 -07:00
Nikolaus Rath
1b45dc875f Only test writeback cache if kernel is recent enough. 2016-10-13 10:35:13 -07:00
Nikolaus Rath
2044df660f Fix race condition in notify_* examples
The fix in commit cf4159156b was incomplete. While some false positives
are caused by sleep() in the file system taking longer than expected,
there was also a race condition where the file system would run before
the contents are initialized properly.
2016-10-10 11:47:29 -07:00
Nikolaus Rath
71064a41f8 Added write cache tests. 2016-10-10 11:07:38 -07:00
Nikolaus Rath
4fe8c95274 Added cuse unit test. 2016-10-09 22:03:07 -07:00
Nikolaus Rath
cf4159156b Increase timeouts in notify_* tests
When running under Valgrind, we otherwise get sporadic test failures.
2016-10-09 22:03:07 -07:00
Nikolaus Rath
64c97de5be Renamed timefsN examples to fuse_notify_*
This should make it more obvious at first glance what the different
examples do.
2016-10-09 22:03:07 -07:00
Nikolaus Rath
bcad1a6f22 Renamed ioctl and poll examples
The new names should make it more obvious at first glance
what each example demonstrates.
2016-10-09 22:03:07 -07:00
Nikolaus Rath
463189cd12 Renamed some examples to make their function more obvious
Also, added more comments for the same purpose.
2016-10-09 22:03:07 -07:00
Nikolaus Rath
9f19d71a76 Added timefs3 to test notify_inval_entry.
Fixes #32.
2016-10-08 21:27:06 -07:00
Nikolaus Rath
3114ff2b9b Added timefs[12] examples.
These examplesdemonstrate the use of the `fuse_lowlevel_notify_store`
and `fuse_lowlevel_notify_inval_inode` functions.
2016-10-08 21:27:04 -07:00
Nikolaus Rath
ba0462e401 Added safe_sleep() 2016-10-08 21:26:40 -07:00
Nikolaus Rath
97f4a9cb4f Removed `-o big_writes` option
This option is obsolete and should always be enabled. File systems that
want to limit the size of write requests should use the
``-o max_write=<N>`` option instead.
2016-10-08 21:26:36 -07:00
Nikolaus Rath
2680c5b995 Test more combinations of low-level options. 2016-10-05 20:03:18 -07:00
Nikolaus Rath
321af37ee1 Don't crash if valgrind or libtool are not installed. 2016-10-03 09:08:58 -07:00
Nikolaus Rath
f270ba9121 Run tests under valgrind when available.
Fixes #50.
2016-10-02 22:39:28 -07:00
Nikolaus Rath
651f85e4a2 Import os.path.join as pjoin
Makes the code much shorter :-).
2016-10-02 22:11:16 -07:00
Nikolaus Rath
e52c84d074 Added test for fuse_lo-plus. 2016-10-02 20:37:07 -07:00
Nikolaus Rath
9620fa7954 Run hello_ll single-threaded explicitly. 2016-10-02 20:34:31 -07:00
Nikolaus Rath
92ec27d982 Add 'traceback' as suspicious test output pattern. 2016-05-13 15:20:17 -07:00
Nikolaus Rath
d516c72aaf Add ioctl tests. 2016-05-13 13:12:40 -07:00
Nikolaus Rath
2aa1f6b138 Added test_fsel 2016-03-29 16:16:01 -07:00
Nikolaus Rath
0db5bc69ea Added unit tests for fusexmp and hello 2016-03-29 16:07:29 -07:00
Nikolaus Rath
59e58de40c Added basic unit tests.
Fixes issue #33.
2016-03-29 16:06:29 -07:00
Nikolaus Rath
92e2863fb7 Integrate tests with autotools 2016-03-29 14:17:49 -07:00
Miklos Szeredi
1c3ce3dc6a test: add a realdir option 2013-09-20 13:57:41 +02:00
Feng Shuo
f448ac69d1 libfuse: add readdirplus support in fuse_lowlevel_ops
This patch implements readdirplus support in FUSE usersapce. It adds
a new fuse lowlevel operations fuse_lowleve_ops::readdir_plus,
corespoding mount options and helper functions to maintain buffer.

[From: Eric Wong <normalperson@yhbt.net>]

This makes our terminology consistent with NFS and
our kernel module, as well as reducing user/developer
confusion in the command-line.

Note: I'm keeping "fuse_add_direntry_plus" since that is
less standardized in its use than "readdirplus" for now.

Signed-off-by: Feng Shuo <steve.shuo.feng@gmail.com>
2013-02-07 14:58:50 +01:00
Miklos Szeredi
b0fa250ec0 test improvements 2012-04-06 11:47:16 +02:00
Miklos Szeredi
13a3d3636c update test/.gitignore 2010-11-12 15:50:22 +01:00
Miklos Szeredi
5454e4fa74 Add .gitignore files
Add .gitignore files and delete .cvsignore files.
2010-06-24 13:40:31 +02:00
Miklos Szeredi
cdb8b79bad change indenting 2007-12-12 14:25:40 +00:00
Miklos Szeredi
918f0ad95b Disable old symbol versions if __UCLIBC__ is defined 2007-12-12 11:53:38 +00:00
Miklos Szeredi
0f0365d63c add testcase 2007-09-17 15:43:41 +00:00
Miklos Szeredi
66455c648e warning fix 2007-08-08 17:58:43 +00:00
Miklos Szeredi
d4428a57bc Released 2.7.0 2007-07-02 11:29:19 +00:00
Miklos Szeredi
53bce657d2 add test for mknod() of regular file 2007-05-21 09:22:52 +00:00
Miklos Szeredi
7e7fa1fb94 fixes 2006-10-08 15:41:20 +00:00
Miklos Szeredi
c3b76815f7 fix 2006-09-16 08:52:09 +00:00
Miklos Szeredi
2bb750e71c trailing whitespace fix 2005-10-03 14:54:24 +00:00
Miklos Szeredi
ecce1bf2ff fix 2005-08-25 15:19:06 +00:00
Miklos Szeredi
17c2471741 *** empty log message *** 2005-08-05 17:00:50 +00:00
Miklos Szeredi
0270951009 add testcases for open() 2005-08-03 14:14:47 +00:00
Miklos Szeredi
9b813af863 fixes 2005-07-21 07:59:37 +00:00
Miklos Szeredi
0fc4abe9e8 add a couple of testcases 2005-05-10 16:10:05 +00:00
Miklos Szeredi
3b206c79bf basic test 2005-05-06 10:15:26 +00:00