diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-10 10:49:21 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-10 11:07:38 -0700 |
commit | 71064a41f823d2c857813330e8a3bce876e43553 (patch) | |
tree | 2eab260326092f14ebaeb084c3fea6cbcbd1a3d7 /test/test_examples.py | |
parent | 29eacdbe4189598faa4f507b09aaab111a93650b (diff) |
Added write cache tests.
Diffstat (limited to 'test/test_examples.py')
-rwxr-xr-x | test/test_examples.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_examples.py b/test/test_examples.py index 3052eb9..2990d25 100755 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -211,6 +211,18 @@ def test_notify_inval_entry(tmpdir, notify): else: umount(mount_process, mnt_dir) +@pytest.mark.parametrize("writeback", (True, False)) +def test_write_cache(tmpdir, writeback): + # 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, + # control does not come to the program. + mnt_dir = str(tmpdir) + cmdline = [ pjoin(basename, 'test', 'test_write_cache'), + mnt_dir ] + if writeback: + cmdline.append('-owriteback_cache') + subprocess.check_call(cmdline) @pytest.mark.skipif(os.getuid() != 0, reason='needs to run as root') |