test_a_masking_primitive_that_takes_an_operand_is_not_this_primitive¶
Tests › tests/test_locks.py
What this test is for
Why it exists
THE SPELLING COLLISION THAT MAKES A DEFAULT DANGEROUS. Zephyr's `irq_disable(irq)` (include/zephyr/irq.h:307) masks ONE interrupt line and pairs with `irq_enable`; RIOT's `irq_disable()` masks all of them and pairs with `irq_restore`. One name, two primitives.
Given
sites = _sites(_CRITICAL_SECTIONS, cpp=False)argument_taking = [site for site in sites if site[3] == 24]
When
- —
Then
- ✓ argument_taking equals []
- ✓ [site[3] for site in sites if site[0] == "irq_disable"] equals [10]
tests/test_locks.py:514 · its file's page
What it checks (2)
assert argument_taking == [], ( f"irq_disable(line) at :24 is a different primitive and must not be recorded, " f"got {argument_taking}" )not attributedassert [site[3] for site in sites if site[0] == "irq_disable"] == [10], ( "the operand-less call at :10 is still the one that matches" )observes_sitesviasites
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_masking_primitive_that_takes_an_operand_is_not_this_primitive→_sitesWhat 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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-SCHEMA-011 measured