From 41c6c1e4b930c5fad4d4ba9428643f2adf1b88b0 Mon Sep 17 00:00:00 2001 From: PJ Date: Sun, 16 Aug 2026 01:08:45 +0530 Subject: [PATCH] test(ci): cover the folio classifier's verdicts 21 cases through a stubbed sanderling: every exit path, the drift check, a missing trace, a zero-byte trace, an empty glob and a truncated line. Asserts the flags that reached the binary, not just the exit code. Invoked as bash -eo pipefail -c, which is what a run: block does. Running folio-run.sh itself under -e would kill it at the first non-zero sanderling test, which is the exit code it exists to read. --- .github/scripts/folio-run-test.sh | 284 ++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100755 .github/scripts/folio-run-test.sh diff --git a/.github/scripts/folio-run-test.sh b/.github/scripts/folio-run-test.sh new file mode 100755 index 0000000..dc9757a --- /dev/null +++ b/.github/scripts/folio-run-test.sh @@ -0,0 +1,284 @@ +#!/usr/bin/env bash +# Drives folio-run.sh through a stubbed `sanderling` binary and checks the +# verdict it reaches from each shape of trace. What is under test is the +# classification, not the fuzzer: the stub writes the trace the run would have +# written and exits the code the run would have exited. +# +# folio-run.sh is invoked as `bash -eo pipefail -c