test_maintainers_every_matching_stanza_applies¶
Tests › tests/test_owners.py
What this test is for
Why it exists
Kernel rules: `F: dir/` covers below; `X:` excludes; `N:` is a regex over the path; every stanza that matches applies.
Verifies REQ-DDB-INDEX-007
Given
- —
When
stanzas = parse_maintainers(_MAINTAINERS)
Then
- ✓ [s.title for s in stanzas] equals ["NET DRIVERS", "WIRELESS"]
- ✓ [s.title for s in stanzas if s.covers("drivers/net/eth.c")] equals ["NET DRIVERS"]
- ✓ [s.title for s in stanzas if s.covers("drivers/net/wireless/a.c")] equals ["WIRELESS"]
- ✓ [s.title for s in stanzas if s.covers("drivers/net/my_wifi.c")] equals [ "NET DRIVERS", "WIRELESS", ]
tests/test_owners.py:64 · its file's page
What it checks (4)
assert [s.title for s in stanzas] == ["NET DRIVERS", "WIRELESS"]observesparse_maintainersviastanzasassert [s.title for s in stanzas if s.covers("drivers/net/eth.c")] == ["NET DRIVERS"]observesparse_maintainersviastanzasassert [s.title for s in stanzas if s.covers("drivers/net/wireless/a.c")] == ["WIRELESS"]observesparse_maintainersviastanzasassert [s.title for s in stanzas if s.covers("drivers/net/my_wifi.c")] == [ "NET DRIVERS", "WIRELESS", ]observesparse_maintainersviastanzas
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_maintainers_every_matching_stanza_applies→parse_maintainersWhat 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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-INDEX-007 | catalog | unknown |