aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_examples.py
diff options
context:
space:
mode:
authorJean-Pierre André <jpandre@users.noreply.github.com>2021-03-18 10:52:30 +0100
committerGitHub <noreply@github.com>2021-03-18 09:52:30 +0000
commitbdd2d4110fbc6d2059eb699efad2cca4a7eacccb (patch)
tree62ca0ce9b94529a68e376922963993606af2f35a /test/test_examples.py
parent77d662459a0fcdf358d515477d33795837e859d5 (diff)
downloadlibfuse-bdd2d4110fbc6d2059eb699efad2cca4a7eacccb.tar.gz
Fix returning d_ino and d_type by readdir(3) in non-plus mode
When not using the readdir_plus mode, the d_type was not returned, and the use_ino flag was not used for returning d_ino. This patch fixes the returned values for d_ino and d_type by readdir(3) The test for the returned value of d_ino has been adjusted to also take the d_type into consideration and to check the returned values in both basic readdir and readdir_plus modes. This is done by executing the passthrough test twice. Co-authored-by: Jean-Pierre André <jpandre@users.sourceforge.net>
Diffstat (limited to 'test/test_examples.py')
-rwxr-xr-xtest/test_examples.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index aab970f..880fbad 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -109,7 +109,8 @@ def test_hello(tmpdir, name, options, cmdline_builder, output_checker):
umount(mount_process, mnt_dir)
@pytest.mark.parametrize("writeback", (False, True))
-@pytest.mark.parametrize("name", ('passthrough', 'passthrough_fh', 'passthrough_ll'))
+@pytest.mark.parametrize("name", ('passthrough', 'passthrough_plus',
+ 'passthrough_fh', 'passthrough_ll'))
@pytest.mark.parametrize("debug", (False, True))
def test_passthrough(short_tmpdir, name, debug, output_checker, writeback):
# Avoid false positives from libfuse debug messages
@@ -124,9 +125,14 @@ def test_passthrough(short_tmpdir, name, debug, output_checker, writeback):
mnt_dir = str(short_tmpdir.mkdir('mnt'))
src_dir = str(short_tmpdir.mkdir('src'))
- cmdline = base_cmdline + \
- [ pjoin(basename, 'example', name),
- '-f', mnt_dir ]
+ if name == 'passthrough_plus':
+ cmdline = base_cmdline + \
+ [ pjoin(basename, 'example', 'passthrough'),
+ '--plus', '-f', mnt_dir ]
+ else:
+ cmdline = base_cmdline + \
+ [ pjoin(basename, 'example', name),
+ '-f', mnt_dir ]
if debug:
cmdline.append('-d')