test_a_conditional_release_that_does_not_jump_away_fails_closed

Tests › tests/test_critical_sections.py

passed Passed in the packaged run.

What this test is for

Why it exists

`if (x) { unlock; }` with NO return releases the lock on one path only, so after the branch the lock state is genuinely unknown. There is no honest extent to report, and claiming either answer invents synchronization.

Given

  1. src = b"""\ void maybe(int x) { pthread_mutex_lock(&m_lock); if (x) { pthread_mutex_unlock(&m_lock); } unknown_state(); } """
  2. site = next(s for s in _sites(src, cpp=False) if s[OPERAND] == "m_lock")
→

When

  1. —
→

Then

  1. ✓ site[END_LINE] is None
  2. ✓ site[CALLS] equals []
  3. ✓ site[CONFIDENCE] equals EXTENT_UNRESOLVED

tests/test_critical_sections.py:248 · its file's page

What it checks (3)

  1. assert site[END_LINE] is None observes _sites via site
  2. assert site[CALLS] == [] observes _sites via site
  3. assert site[CONFIDENCE] == EXTENT_UNRESOLVED observes _sites via site

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_conditional_release_that_does_not_jump_away_fails_closed→_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_conditional_release_that_does_not_jump_away_fails_closed · 3 checks_sites… 4 calls …enclosingREQ-DDB-PIPE-003 · measured_sites… 4 calls …resolve_sectionREQ-DDB-SCHEMA-011 · measured
Also reaches 2 requirements

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