diff options
Diffstat (limited to 'test/test_ctests.py')
-rw-r--r-- | test/test_ctests.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/test_ctests.py b/test/test_ctests.py index 469c867..fa21090 100644 --- a/test/test_ctests.py +++ b/test/test_ctests.py @@ -11,14 +11,15 @@ import platform import sys from distutils.version import LooseVersion from util import (wait_for_mount, umount, cleanup, base_cmdline, - safe_sleep, basename, fuse_test_marker) + safe_sleep, basename, fuse_test_marker, fuse_caps, + fuse_proto) from os.path import join as pjoin import os.path pytestmark = fuse_test_marker() -@pytest.mark.skipif('bsd' in sys.platform, - reason='writeback requires Linux') +@pytest.mark.skipif('FUSE_CAP_WRITEBACK' not in fuse_caps, + reason='not supported by running kernel') @pytest.mark.parametrize("writeback", (False, True)) def test_write_cache(tmpdir, writeback): if writeback and LooseVersion(platform.release()) < '3.14': @@ -36,8 +37,10 @@ def test_write_cache(tmpdir, writeback): names = [ 'notify_inval_inode', 'invalidate_path' ] -if sys.platform == 'linux': +if fuse_proto >= (7,15): names.append('notify_store_retrieve') +@pytest.mark.skipif(fuse_proto < (7,12), + reason='not supported by running kernel') @pytest.mark.parametrize("name", names) @pytest.mark.parametrize("notify", (True, False)) def test_notify1(tmpdir, name, notify): @@ -66,6 +69,8 @@ def test_notify1(tmpdir, name, notify): else: umount(mount_process, mnt_dir) +@pytest.mark.skipif(fuse_proto < (7,12), + reason='not supported by running kernel') @pytest.mark.parametrize("notify", (True, False)) def test_notify_file_size(tmpdir, notify): mnt_dir = str(tmpdir) |