From fe19efb8b5d3a30a7e6fb771e0a71d87fd13ac50 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Sun, 18 Oct 2026 17:10:45 +0200 Subject: [PATCH] test(test-impact): make the conditional-path fixture a valid coverage map A coverage map must cover every function it lists, and five of the seven variants covered only function 1, so the map failed to parse and the test stopped at its setup ("map is NULL") with the fix applied or not. The changed function (0) is now covered by the setup row of a suite no runner registers, so alpha's own rows stay quiet and each variant still reaches alpha by exactly one path. RED with the selection fix reverted (alpha lacks CONDITIONAL), green with it. Signed-off-by: Martin Vogel --- tests/test_test_impact.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_test_impact.c b/tests/test_test_impact.c index 210aee288..17b4b3ccb 100644 --- a/tests/test_test_impact.c +++ b/tests/test_test_impact.c @@ -1720,9 +1720,12 @@ TEST(test_selection_inventory_ambiguity_and_conditionals_use_whole_suite) { * runner that lacks it then tolerates its absence. Its cases and registrations * are unconditional here, so only the runner registration can say so. */ TEST(test_selection_conditionally_registered_suite_is_conditional_on_every_path) { + /* A map covers every function it lists, so the changed one (0) is covered + * by the setup of a suite no runner registers: alpha's own rows stay + * quiet and each variant reaches alpha by its one path. */ static const char *quiet_rows = "alpha:*\tcomplete\t\t1\nalpha:stat\tcomplete\t\t1\n" "alpha:cov\tcomplete\t\t1\nalpha:changed\tcomplete\t\t1\n" - "alpha:quiet\tcomplete\t\t1\n"; + "alpha:quiet\tcomplete\t\t1\nomega:*\tcomplete\t\t0\n"; struct { const char *rows; bool admitted; @@ -1730,7 +1733,8 @@ TEST(test_selection_conditionally_registered_suite_is_conditional_on_every_path) unsigned path; } variants[] = { {"alpha:*\tincomplete\tlost setup\t1\nalpha:stat\tcomplete\t\t1\n" - "alpha:cov\tcomplete\t\t1\nalpha:changed\tcomplete\t\t1\nalpha:quiet\tcomplete\t\t1\n", + "alpha:cov\tcomplete\t\t1\nalpha:changed\tcomplete\t\t1\nalpha:quiet\tcomplete\t\t1\n" + "omega:*\tcomplete\t\t0\n", true, false, false, false, CBM_TEST_SELECT_SETUP_UNKNOWN}, {"alpha:*\tcomplete\t\t0\nalpha:stat\tcomplete\t\t1\n" "alpha:cov\tcomplete\t\t1\nalpha:changed\tcomplete\t\t1\nalpha:quiet\tcomplete\t\t1\n",