test_a_function_block_is_read_with_its_parameters_and_sections¶
Tests › tests/test_kerneldoc.py
What this test is for
Why it exists
Name, brief,
Given
- —
When
(fn, *_rest) = parse_kerneldoc(_SOURCE)
Then
- ✓ (fn["kind"], fn["name"], fn["brief"]) equals ("function", "dev_open", "Open the device.")
- ✓ json.loads(fn["params"]) equals { "dev": "The device, already probed.", "flags": "O_* flags; O_NONBLOCK returns at once.", }
- ✓ fn["context"] equals "Process context. Sleeps."
- ✓ fn["returns"] equals "0 on success, a negative errno otherwise."
- ✓ fn["description"] contains "Takes the device lock"
- ✓ fn["line"] equals 1
tests/test_kerneldoc.py:50 · its file's page
What it checks (6)
assert (fn["kind"], fn["name"], fn["brief"]) == ("function", "dev_open", "Open the device.")not attributedassert json.loads(fn["params"]) == { "dev": "The device, already probed.", "flags": "O_* flags; O_NONBLOCK returns at once.", }not attributedassert fn["context"] == "Process context. Sleeps."not attributedassert fn["returns"] == "0 on success, a negative errno otherwise."not attributedassert "Takes the device lock" in fn["description"]not attributedassert fn["line"] == 1not attributed
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
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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-009 measured