Skip to content

Commit acce9a4

Browse files
committed
test: make the Windows build-dir DACL stamp verify itself out loud
The dry run's windows-11-arm shard failed its install-flow tests with the source-directory refusal the stamp exists to prevent — while the identical commands, run from the identically dirty state on the ARM64 VM, stamp clean and pass. The difference is invisible because the stamp was fully silenced; a silent load-bearing step cost a full CI round to even learn whether it had run. The stamp now reports each icacls failure with the user and directory, re-inspects the DACL afterwards, and prints one line in either direction: stamped clean, or the surviving cross-account grants. Verified on the VM from a deliberately reset (inherited, Authenticated- Users-writable) build directory through the real --par path: stamp reports clean, suites green. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 2af28c9 commit acce9a4

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎scripts/run-tests-parallel.sh‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,21 @@ case "$(uname -s 2>/dev/null)" in
5252
MINGW* | MSYS*)
5353
runner_dir_w="$(cygpath -w "$(dirname "$RUNNER")")"
5454
me="$(whoami | tr -d '\r')"
55-
MSYS2_ARG_CONV_EXCL='*' icacls "$runner_dir_w" /inheritance:r \
55+
stamp_out=$(MSYS2_ARG_CONV_EXCL='*' icacls "$runner_dir_w" /inheritance:r \
5656
/grant:r "${me}:(OI)(CI)F" '*S-1-5-18:(OI)(CI)F' '*S-1-5-32-544:(OI)(CI)F' \
57-
/Q >/dev/null 2>&1 || true
58-
MSYS2_ARG_CONV_EXCL='*' icacls "${runner_dir_w}\\*" /reset /T /C /Q >/dev/null 2>&1 || true
57+
/Q 2>&1) || echo "WARN: build-dir DACL stamp failed (user=$me dir=$runner_dir_w): $stamp_out"
58+
reset_out=$(MSYS2_ARG_CONV_EXCL='*' icacls "${runner_dir_w}\\*" /reset /T /C /Q 2>&1) ||
59+
echo "WARN: build-dir child DACL reset failed: $(printf '%s' "$reset_out" | tail -2)"
60+
# The stamp is load-bearing for the install-flow suites: verify it and say
61+
# so, in either direction — a silent stamp once cost a full CI round to
62+
# even see WHETHER it had run.
63+
if MSYS2_ARG_CONV_EXCL='*' icacls "$runner_dir_w" 2>/dev/null |
64+
grep -qE 'Authenticated Users|CREATOR OWNER'; then
65+
echo "WARN: build-dir DACL still grants cross-account mutation after stamp:"
66+
MSYS2_ARG_CONV_EXCL='*' icacls "$runner_dir_w" 2>&1 | head -8
67+
else
68+
echo "build-dir DACL stamped clean ($runner_dir_w, user=$me)"
69+
fi
5970
;;
6071
esac
6172

0 commit comments

Comments
 (0)