test: cover the referral signal and the configuration libnvme refuses - #516
Merged
martin-belanger merged 1 commit intoSep 1, 2026
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.