tests: Reset hostapd state with FLUSH between test cases

This is similar to the FLUSH command for wpa_supplicant.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-11-28 15:50:47 +02:00 committed by Jouni Malinen
parent b56f6c8869
commit f8949f5f8f
2 changed files with 4 additions and 0 deletions

View file

@ -46,6 +46,9 @@ class HostapdGlobal:
def relog(self): def relog(self):
self.ctrl.request("RELOG") self.ctrl.request("RELOG")
def flush(self):
self.ctrl.request("FLUSH")
class Hostapd: class Hostapd:
def __init__(self, ifname): def __init__(self, ifname):

View file

@ -42,6 +42,7 @@ def reset_devs(dev, apdev):
try: try:
hapd = HostapdGlobal() hapd = HostapdGlobal()
hapd.flush()
hapd.remove('wlan3-3') hapd.remove('wlan3-3')
hapd.remove('wlan3-2') hapd.remove('wlan3-2')
for ap in apdev: for ap in apdev: