aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-06-15 18:17:57 (GMT)
committerJouni Malinen <j@w1.fi>2017-06-17 15:04:32 (GMT)
commit5b52e1adc217ac0236a2d3ab59d1bfe999b3d565 (patch)
tree27766bfd53c49da3f8a6e434daf738fea73e602a /tests
parent0ffdc8b196a074f6bdbd6f4bbe8a170b45932985 (diff)
downloadhostap-5b52e1adc217ac0236a2d3ab59d1bfe999b3d565.zip
hostap-5b52e1adc217ac0236a2d3ab59d1bfe999b3d565.tar.gz
hostap-5b52e1adc217ac0236a2d3ab59d1bfe999b3d565.tar.bz2
tests: Update base64 OOM test cases to match implementation changes
Introduction of the new base64 helper function changed the backtraces for these OOM test cases and resulted in test failures. Update the test scripts to work with the new implementation. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_wps.py14
-rw-r--r--tests/hwsim/test_tnc.py3
2 files changed, 11 insertions, 6 deletions
diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py
index 35ee3b4..58baec9 100644
--- a/tests/hwsim/test_ap_wps.py
+++ b/tests/hwsim/test_ap_wps.py
@@ -3202,7 +3202,8 @@ def test_ap_wps_upnp_subscribe(dev, apdev):
dev[1].request("WPS_CANCEL")
time.sleep(0.1)
- with alloc_fail(hapd, 1, "base64_encode;upnp_wps_device_send_wlan_event"):
+ with alloc_fail(hapd, 1,
+ "base64_gen_encode;?base64_encode;upnp_wps_device_send_wlan_event"):
dev[1].dump_monitor()
dev[1].request("WPS_PIN " + apdev[0]['bssid'] + " 12345670")
dev[1].wait_event(["CTRL-EVENT-SCAN-RESULTS"], 5)
@@ -3736,7 +3737,7 @@ def test_ap_wps_init_oom(dev, apdev):
params = { "ssid": ssid, "eap_server": "1", "wps_state": "1" }
hapd = hostapd.add_ap(apdev[0], params)
- with alloc_fail(hapd, 1, "base64_encode;wps_build_cred"):
+ with alloc_fail(hapd, 1, "base64_gen_encode;?base64_encode;wps_build_cred"):
pin = dev[0].wps_read_pin()
hapd.request("WPS_PIN any " + pin)
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
@@ -3773,7 +3774,8 @@ def _test_ap_wps_er_oom(dev, apdev):
dev[0].connect(ssid, psk="12345678", scan_freq="2412")
- with alloc_fail(dev[0], 1, "base64_decode;xml_get_base64_item"):
+ with alloc_fail(dev[0], 1,
+ "base64_gen_decode;?base64_decode;xml_get_base64_item"):
dev[0].request("WPS_ER_START ifname=lo")
ev = dev[0].wait_event(["WPS-ER-AP-ADD"], timeout=3)
if ev is not None:
@@ -3786,7 +3788,8 @@ def _test_ap_wps_er_oom(dev, apdev):
raise Exception("AP discovery timed out")
dev[1].scan_for_bss(apdev[0]['bssid'], freq=2412)
- with alloc_fail(dev[0], 1, "base64_decode;xml_get_base64_item"):
+ with alloc_fail(dev[0], 1,
+ "base64_gen_decode;?base64_decode;xml_get_base64_item"):
dev[1].request("WPS_PBC " + apdev[0]['bssid'])
ev = dev[1].wait_event(["CTRL-EVENT-SCAN-RESULTS"], timeout=10)
if ev is None:
@@ -4593,7 +4596,8 @@ RGV2aWNlIEEQSQAGADcqAAEg
if ev is None:
raise Exception("Enrollee add event not seen")
- with alloc_fail(dev[0], 1, "base64_encode;wps_er_soap_hdr"):
+ with alloc_fail(dev[0], 1,
+ "base64_gen_encode;?base64_encode;wps_er_soap_hdr"):
send_wlanevent(url, uuid, data)
with alloc_fail(dev[0], 1, "wpabuf_alloc;wps_er_soap_hdr"):
diff --git a/tests/hwsim/test_tnc.py b/tests/hwsim/test_tnc.py
index 84ff453..c26f8a0 100644
--- a/tests/hwsim/test_tnc.py
+++ b/tests/hwsim/test_tnc.py
@@ -146,7 +146,8 @@ def test_tnc_ttls_errors(dev, apdev):
(1, "os_readfile;tncc_read_config", "pap user", "auth=PAP"),
(1, "tncc_init", "pap user", "auth=PAP"),
(1, "TNC_TNCC_ReportMessageTypes", "pap user", "auth=PAP"),
- (1, "base64_encode;TNC_TNCC_SendMessage", "pap user", "auth=PAP"),
+ (1, "base64_gen_encode;?base64_encode;TNC_TNCC_SendMessage",
+ "pap user", "auth=PAP"),
(1, "=TNC_TNCC_SendMessage", "pap user", "auth=PAP"),
(1, "tncc_get_base64;tncc_process_if_tnccs",
"pap user", "auth=PAP") ]