Skip to content

test: cover the referral signal and the configuration libnvme refuses - #516

Merged
martin-belanger merged 1 commit into
linux-nvme:mainfrom
martin-belanger:ctrl-referrals-and-bad-config-tests
Sep 1, 2026
Merged

test: cover the referral signal and the configuration libnvme refuses#516
martin-belanger merged 1 commit into
linux-nvme:mainfrom
martin-belanger:ctrl-referrals-and-bad-config-tests

Conversation

@martin-belanger

Copy link
Copy Markdown
Collaborator

Two paths in ctrl.py that the nvmet-based coverage run cannot reach.

A discovery controller tells the service when the set of referrals in its log pages changes, and stafd reconfigures its controllers on that signal, so it matters that it fires when the list changes and stays quiet when it does not. nvmet serves no referrals at all, so nothing exercised either half.

The other is the configuration libnvme will not build a controller from

  • an incomplete host identity, most likely. There is nothing to retry until the configuration changes, and the retry timer is how we find out that it has; the tests pin that the exception is caught rather than escaping, and that the timer is armed at the slow period.

No behaviour changes. ctrl.py goes from 96% to 97%, and the whole from 94% to 95%. What is left in ctrl.py is mostly the DIM registration exchange, which needs a Centralized Discovery controller to talk to.

Two paths in ctrl.py that the nvmet-based coverage run cannot reach.

A discovery controller tells the service when the set of referrals in
its log pages changes, and stafd reconfigures its controllers on that
signal, so it matters that it fires when the list changes and stays
quiet when it does not. nvmet serves no referrals at all, so nothing
exercised either half.

The other is the configuration libnvme will not build a controller from
- an incomplete host identity, most likely. There is nothing to retry
until the configuration changes, and the retry timer is how we find out
that it has; the tests pin that the exception is caught rather than
escaping, and that the timer is armed at the slow period.

No behaviour changes. ctrl.py goes from 96% to 97%, and the whole from
94% to 95%. What is left in ctrl.py is mostly the DIM registration
exchange, which needs a Centralized Discovery controller to talk to.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.86%. Comparing base (d901098) to head (a3e2152).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #516      +/-   ##
==========================================
+ Coverage   70.56%   70.86%   +0.29%     
==========================================
  Files          16       16              
  Lines        2742     2742              
==========================================
+ Hits         1935     1943       +8     
+ Misses        807      799       -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martin-belanger
martin-belanger merged commit 94839cf into linux-nvme:main Sep 1, 2026
12 checks passed
@martin-belanger
martin-belanger deleted the ctrl-referrals-and-bad-config-tests branch September 1, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant