aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-10 21:45:47 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-13 10:35:13 -0700
commit1b45dc875f678b4ff881f9ccb1443ea64232e4ae (patch)
treeeabe4bc5da202965dc8091e68104e54106900b64 /test
parent724e94763a483c58539765ea576407053c257fd6 (diff)
Only test writeback cache if kernel is recent enough.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_examples.py6
1 files changed, 5 insertions, 1 deletions
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,