From 71064a41f823d2c857813330e8a3bce876e43553 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 10 Oct 2016 10:49:21 -0700 Subject: Added write cache tests. --- test/test_examples.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/test_examples.py') 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') -- cgit v1.2.3