aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ctests.py
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2022-01-03 10:49:46 +0200
committerAmir Goldstein <amir73il@gmail.com>2022-01-05 08:43:43 +0200
commit435a14e0297cf796a19aaf04221fa14957fb3717 (patch)
tree05362cfb72968660b066d81a5e42cbebd0cd56e5 /test/test_ctests.py
parentdad15aee26835240d72188179ba177a0bbafe659 (diff)
downloadlibfuse-435a14e0297cf796a19aaf04221fa14957fb3717.tar.gz
Add test for FOPEN_NOFLUSH flag
Simulate write() delay and verify that close(rofd) does not block waiting on pending writes. The support for the flag was added in kernel v5.16-rc1. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'test/test_ctests.py')
-rw-r--r--test/test_ctests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_ctests.py b/test/test_ctests.py
index 4290f20..63728c3 100644
--- a/test/test_ctests.py
+++ b/test/test_ctests.py
@@ -33,6 +33,11 @@ def test_write_cache(tmpdir, writeback, output_checker):
mnt_dir ]
if writeback:
cmdline.append('-owriteback_cache')
+ elif LooseVersion(platform.release()) >= '5.16':
+ # Test that close(rofd) does not block waiting for pending writes.
+ # This test requires kernel commit a390ccb316be ("fuse: add FOPEN_NOFLUSH")
+ # so opt-in for this test from kernel 5.16.
+ cmdline.append('--delay_ms=200')
subprocess.check_call(cmdline, stdout=output_checker.fd, stderr=output_checker.fd)