aboutsummaryrefslogtreecommitdiffstats
path: root/test/util.py
diff options
context:
space:
mode:
authorMattias Nissler <mnissler@chromium.org>2018-08-31 09:44:04 +0200
committerNikolaus Rath <Nikolaus@rath.org>2018-10-09 20:36:22 +0100
commitda7c9b228aaf31f37684e106b75262055ca440de (patch)
tree548cb7e54d87af7c2cfdcde3dcb01d0f184f0315 /test/util.py
parent64e11073b9347fcf9c6d1eea143763ba9e946f70 (diff)
downloadlibfuse-da7c9b228aaf31f37684e106b75262055ca440de.tar.gz
Add unprivileged option in `mount.fuse3`
The unprivileged option allows to run the FUSE file system process without privileges by dropping capabilities and preventing them from being re-acquired via setuid / fscaps etc. To accomplish this, mount.fuse sets up the `/dev/fuse` file descriptor and mount itself and passes the file descriptor via the `/dev/fd/%u` mountpoint syntax to the FUSE file system.
Diffstat (limited to 'test/util.py')
-rw-r--r--test/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/util.py b/test/util.py
index b9c1b0c..ba02b9f 100644
--- a/test/util.py
+++ b/test/util.py
@@ -7,6 +7,7 @@ import time
from os.path import join as pjoin
import sys
import re
+import itertools
basename = pjoin(os.path.dirname(__file__), '..')
@@ -138,6 +139,12 @@ def fuse_test_marker():
return pytest.mark.uses_fuse()
+def powerset(iterable):
+ s = list(iterable)
+ return itertools.chain.from_iterable(
+ itertools.combinations(s, r) for r in range(len(s)+1))
+
+
# Use valgrind if requested
if os.environ.get('TEST_WITH_VALGRIND', 'no').lower().strip() \
not in ('no', 'false', '0'):
@@ -147,6 +154,8 @@ else:
# Try to use local fusermount3
os.environ['PATH'] = '%s:%s' % (pjoin(basename, 'util'), os.environ['PATH'])
+# Put example binaries on PATH
+os.environ['PATH'] = '%s:%s' % (pjoin(basename, 'example'), os.environ['PATH'])
try:
(fuse_proto, fuse_caps) = test_printcap()