Repository navigation
drivers/dstate: improve ALARM status safeguards, documentation and handling - #2931
desertwitch wants to merge 3 commits into
Conversation
Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
|
❌ Build nut 2.8.3.3087-master failed (commit 16746b3abc by @desertwitch) |
|
CI complains about |
…te calls [networkupstools#2931] Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
|
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 <24509509+desertwitch@users.noreply.github.com>
networkupstools#2931] Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
…workupstools#2931] Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
…s#2931] Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
…s#2931] Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
…s#2931] Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
|
superseded by #2934 |
fix #2928
work in progress