test_a_handler_named_by_a_board_macro_is_still_a_handler

Tests › tests/test_isr.py

passed Passed in the packaged run.

What this test is for

Why it exists

MEASURED ON RIOT AT ITS PIN: 12 vector handlers in the indexed scope were missed because the function's NAME is a board macro — `void ISR_GPIOTE(void)` (cpu/nrf5x_common/periph/gpio.c:231), `void TIMER_0_ISR(void)` (periph/timer.c:301), `ISR_SPIM0`, `SERIAL0_ISR`. The macro expands to `isr_gpiote` and the mapping lives in `boards/*/periph_conf.h`, outside any cpu-scoped index, so the expansion is not available — but the SHAPE is unambiguous: a zero-argument void definition whose name is ISR-prefixed or ISR-suffixed.

Given

  1. found = {site[ENTRY]: site for site in _sites(_MACRO_NAMED)}
  2. for entry in ("ISR_GPIOTE", "TIMER_0_ISR"): assert entry in found, f"{entry} is a vector handler; found {sorted(found)}" assert found[entry][SOURCE] == "ast_isr_name", ( f"a macro name is an inference, not a declaration; got {found[entry][SOURCE]!r}" )
→

When

  1. —
→

Then

  1. —

tests/test_isr.py:383 · its file's page

What it checks (2)

  1. assert entry in found, f"{entry} is a vector handler; found {sorted(found)}" observes _sites via found
  2. assert found[entry][SOURCE] == "ast_isr_name", ( f"a macro name is an inference, not a declaration; got {found[entry][SOURCE]!r}" ) observes _sites via found

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_a_handler_named_by_a_board_macro_is_still_a_handler→_sites

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

test_a_handler_named_by_a_board_macro_is_still_a_handler · 2 checks_sites_walk_spawn_sitesis_python_treeREQ-DDB-PIPE-003 · measured_sitesload_thread_patternsREQ-DDB-SCHEMA-001 · measured_sitesload_thread_patternsdeclaration_originREQ-DDB-SCHEMA-012 · inferred
Also reaches 3 requirements

Its run touches their code; that is reach, not proof.