aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2017-08-06 10:22:59 +0200
committerNikolaus Rath <Nikolaus@rath.org>2017-08-06 10:22:59 +0200
commite2a4bc904e90dd05264472a9e7c8dfeb8e1d919d (patch)
treeaa29a9df8df1f4dd0748050f80a2b19dbb93cdd5
parent70acee8c4b0cfddf5124a3a6794bdea1ae5c8852 (diff)
downloadsshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.tar
sshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.tar.gz
sshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.tar.bz2
sshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.zip
Run tests with and without writeback cache.
-rwxr-xr-xtest/test_sshfs.py12
1 files changed, 10 insertions, 2 deletions
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' ]