test_conflicting_or_test_only_states_decide_nothing¶
Tests › tests/test_gate_polarity.py
What this test is for
Why it exists
MEASURED ON MBEDTLS: `config_defaults` holds rows from alternative profiles, the `config_adjust_*` headers and test configs — 92 macros with conflicting states, and `MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP` "on" from a test-driver config alone. Taking the last row dropped definitions the default build compiles. A symbol is decided only when every row outside the test files agrees.
Given
conn = _macro_db(tmp_path)conn.execute( "INSERT INTO config_defaults VALUES ('MEM', 'on', '', 'profile.h', 1, '', 'source')" )
2 more
conn.execute("DELETE FROM config_defaults")conn.executescript( "INSERT INTO path VALUES (9, 'tests/cfg.h');" "CREATE TABLE test_scope (path_rowid INTEGER PRIMARY KEY); INSERT INTO test_scope VALUES (9);" "INSERT INTO config_defaults VALUES ('MEM', 'on', '', 'tests/cfg.h', 1, '', 'source');" )
When
- —
Then
- ✓ sorted(macro_definitions(conn)["mem_calloc"]) equals [10, 11]
- ✓ sorted(macro_definitions(conn)["mem_calloc"]) equals [10, 11]
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Look up one name: everything the index holds about it · 1 of 226 steps
… 69 earlier steps
… 152 later steps
2 more
- clew — `main` (clew/cli.py) · 1 of 400 steps
- `main` (scripts/export_parity.py) · 1 of 203 steps
tests/test_gate_polarity.py:124 · its file's page
What it checks (2)
assert sorted(macro_definitions(conn)["mem_calloc"]) == [10, 11], "off vs on: undecided"observes_macro_dbviaconnassert sorted(macro_definitions(conn)["mem_calloc"]) == [10, 11], ( "a test config decides nothing" )observes_macro_dbviaconn
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_conflicting_or_test_only_states_decide_nothing→_macro_dbWhat 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-QUERY-013 measured