The test test_critical_action_is_taken_repeatedly has two long sleeps
of UP_DAEMON_ACTION_DELAY, which is currently set in the tests to 20 seconds.
As the global timeout for meson tests is 50 seconds, failures are likely
to occur, specially in slow architectures. Increase the timeout to 60
seconds to avoid this problem.
Closes#171
At least for "change" events the device is most likely simply one that
we are not handling at all. For these, we will convert the event to
"add" and continue to ignore it later on.
Otherwise we flush out the data much more often than needed. With this
change, we'll also wait up to 5 seconds even on lower power. Loosing 5s
of data shouldn't be too bad, and it may prevent additional disk writes.
But, more importantly, we need to deferre writing the data to a later
main loop iteration. If we did not do this, then we have an
write-amplification scenario where the history is written at least 4
times instead of once.
Closes: #150
The changes from 37b6d4b039 ("linux: Fix Bluetooth tests for
python-dbusmock changes") require a not-yet-released dbusmock version.
Simply catch the error and fall back to adding the properties in order
to be compatible with both old and new dbusmock versions of the bluez
service.
The algorithm tries to use floating point timestamps. However, the
precision of floating point is too low for unix time, causing rounding
issues. This can cause extra points to be inserted (or too few) under
some conditions, creating a scenario where the test-suite fails
randomly.
Do this properly by using 64bit integers for the time. The 64bit integer
should have enough head-room even for very long histories.
Closes: #167
Prevents a spurious warning:
"did not recognise USB path /sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001, please report"
This does not actually change any functionality, as the heuristic for
the attribute "online" in up_device_supply_coldplug() would have
matches id, too.
Fixes#148
The Linux integration tests were skipped since we started installing
python-dbusmock by hand, which meant that package dependencies like
python3-gobject were never installed, and the whole test would be
skipped.
Fixes: 3acbedca26
We need a higher than default timeout as the
test_critical_action_is_taken_repeatedly test takes at least 2 suspend
cycles and those take at least UP_DAEMON_ACTION_DELAY (20 seconds).
The daemon sources and libupower-glib were built without their historic
log domains which meant some debug messages did not appear when running
upowerd in verbose mode.
This fixes the test_no_poll_batteries test.