From fe5400dda26c92ca05356eff4d0f91213d2ef362 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 25 Feb 2019 21:40:23 +0200 Subject: [PATCH] tests: Make MACsec test cases clear monitor socket more thoroughly 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 --- tests/hwsim/test_macsec.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hwsim/test_macsec.py b/tests/hwsim/test_macsec.py index 48a17e303..aaf547ced 100644 --- a/tests/hwsim/test_macsec.py +++ b/tests/hwsim/test_macsec.py @@ -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: