Add Beacon Loss tests
Observe that DUT marks the current service as "idle" after we
"pull the plug" on the AP. To do this, we discover what drivers
the AP uses for WiFi and reload them.
BUG=chromium-os:15981 (this CL expresses that bug)
TEST=Run test
Change-Id: I37b5f15658dec410c53e3dc1a5f8f7f1d0f34602
Reviewed-on: http://gerrit.chromium.org/gerrit/1891
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/server/site_linux_router.py b/server/site_linux_router.py
index 60f8822..ce1051d 100644
--- a/server/site_linux_router.py
+++ b/server/site_linux_router.py
@@ -415,6 +415,11 @@
# Taking down hostapd takes wlan0 and mon.wlan0 down.
if self.hostapd['configured']:
+ if 'silent' in params:
+ # Deconfigure without notifying DUT. Remove the monitor
+ # interface hostapd uses to send beacon and DEAUTH packets
+ self._remove_interfaces()
+
self.router.run("pkill hostapd >/dev/null 2>&1", ignore_status=True)
# self.router.run("rm -f %s" % self.hostapd['file'])
self.router.get_file(self.hostapd['log'],