From: Nikolaus Rath Date: Tue, 11 Oct 2016 04:45:47 +0000 (-0700) Subject: Only test writeback cache if kernel is recent enough. X-Git-Tag: fuse-3.0.0rc1~48 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1b45dc875f678b4ff881f9ccb1443ea64232e4ae;p=qemu-gpiodev%2Flibfuse.git Only test writeback cache if kernel is recent enough. --- diff --git a/test/test_examples.py b/test/test_examples.py index e0f9be4..9f62054 100755 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -13,6 +13,8 @@ import stat import shutil import filecmp import errno +import platform +from distutils.version import LooseVersion from tempfile import NamedTemporaryFile from util import (wait_for_mount, umount, cleanup, base_cmdline, safe_sleep) @@ -206,8 +208,10 @@ def test_notify_inval_entry(tmpdir, notify): else: umount(mount_process, mnt_dir) -@pytest.mark.parametrize("writeback", (True, False)) +@pytest.mark.parametrize("writeback", (False, True)) def test_write_cache(tmpdir, writeback): + if writeback and LooseVersion(platform.release()) < '3.14': + pytest.skip('Requires kernel 3.14 or newer') # This test hangs under Valgrind when running close(fd) # test_write_cache.c:test_fs(). Most likely this is because of an internal # deadlock in valgrind, it probably assumes that until close() returns,