From: Benjamin Berg Date: Fri, 14 Jun 2024 08:13:51 +0000 (+0200) Subject: tests: Ignore large memory blocks when searching for keys X-Git-Tag: hostap_2_11~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f3fe956d8d0207fea09cf3b39d06d29ae20c913;p=thirdparty%2Fhostap.git tests: Ignore large memory blocks when searching for keys wpa_supplicant will generally never allocate a memory block of that size. We can therefore assume that it belongs to ASAN and we need to ignore it. Signed-off-by: Benjamin Berg --- diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 085619f0d..96550930d 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -2658,6 +2658,11 @@ def read_process_memory(pid, key=None): for name in ["[heap]", "[stack]"]: if name in l: logger.info("%s 0x%x-0x%x is at %d-%d" % (name, start, end, len(buf), len(buf) + (end - start))) + + if end - start >= 256 * 1024 * 1024: + logger.info("Large memory block of >= 256MiB, assuming ASAN shadow memory") + continue + try: mem.seek(start) data = mem.read(end - start)