]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make MACsec test cases clear monitor socket more thoroughly
authorJouni Malinen <j@w1.fi>
Mon, 25 Feb 2019 19:40:23 +0000 (21:40 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 25 Feb 2019 19:40:23 +0000 (21:40 +0200)
The wpas (dev5) control interface socket did not always get cleared in
the MACsec test cases and this could result in issues with following
test cases if the dev5 message queue hit the maximum limit.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_macsec.py

index 48a17e3033b7825468ade372170a055e9977edb8..aaf547ced4d42448cc03011d49cdb76499cba5c2 100644 (file)
@@ -325,6 +325,7 @@ def cleanup_macsec_br(count):
         wpas.interface_remove("veth%d" % i)
         subprocess.call(["ip", "link", "del", "veth%d" % i],
                         stderr=open('/dev/null', 'w'))
+    del wpas
     subprocess.call(["ip", "link", "set", "brveth", "down"])
     subprocess.call(["brctl", "delbr", "brveth"])
 
@@ -427,6 +428,11 @@ def run_macsec_psk_br(dev, apdev, count, mka_priority):
         else:
             logger.info("Data traffic test failed - ignore for now for >= 3 device cases")
 
+    for i in range(count):
+        wpa[i].dump_monitor()
+    for i in range(count):
+        del wpa[0]
+
 def test_macsec_psk_ns(dev, apdev, params):
     """MACsec PSK (netns)"""
     try: