From e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sun, 6 Aug 2017 10:22:59 +0200 Subject: Run tests with and without writeback cache. --- test/test_sshfs.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_sshfs.py b/test/test_sshfs.py index 675fab3..456aba4 100755 --- a/test/test_sshfs.py +++ b/test/test_sshfs.py @@ -13,6 +13,7 @@ import stat import shutil import filecmp import errno +from contextlib import contextmanager from tempfile import NamedTemporaryFile from util import (wait_for_mount, umount, cleanup, base_cmdline, basename, fuse_test_marker, safe_sleep) @@ -32,7 +33,9 @@ def name_generator(__ctr=[0]): @pytest.mark.parametrize("debug", (False, True)) @pytest.mark.parametrize("cache_timeout", (0,1)) @pytest.mark.parametrize("sync_rd", (True, False)) -def test_sshfs(tmpdir, debug, cache_timeout, sync_rd, capfd): +@pytest.mark.parametrize("writeback", (False, True)) +def test_sshfs(tmpdir, debug, cache_timeout, sync_rd, + writeback, capfd): # Avoid false positives from debug messages #if debug: @@ -61,7 +64,12 @@ def test_sshfs(tmpdir, debug, cache_timeout, sync_rd, capfd): if sync_rd: cmdline += [ '-o', 'sync_readdir' ] - + + if writeback: + cmdline += [ '-o', 'writeback_cache=yes' ] + else: + cmdline += [ '-o', 'writeback_cache=no' ] + # SSHFS Cache if cache_timeout == 0: cmdline += [ '-o', 'dir_cache=no' ] -- cgit v1.2.3