From 43f1d711099dca5a0c48a44205a6e1db4df29e6f Mon Sep 17 00:00:00 2001 From: aaddrick Date: Sat, 16 May 2026 10:14:13 -0400 Subject: [PATCH] test(doctor): cover df failure path for filename-limit check (#590) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend _install_df_shim with an empty-arg → exit-1 mode (matching the _install_getconf_shim convention), then add a sixth case asserting that when df --output=fstype fails, the NAME_MAX warn still fires but the eCryptfs/LUKS-specific hint is silently skipped. Per @sabiut's non-blocking ask on #614. Co-Authored-By: Claude --- tests/doctor.bats | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/doctor.bats b/tests/doctor.bats index 7078f14..d277064 100644 --- a/tests/doctor.bats +++ b/tests/doctor.bats @@ -346,17 +346,25 @@ SHIM } # Install a df shim that emits a single-column fstype listing matching -# the `df --output=fstype` shape the helper relies on. +# the `df --output=fstype` shape the helper relies on. Empty $1 → shim +# exits 1 so callers can test the "df failed" path. _install_df_shim() { mkdir -p "$TEST_TMP/bin" local fstype="$1" - cat > "$TEST_TMP/bin/df" < "$TEST_TMP/bin/df" <<'SHIM' +#!/usr/bin/env bash +exit 1 +SHIM + else + cat > "$TEST_TMP/bin/df" <