From 8bcaff43b19e65db9451277ed67c6af2b6288c45 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 12:47:20 -0400 Subject: [PATCH] pkg-proof: the collision row measured nothing on Arch (no limits.d directory there) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1495's row writes a hand-written /etc/security/limits.d/99-amdnpu-memlock.conf and asserts that it survives our install and removal. On Arch that directory does not exist until a package creates it, so the write silently failed, there was never a file to survive, and the row reported 'deleted' — a FAIL that looked like a packaging defect and was the test failing to create its own fixture. The directory is made first now, and an empty write fails loudly instead of cascading. Found by running the row on the other two families instead of trusting that the dpkg path generalised: archlinux:latest 24 PASS, rc=0, ALL ROWS PASS (--skip-kernel dir, so the kernel rows skip themselves) fedora:latest 31 PASS, rc=0, ALL ROWS PASS (with the kernel rpms) ubuntu (before) 33 PASS, rc=0, ALL ROWS PASS Third time this week a row was green-or-red for a reason unrelated to the thing it named; the pattern is now familiar enough to state: a fixture has to be asserted to exist before the assertion about its fate means anything. Refs #1280, #1495. --- scripts/pkg-proof.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/pkg-proof.sh b/scripts/pkg-proof.sh index f3e8e0afd..f1cd19b9b 100755 --- a/scripts/pkg-proof.sh +++ b/scripts/pkg-proof.sh @@ -125,7 +125,12 @@ depmod -a "$kv" 2>/dev/null || : # are asserted here rather than assumed. if [ "$fam" != coexist ]; then hand=/etc/security/limits.d/99-amdnpu-memlock.conf + # Arch has no /etc/security/limits.d until some package creates it, so the directory has to be made + # first — without this the write silently failed there and the two rows below measured nothing + # ("hand-written file survives our removal: deleted" was true of a file that never existed). + mkdir -p "$(dirname "$hand")" printf '* soft memlock 65536\n* hard memlock 65536\n# hand-written before this package\n' > "$hand" + [ -s "$hand" ] || { row FAIL "a hand-written limits file does not block the install" "could not write $hand"; fail=1; } case $fam in deb) dpkg -i "$pkgdir"/1bit-npu-config_*.deb >/tmp/re.log 2>&1 ;; rpm) rpm -i --nosignature "$pkgdir"/1bit-npu-config-[0-9]*.rpm >/tmp/re.log 2>&1 ;;