test: don't let the default minfreespace fail the #1693 tests

TEST_rm_rf_concurrent and TEST_use_dirfd_after_rmdir mount with
minfreespace=0, so a test filesystem with less than 4G free does not
fail every create with ENOSPC. An rm that fails without output reports
its exit status instead of raising IndexError.
This commit is contained in:
Antonio SJ Musumeci 2026-11-29 23:10:57 -05:00
parent 330e453f43
commit d1be8ac1db
2 changed files with 9 additions and 3 deletions

View file

@ -24,7 +24,9 @@ from posix_parity import fail
from posix_parity import mergerfs_mount
OPTIONS = "defaults,cache.attr=0"
# minfreespace=0: the default 4G would fail every create with ENOSPC
# wherever the test tree has less free space.
OPTIONS = "defaults,minfreespace=0,cache.attr=0"
SECONDS = 2.0
@ -67,7 +69,9 @@ def concurrent_rm(mount):
for proc in procs:
_, err = proc.communicate()
if proc.returncode != 0:
failures[err.decode().strip().splitlines()[-1].split(": ")[-1]] += 1
lines = err.decode(errors="replace").strip().splitlines()
reason = lines[-1].split(": ")[-1] if lines else f"exit {proc.returncode}"
failures[reason] += 1
if os.path.lexists(top):
failures["left behind"] += 1
subprocess.run(["rm", "-rf", top])

View file

@ -28,7 +28,9 @@ from posix_parity import fail
from posix_parity import mergerfs_mount
OPTIONS = "defaults,use_ino,category.create=mfs,cache.attr=0"
# minfreespace=0: the default 4G would fail every create with ENOSPC
# wherever the test tree has less free space.
OPTIONS = "defaults,use_ino,category.create=mfs,minfreespace=0,cache.attr=0"
# A local filesystem returns ENOENT for these: the kernel refuses lookups
# in a removed directory. Not compared against the native run since that