From 7ec550b7b81fd49f87b2f17a19b21d96dac9937d Mon Sep 17 00:00:00 2001 From: Marian Koreniuk Date: Thu, 29 Oct 2026 13:59:43 +0100 Subject: [PATCH] fix(e2e): point the selector's suite rule back at the allowlist rule The first commit says the two rules are cross-referenced so they move together, but only lg_suite_has_test pointed at the selector. The selector's suite enumeration comment now names lg_suite_has_test as well, so a change to either side prompts the other. The layout case also pins a chainsaw-test.yml that is a directory, the other half of the type test: dropping that name from the find now turns the case red. Signed-off-by: Marian Koreniuk Assisted-by: LLM (cherry picked from commit b61ad29783f6377d538bff5110eb796c26d207cd) Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com> --- hack/chainsaw-leak-guard_test.bats | 6 +++--- hack/select-e2e.sh | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hack/chainsaw-leak-guard_test.bats b/hack/chainsaw-leak-guard_test.bats index 6dadd5e5d..5506e8c40 100644 --- a/hack/chainsaw-leak-guard_test.bats +++ b/hack/chainsaw-leak-guard_test.bats @@ -439,16 +439,16 @@ baseline_of_platform() { # Chainsaw finds a Test: chainsaw-test.yaml, chainsaw-test.yml, numbered step # files, or a Test nested in a subdirectory. The allowlist has to accept the # same set, or a suite that runs cannot be exempted and the run stops before - # the first suite. That includes a chainsaw-test.yaml that is a directory: + # the first suite. That includes a chainsaw-test.y*ml that is a directory: # the selector keeps it so Chainsaw fails on it loudly, and refusing it here # would stop the run before Chainsaw could report it. new_fixture - mkdir -p "$FIX/root/plain" "$FIX/root/yml" "$FIX/root/steps" "$FIX/root/nested/sub" "$FIX/root/dirtest/chainsaw-test.yaml" + mkdir -p "$FIX/root/plain" "$FIX/root/yml" "$FIX/root/steps" "$FIX/root/nested/sub" "$FIX/root/dirtest/chainsaw-test.yaml" "$FIX/root/dirtestyml/chainsaw-test.yml" : >"$FIX/root/plain/chainsaw-test.yaml" : >"$FIX/root/yml/chainsaw-test.yml" : >"$FIX/root/steps/01-install.yaml" : >"$FIX/root/nested/sub/chainsaw-test.yaml" - printf 'plain cozystack/cozystack#1\nyml cozystack/cozystack#1\nsteps cozystack/cozystack#1\nnested cozystack/cozystack#1\ndirtest cozystack/cozystack#1\n' >"$FIX/allow" + printf 'plain cozystack/cozystack#1\nyml cozystack/cozystack#1\nsteps cozystack/cozystack#1\nnested cozystack/cozystack#1\ndirtest cozystack/cozystack#1\ndirtestyml cozystack/cozystack#1\n' >"$FIX/allow" lg lg_allowlist_validate "$FIX/allow" "$FIX/root" rm -rf "$FIX" } diff --git a/hack/select-e2e.sh b/hack/select-e2e.sh index 4c33cb594..fcb7651e3 100755 --- a/hack/select-e2e.sh +++ b/hack/select-e2e.sh @@ -178,6 +178,8 @@ inert_config_pattern='^(examples/|\.github/|\.claude/|\.gemini/|img/|hack/testda # and `-type f` would be too narrow. A chainsaw-test.y*ml counts whatever its # type: Chainsaw stats it and fails loudly on a directory, and leaving that # suite out would hide the failure instead. +# The leak guard's allowlist accepts a suite by the same rule, in +# lg_suite_has_test (hack/e2e-chainsaw/_lib/leak-guard.sh). Change both together. # # Captured before the sed/sort rather than piped straight into them: a pipeline # carries its LAST command's status, so `$(find ... | sed | sort)` would report