From ef0ab108c5873f7c8f2762f27046b89221c32d01 Mon Sep 17 00:00:00 2001 From: "Antonio S. Musumeci" Date: Sun, 22 Nov 2026 08:39:21 -0500 Subject: [PATCH] test: don't let the default minfreespace fail the #1693 rm -rf tests - TEST_rm_rf_concurrent and TEST_use_dirfd_after_rmdir mounted with the default minfreespace of 4G. Where the test tree has less than that free every mkdir and create fails with ENOSPC, so they failed for a reason that has nothing to do with removed nodes: one with a traceback, the other with "No space left on device". Set minfreespace=0, as b0d34430 did for the EXDEV tests. - In TEST_rm_rf_concurrent, an rm that fails without writing to stderr raised IndexError from taking the last line of nothing. Report the exit status in that case. --- tests/TEST_rm_rf_concurrent | 8 ++++++-- tests/TEST_use_dirfd_after_rmdir | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/TEST_rm_rf_concurrent b/tests/TEST_rm_rf_concurrent index a9710f85..a071fe1f 100755 --- a/tests/TEST_rm_rf_concurrent +++ b/tests/TEST_rm_rf_concurrent @@ -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]) diff --git a/tests/TEST_use_dirfd_after_rmdir b/tests/TEST_use_dirfd_after_rmdir index e3db538a..790af2a5 100755 --- a/tests/TEST_use_dirfd_after_rmdir +++ b/tests/TEST_use_dirfd_after_rmdir @@ -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