From 3863da58b1f7904675ca050434d8219bc410f34a Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Wed, 16 Apr 2025 00:24:42 +0200 Subject: conn: prevent duplicate flag conversion in high-level interface The high-level interface triggers flag conversion twice: once in the high-level init and once in the low-level init. This caused false "both 'want' and 'want_ext' are set" errors when using fuse_set_feature_flag() or fuse_unset_feature_flag(). The existing check for duplicate conversion only worked when 32-bit flags were set directly. When using the preferred flag manipulation functions, conn->want and the lower 32 bits of conn->want_ext would differ, triggering the error. Fix this by synchronizing conn->want with the lower 32 bits of conn->want_ext after conversion, ensuring consistent state for subsequent calls. Closes: https://github.com/libfuse/libfuse/issues/1171 Signed-off-by: Bernd Schubert --- test/test_examples.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/test_examples.py') diff --git a/test/test_examples.py b/test/test_examples.py index 54a2f88..9c8b77e 100755 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -44,8 +44,13 @@ if sys.platform == 'linux': options.append('clone_fd') def invoke_directly(mnt_dir, name, options): - cmdline = base_cmdline + [ pjoin(basename, 'example', name), - '-f', mnt_dir, '-o', ','.join(options) ] + # Handle test/hello specially since it's not in example/ + if name.startswith('test/'): + path = pjoin(basename, name) + else: + path = pjoin(basename, 'example', name) + + cmdline = base_cmdline + [ path, '-f', mnt_dir, '-o', ','.join(options) ] if name == 'hello_ll': # supports single-threading only cmdline.append('-s') @@ -88,7 +93,7 @@ def readdir_inode(dir): @pytest.mark.parametrize("cmdline_builder", (invoke_directly, invoke_mount_fuse, invoke_mount_fuse_drop_privileges)) @pytest.mark.parametrize("options", powerset(options)) -@pytest.mark.parametrize("name", ('hello', 'hello_ll')) +@pytest.mark.parametrize("name", ('hello', 'hello_ll', 'test/hello')) def test_hello(tmpdir, name, options, cmdline_builder, output_checker): logger = logging.getLogger(__name__) mnt_dir = str(tmpdir) -- cgit v1.2.3