Parcourir la source

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>
Jouni Malinen il y a 11 ans
Parent
commit
f8949f5f8f
2 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 3 0
      tests/hwsim/hostapd.py
  2. 1 0
      tests/hwsim/run-tests.py

+ 3 - 0
tests/hwsim/hostapd.py

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

+ 1 - 0
tests/hwsim/run-tests.py

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