aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_examples.py
diff options
context:
space:
mode:
authorLuis Henriques <luis@igalia.com>2025-06-18 10:42:32 +0100
committerBernd Schubert <bernd@bsbernd.com>2025-06-18 13:47:11 +0200
commit1caf8162d5b08bd32cc311c001c277067bd572c0 (patch)
treee327cc384cbca22f85ca8c5415ac6298813e6892 /test/test_examples.py
parent5ceb0b05cb48e6cfa2c81160df9f1212623e86eb (diff)
downloadlibfuse-1caf8162d5b08bd32cc311c001c277067bd572c0.tar.gz
tests: example: add new test for increment epoch
This patch modifies the notify_inval_entry.c example so that it includes an extra option to use fuse_lowlevel_notify_increment_epoch(). The test test_notify_inval_entry() was also modified to test this extra option. Signed-off-by: Luis Henriques <luis@igalia.com>
Diffstat (limited to 'test/test_examples.py')
-rwxr-xr-xtest/test_examples.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index 2e23697..2658081 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -376,7 +376,8 @@ def test_null(tmpdir, output_checker):
@pytest.mark.skipif(fuse_proto < (7,12),
reason='not supported by running kernel')
-@pytest.mark.parametrize("only_expire", ("invalidate_entries", "expire_entries"))
+@pytest.mark.parametrize("only_expire", ("invalidate_entries",
+ "expire_entries", "inc_epoch"))
@pytest.mark.parametrize("notify", (True, False))
def test_notify_inval_entry(tmpdir, only_expire, notify, output_checker):
mnt_dir = str(tmpdir)
@@ -390,6 +391,10 @@ def test_notify_inval_entry(tmpdir, only_expire, notify, output_checker):
cmdline.append('--only-expire')
if "FUSE_CAP_EXPIRE_ONLY" not in fuse_caps:
pytest.skip('only-expire not supported by running kernel')
+ elif only_expire == "inc_epoch":
+ cmdline.append('--inc-epoch')
+ if fuse_proto < (7,44):
+ pytest.skip('inc-epoch not supported by running kernel')
mount_process = subprocess.Popen(cmdline, stdout=output_checker.fd,
stderr=output_checker.fd)
try: