conman: Always check client status.
Currently, there is caching code (WLANConfiguration.client_up) that
was intended to avoid unnecessary checks. But this is hard to make
correct if e.g. something else kills wpa_supplicant, and in any case
was a premature optimization. For now, always make the expensive
check; if it becomes a problem we can revisit caching the result
properly.
This change revealed a few small inconsistencies in unit tests which
have also been addressed, including:
* The fake wpa_supplicant control socket was touched far more often
than necessary. In one case, it was actually created when instead
the tests should have tested the behavior that occurs when it does
not already exist (in interface_test.Wifi.attach_wpa_control).
* In the test overrides of start_client and stop_client, some things
were happening in an unrealistic order (e.g. fakes were being
started before calling the super method, rather than after).
* 'my ssid' was set by default in fake wifi interfaces, meaning that
tests were not verifying that the SSID was set appropriately.
Finally, some comments which were incorrectly specific to non-Frenzy
devices (e.g. by talking about wcli*, when Frenzy uses wlan* for its
client interfaces) have been updated.
Change-Id: I95d0afe939e67fd8fc39befc9b6085cd57e0fa87
4 files changed