From 06ea36d237e11b55042bb656cdc65a539804dd97 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Fri, 26 Jun 2026 23:46:19 +0200 Subject: [PATCH] ci: CBM_REPRO_ONLY suite filter + reliable (ASan) fast lane - repro_main: RUN_SUITE honors CBM_REPRO_ONLY (comma list of suite-name substrings) for fast targeted validation of a single fix. - fast-repro.yml: ASan single-platform (the no-sanitizer build crashed some suites); single-platform is the speedup vs the 5-platform board. Signed-off-by: Martin Vogel --- .github/workflows/fast-repro.yml | 26 ++++++++++++-------------- tests/repro/repro_main.c | 16 +++++++++++++--- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/fast-repro.yml b/.github/workflows/fast-repro.yml index fe67a05a7..b29fabbcc 100644 --- a/.github/workflows/fast-repro.yml +++ b/.github/workflows/fast-repro.yml @@ -9,10 +9,10 @@ name: Fast Repro on: workflow_dispatch: inputs: - asan: - description: 'Build with ASan/UBSan (slower; needed for crash/UAF reds)' - type: boolean - default: false + suites: + description: 'Comma list of suite-name substrings to run (empty = all)' + type: string + default: '' push: branches: ['qa/fast-**'] @@ -27,13 +27,11 @@ jobs: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - name: Install deps run: sudo apt-get update && sudo apt-get install -y zlib1g-dev - - name: test-repro (fast, no sanitizers by default) - run: | - # No-ASan build is much faster and is enough for the extraction / - # attribution / invariant reds (the bulk). Crash/UAF reds need ASan - # → dispatch with asan=true, or rely on the full board. - if [ "${{ inputs.asan }}" = "true" ]; then - scripts/repro.sh CC=gcc CXX=g++ - else - scripts/repro.sh CC=gcc CXX=g++ SANITIZE= - fi + - name: test-repro (single platform, ASan; CBM_REPRO_ONLY filters suites) + env: + # Optionally narrow to specific suites for a fast targeted check, e.g. + # CBM_REPRO_ONLY="repro_invariant_enclosing_parity,repro_grammar_systems". + # Empty = run all. (No-sanitizer builds crash on some suites, so ASan + # stays on; the single-platform run is the speedup vs the 5-platform board.) + CBM_REPRO_ONLY: ${{ github.event.inputs.suites }} + run: scripts/repro.sh CC=gcc CXX=g++ diff --git a/tests/repro/repro_main.c b/tests/repro/repro_main.c index c12144206..6c516be32 100644 --- a/tests/repro/repro_main.c +++ b/tests/repro/repro_main.c @@ -27,12 +27,22 @@ int tf_skip_count = 0; #include "test_framework.h" -/* Per-suite summary: redefine RUN_SUITE so every suite prints a one-line - * "[SUITE] P passed, F failed" report. Makes the board/fast-lane output - * greppable for which suites still have reds without scraping every test line. */ +/* Per-suite summary + filter. RUN_SUITE prints a one-line + * "[SUITE] P passed, F failed" report (greppable for which suites still + * have reds). When CBM_REPRO_ONLY is set (comma/space list of suite-name + * substrings), only matching suites run — for fast targeted validation of a + * single fix without rebuilding intent. */ +static int cbm_suite_enabled(const char *name) { + const char *only = getenv("CBM_REPRO_ONLY"); + if (!only || !*only) + return 1; + return strstr(only, name) != NULL; +} #undef RUN_SUITE #define RUN_SUITE(name) \ do { \ + if (!cbm_suite_enabled(#name)) \ + break; \ int _p0 = tf_pass_count, _f0 = tf_fail_count; \ printf("\n%s=== %s ===%s\n", tf_dim(), #name, tf_reset()); \ suite_##name(); \