aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_examples.py
diff options
context:
space:
mode:
authoramitgeron <amit.geron@gmail.com>2023-12-17 19:45:47 +0200
committerGitHub <noreply@github.com>2023-12-17 17:45:47 +0000
commitbd8985945b5a1c35b7baa71571b1b61807ad7514 (patch)
tree7366bc35179bde559d2337a19cdb263ac5825329 /test/test_examples.py
parent3f6cf537b77597d89bebd8387e93d4e42428b966 (diff)
downloadlibfuse-bd8985945b5a1c35b7baa71571b1b61807ad7514.tar.gz
Allow *xattr operations on root directory (ino 1)
Diffstat (limited to 'test/test_examples.py')
-rwxr-xr-xtest/test_examples.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index 96e4108..a597f55 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -106,6 +106,8 @@ def test_hello(tmpdir, name, options, cmdline_builder, output_checker):
assert exc_info.value.errno == errno.ENOENT
if name == 'hello_ll':
tst_xattr(mnt_dir)
+ path = os.path.join(mnt_dir, 'hello')
+ tst_xattr(path)
except:
cleanup(mount_process, mnt_dir)
raise
@@ -855,8 +857,7 @@ def tst_passthrough(src_dir, mnt_dir):
assert os.stat(src_name) == os.stat(mnt_name)
-def tst_xattr(mnt_dir):
- path = os.path.join(mnt_dir, 'hello')
+def tst_xattr(path):
os.setxattr(path, b'hello_ll_setxattr_name', b'hello_ll_setxattr_value')
assert os.getxattr(path, b'hello_ll_getxattr_name') == b'hello_ll_getxattr_value'
os.removexattr(path, b'hello_ll_removexattr_name')