tests: eloop socket re-open from timeout/socket handler

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-07-23 18:39:02 +03:00 committed by Jouni Malinen
parent 48b06c17fa
commit 569f8f9b87
2 changed files with 258 additions and 1 deletions

View file

@ -4,12 +4,22 @@
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import os
import time
import hostapd
def test_module_wpa_supplicant(dev):
def test_module_wpa_supplicant(dev, apdev, params):
"""wpa_supplicant module tests"""
if "OK" not in dev[0].global_request("MODULE_TESTS"):
raise Exception("Module tests failed")
# allow eloop test to complete
time.sleep(0.75)
dev[0].relog()
with open(os.path.join(params['logdir'], 'log0'), 'r') as f:
res = f.read()
if "FAIL - should not have called this function" in res:
raise Exception("eloop test failed")
def test_module_hostapd(dev):
"""hostapd module tests"""