test: enable unsafe teardown of tempDir

aarch64 libc or kernel might be stricter in keeping files locked while they're open.
This causes failed teardown of the tmpdir
This commit is contained in:
Johannes Kirschbauer
2025-07-02 09:27:05 +02:00
parent 695574988e
commit b6f00ed1f6

View File

@@ -42,7 +42,7 @@ class SshdConfig:
def sshd_config(test_root: Path) -> Iterator[SshdConfig]:
# FIXME, if any parent of the sshd directory is world-writable then sshd will refuse it.
# we use .direnv instead since it's already in .gitignore
with TemporaryDirectory(prefix="sshd-") as _dir:
with TemporaryDirectory(prefix="sshd-", ignore_cleanup_errors=True) as _dir:
tmpdir = Path(_dir)
host_key = test_root / "data" / "ssh_host_ed25519_key"
host_key.chmod(0o600)