collect failed systemd units' logs after scenario and reset failed
One of reasons of Wi-Fi scenarios failing on Fedora is/was that if condition for disabling WEP didn't handle it and hostapd services failed to start - however this was invisible until running the setup manually. For easier catching of failures in the future, we can:
- ensure at the start of the scenario that there are no failed units (either fail early if there are some or warn at Before Scenario section)
- get list of failed units (
systemctl list-units --failed
) and embed their logs - mark After Scenario section as failed and reset failed units (
systemctl reset-failed
)
(last two before the cleanups are run)