From ec16764feeb49ada6c9323bcf1ad2f9bc6348c61 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Mon, 17 Aug 2026 00:16:15 +0200 Subject: [PATCH] fix(test): convert forbidden SKIP()s in the complexity suite to policy forms The no-skips lint gate (scripts/check-no-test-skips.sh) rightly rejected the throughput-report test's two SKIP() calls: - CBM_SKIP_PERF=1 is deliberate operator configuration, not a hidden environment failure: reporting is off by request, so the test PASSes with a stderr note instead of skipping. - an uncreatable report dir IS an environment failure and now FAILs with the remedy in the message (set CBM_COMPLEXITY_REPORT_DIR), per the policy text. Signed-off-by: Martin Vogel --- tests/test_complexity.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_complexity.c b/tests/test_complexity.c index 8882418f8..1fe68a71e 100644 --- a/tests/test_complexity.c +++ b/tests/test_complexity.c @@ -609,7 +609,12 @@ TEST(complexity_shared_package_growth_stays_linear) { TEST(complexity_throughput_report_written) { const char *skip_perf = getenv("CBM_SKIP_PERF"); if (skip_perf && skip_perf[0] == '1') { - SKIP("CBM_SKIP_PERF: throughput rates are meaningless under CPU starvation"); + /* Deliberate operator config, not a hidden environment failure + * (no-skips policy): rates measured under CBM_SKIP_PERF starvation + * would only mislead, so reporting is OFF and there is nothing left + * for this test to assert. */ + fprintf(stderr, " [complexity] CBM_SKIP_PERF=1: throughput report disabled by config\n"); + PASS(); } if (cx_measure_pair() != 0) { FAIL("failed to build/run the complexity corpus pair"); @@ -619,7 +624,7 @@ TEST(complexity_throughput_report_written) { dir = "private/benchmarks"; } if (th_mkdir_p(dir) != 0) { - SKIP("report dir not creatable here (read-only checkout?)"); + FAIL("report dir not creatable (set CBM_COMPLEXITY_REPORT_DIR to a writable path)"); } char path[1024]; snprintf(path, sizeof(path), "%s/complexity-%lld.json", dir, (long long)time(NULL));