Skip to content

Commit 6a90534

Browse files
committed
fix(test_config.py): improve umount error logging
1 parent 9c70cd6 commit 6a90534

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎tests/test_config.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,13 @@ def test_config_not_owned_by_root(self, tmp_path):
128128
assert code == 1
129129
assert "not owned by root" in stderr
130130
finally:
131-
sp.run(["umount", str(real_path)], check=False)
131+
result = sp.run(["umount", str(real_path)], capture_output=True)
132+
if result.returncode != 0:
133+
import sys
134+
sys.stderr.write(
135+
f"WARN: umount {real_path} failed (rc={result.returncode}): "
136+
f"{result.stderr.decode('utf-8', 'replace')}\n"
137+
)
132138

133139

134140
class TestKeyLookup:

0 commit comments

Comments
 (0)