aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-24 21:09:00 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-24 21:09:00 -0700
commitf84f2db69203d950c15dbb2f1748052f7b4a2b41 (patch)
tree29c1bd899ea22afe68855c69ce52a49b84c71735 /test
parentb3ab365fda1a65f2c3535cda15de885bfa9de814 (diff)
Fix segfault in debug logging code
fi may be NULL, so we need to protect against this.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_examples.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index 5c611a1..457c2a0 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -60,13 +60,16 @@ def test_hello(tmpdir, name, options):
@pytest.mark.parametrize("name", ('passthrough', 'passthrough_fh',
'passthrough_ll'))
-def test_passthrough(tmpdir, name):
+@pytest.mark.parametrize("debug", (True, False))
+def test_passthrough(tmpdir, name, debug):
mnt_dir = str(tmpdir.mkdir('mnt'))
src_dir = str(tmpdir.mkdir('src'))
cmdline = base_cmdline + \
[ pjoin(basename, 'example', name),
'-f', mnt_dir ]
+ if debug:
+ cmdline.append('-d')
mount_process = subprocess.Popen(cmdline)
try:
wait_for_mount(mount_process, mnt_dir)