diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-06 10:22:59 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-06 10:22:59 +0200 |
commit | e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d (patch) | |
tree | aa29a9df8df1f4dd0748050f80a2b19dbb93cdd5 /test/test_sshfs.py | |
parent | 70acee8c4b0cfddf5124a3a6794bdea1ae5c8852 (diff) | |
download | sshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.tar sshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.tar.gz sshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.tar.bz2 sshfs-e2a4bc904e90dd05264472a9e7c8dfeb8e1d919d.zip |
Run tests with and without writeback cache.
Diffstat (limited to 'test/test_sshfs.py')
-rwxr-xr-x | test/test_sshfs.py | 12 |
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' ] |