From 6e454803fb0b27d410278dbcd9101efd93dd6ae7 Mon Sep 17 00:00:00 2001 From: jedarden Date: Fri, 3 Jul 2026 13:37:19 -0400 Subject: [PATCH] test: print neutral RUN marker on longjmp failure-return branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The else branch of main()'s per-test setjmp loop — taken when a failed assertion longjmps back — now prints "RUN: (assertion failed)" instead of "FAIL: ". The marker still names the failing test and its own per-test `failed` counter, but contains no PASS/FAIL outcome token (outcome labels are deferred to a later sibling of bf-53ut). g_failure_count accounting is unchanged: test_record_failure() already bumped it before the longjmp, so this branch only prints. Child 1 of 4 for bf-38e9 (split-child 2 of bf-53ut). Co-Authored-By: Claude --- firmware/test/test_runner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/test/test_runner.c b/firmware/test/test_runner.c index 7fad69c..fa6d5f0 100644 --- a/firmware/test/test_runner.c +++ b/firmware/test/test_runner.c @@ -220,8 +220,8 @@ static int test_entry_cmp(const void *a, const void *b) * * Failure counting is deliberately NOT repeated here. test_record_failure() * already bumped g_failure_count before it longjmp'd out of the failing test, - * so the else branch below only prints the FAIL line and its own per-test - * counter — it leaves g_failure_count alone. That keeps a single source of + * so the else branch below only prints a neutral marker line naming the test + * and its own per-test counter — it leaves g_failure_count alone. That keeps a single source of * truth for "did anything fail anywhere", and the exit code reads that truth * directly (g_failure_count > 0). The local `failed` counter mirrors it only * for the summary line, where it pairs with `passed` to total g_test_count. @@ -258,7 +258,7 @@ int main(void) printf("PASS: %s\n", g_tests[i].name); passed++; } else { - printf("FAIL: %s\n", g_tests[i].name); + printf("RUN: %s (assertion failed)\n", g_tests[i].name); failed++; } }