-
-
Notifications
You must be signed in to change notification settings - Fork 376
drivers/dstate: improve ALARM status safeguards, documentation and handling #2931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: desertwitch <[email protected]>
Signed-off-by: desertwitch <[email protected]>
❌ Build nut 2.8.3.3087-master failed (commit 16746b3abc by @desertwitch) |
CI complains about |
…te calls [networkupstools#2931] Signed-off-by: desertwitch <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks
CI will fail this again, but I think we need to talk in which direction to go here before further work. The safeguard logic assumes that a driver is using In any case, we can separate this into legacy logic and modern logic quite well (see last commit) - so that's so far so good... The test logic (and resulting failures) makes no sense to me, it assumes odd combinations of both modern/legacy code. The segmentation fault results from the safeguard thinking it's a cleared alarm state, nulling the buffer and then the test function subsequently querying a no longer existing nut/tests/driver_methods_utest.c Lines 142 to 147 in dfe6062
nut/tests/driver_methods_utest.c Lines 158 to 198 in dfe6062
The mixture in these test cases makes no sense, either it should be legacy enough I see three credible scenarios:
So we see that legacy drivers could couple alarm states with the |
P.S. Maybe the cleanest solution would be to fix up the - on first glance +/- 3 remaining drivers - and completely remove this fallback logic in favour of appropriately using both the We can theoretically still show a manually set Basically this would entail only removing these sections and a manually set Lines 1797 to 1809 in dfe6062
Lines 1872 to 1875 in dfe6062
Isn't the whole point of the ... or is this for |
Thinking (slowly and in the background though, got some work to catch up with)... |
No worries, just wanted to drain my thoughts to "paper" (sorry it ended up in a wall of text), mostly so I don't forget. I'll keep this as is for now, but will get started on a second alternative PR on how it would look without legacy code and simply handling textual alarms vs. modern alarms in |
❌ Build nut 2.8.3.3089-master failed (commit 8fbbf31e3a by @desertwitch) |
…status [networkupstools#2931] Signed-off-by: desertwitch <[email protected]>
networkupstools#2931] Signed-off-by: desertwitch <[email protected]>
…workupstools#2931] Signed-off-by: desertwitch <[email protected]>
…s#2931] Signed-off-by: desertwitch <[email protected]>
…s#2931] Signed-off-by: desertwitch <[email protected]>
…s#2931] Signed-off-by: desertwitch <[email protected]>
superseded by #2934 |
fix #2928
work in progress