diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-24 21:09:00 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-24 21:09:00 -0700 |
commit | f84f2db69203d950c15dbb2f1748052f7b4a2b41 (patch) | |
tree | 29c1bd899ea22afe68855c69ce52a49b84c71735 /test | |
parent | b3ab365fda1a65f2c3535cda15de885bfa9de814 (diff) |
Fix segfault in debug logging code
fi may be NULL, so we need to protect against this.
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_examples.py | 5 |
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) |