From 71a97226e89b790fbc76ff14ee127c7b3c242782 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Wed, 20 Mar 2024 01:14:07 +0100 Subject: Fix test failures: Create missing mount dir Tests were failing because mount dir was missing. Unclear to me why this became only recently an issue (github internal - out of the sudden tests were hanging). --- test/test_ctests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/test_ctests.py') diff --git a/test/test_ctests.py b/test/test_ctests.py index 951a34b..c0afe3d 100644 --- a/test/test_ctests.py +++ b/test/test_ctests.py @@ -9,10 +9,11 @@ import subprocess import pytest import platform import sys +import os from looseversion import LooseVersion from util import (wait_for_mount, umount, cleanup, base_cmdline, safe_sleep, basename, fuse_test_marker, fuse_caps, - fuse_proto) + fuse_proto, create_tmpdir) from os.path import join as pjoin import os.path @@ -29,6 +30,9 @@ def test_write_cache(tmpdir, writeback, output_checker): # deadlock in valgrind, it probably assumes that until close() returns, # control does not come to the program. mnt_dir = str(tmpdir) + print("mnt_dir: '" + mnt_dir + "'") + create_tmpdir(mnt_dir) + cmdline = [ pjoin(basename, 'test', 'test_write_cache'), mnt_dir ] if writeback: @@ -50,6 +54,7 @@ if fuse_proto >= (7,15): @pytest.mark.parametrize("notify", (True, False)) def test_notify1(tmpdir, name, notify, output_checker): mnt_dir = str(tmpdir) + create_tmpdir(mnt_dir) cmdline = base_cmdline + \ [ pjoin(basename, 'example', name), '-f', '--update-interval=1', mnt_dir ] @@ -80,6 +85,7 @@ def test_notify1(tmpdir, name, notify, output_checker): @pytest.mark.parametrize("notify", (True, False)) def test_notify_file_size(tmpdir, notify, output_checker): mnt_dir = str(tmpdir) + create_tmpdir(mnt_dir) cmdline = base_cmdline + \ [ pjoin(basename, 'example', 'invalidate_path'), '-f', '--update-interval=1', mnt_dir ] -- cgit v1.2.3 From 0d90a90b066397fcbc20188e34badc9852403ea9 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Wed, 20 Mar 2024 12:02:30 +0100 Subject: /test_ctests / test_notify1: Print cmdline on failure Tests sometimes fail with pytest.fail('file system process terminated prematurely') And it is not clear what actually happens. --- test/test_ctests.py | 1 + 1 file changed, 1 insertion(+) (limited to 'test/test_ctests.py') diff --git a/test/test_ctests.py b/test/test_ctests.py index c0afe3d..55db156 100644 --- a/test/test_ctests.py +++ b/test/test_ctests.py @@ -75,6 +75,7 @@ def test_notify1(tmpdir, name, notify, output_checker): else: assert read1 == read2 except: + print("Failure in notify test: '" + str(cmdline) + "'") cleanup(mount_process, mnt_dir) raise else: -- cgit v1.2.3