power.c:68:0.001 no battery detected
power.c:69:0.001 Test failed: expected ACLineStatus to be 1, got 0
This test failed but I'm pretty sure the logic holds on all (compliant) real systems.
Something about the test environment maybe?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8460#note_108329
On Thu Jun 26 22:17:25 2025 +0000, Jacek Caban wrote:
> Yes, a stub is fine (and you may use this MR for that).
Sorry, I think I messed up this MR branch, so it can't be merged fast-forward-merged. I've created a !8456 merge request for the stubs. Also I've implemented a PersistentZoneIdentifier interfaces with test cases in !8459, but it's just a mimic the behavior of PersistentZoneIdentifier without any writing or reading information about the zone. Some test cases fail due to no reading zone information.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8378#note_108320
Current implementation of system.fill_battery_state only reads "charge_*" and "current_*" attributes.
Some batteries expose different attributes, namely "power_*" and "energy_*".
Added the required logic to support both types.
Further, when rewriting the function I also added support for systems with multiple batteries.
Windows documentation was not clear but from what I gathered struct SYSTEM_BATTERY_STATE sets Charging and Discharging if ANY battery is charging/discharging.
So, to check if the overall system is charging/discharging only Rate can be used.
Also cleaned the code related to "AC". There was a "fixme" there which I didn't fully undertand as SYSTEM_BATTERY_STATE.AcOnLine == True if any AC is present, so the proper logic was already implemented
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8458