From 1b45dc875f678b4ff881f9ccb1443ea64232e4ae Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 10 Oct 2016 21:45:47 -0700 Subject: Only test writeback cache if kernel is recent enough. --- test/test_examples.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') 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, -- cgit v1.2.3