test_a_deferred_handler_is_not_inside_the_interrupt¶
Tests › tests/test_context_conflicts.py
What this test is for
Why it exists
`binding` means "a reference someone else will call later, at a time and on a thread this edge says nothing about". Getting work OUT of an interrupt by binding a handler is the pattern every RTOS documents, so traversing that edge would report the correct pattern as the violation — and thread membership traverses it, which is why this closure does not.
Given
rows = _rows(_run(tmp_path))
When
- —
Then
- ✓ rows does not contain ("blocking_call", "k_sem_take", 80)
- ✓ rows does not contain ("blocking_call", "vTaskDelay", 95)
- ✓ rows does not contain ("blocking_lock", "bus_lock", 90)
tests/test_context_conflicts.py:172 · its file's page
What it checks (3)
assert ("blocking_call", "k_sem_take", 80) not in rows, ( "deferred_work runs on a workqueue thread, where blocking is legal" )observes_rowsviarowsassert ("blocking_call", "vTaskDelay", 95) not in rows, "task_loop is not an interrupt path"observes_rowsviarowsassert ("blocking_lock", "bus_lock", 90) not in rows, "task_loop is not an interrupt path"observes_rowsviarows
Where the product reaches it
main→_run(flow)
Call flow
test_a_deferred_handler_is_not_inside_the_interrupt→_rows→_runWhat 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.
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-011 measured
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-007 measured
- REQ-DDB-SCHEMA-011 measured
- REQ-DDB-SCHEMA-012 measured