From 435a14e0297cf796a19aaf04221fa14957fb3717 Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Mon, 3 Jan 2022 10:49:46 +0200 Subject: 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 --- test/test_ctests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/test_ctests.py') 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) -- cgit v1.2.3