]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Run test cases that read process memory in the beginning
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 17 Dec 2024 18:02:03 +0000 (20:02 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 17 Dec 2024 18:04:23 +0000 (20:04 +0200)
Those test cases seem to have some resource issues (i.e., taking
unexpectedly large amount of memory) with newer software versions
(showed up when upgrading from Ubuntu 22.04 to 24.04; maybe due to newer
python3 version?). This might be related to memory fragmentation and
allocated memory from hostapd/wpa_supplicant not getting fully freed in
a sense of minimizing the read process memory. Running the key lifetime
test cases in the beginning of each VM seems to avoid resource issues,
so reorder the test cases to do that.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/vm/parallel-vm.py

index 1ce25b177420933c0f7f1bd733a0329da115b591..1d3871264a70d2ee5ea41514ab0ae4b90cf5ef89 100755 (executable)
@@ -86,6 +86,21 @@ long_tests = ["ap_roam_open",
               "p2p_go_move_scm_peer_does_not_support",
               "p2p_go_move_scm_multi"]
 
+# Test cases that depend on dumping full process memory
+memory_read_tests = ["ap_wpa2_eap_fast_pac_lifetime",
+                     "wpa2_eap_ttls_pap_key_lifetime_in_memory",
+                     "wpa2_eap_peap_gtc_key_lifetime_in_memory",
+                     "ft_psk_key_lifetime_in_memory",
+                     "wpa2_psk_key_lifetime_in_memory",
+                     "ap_wpa2_tdls_long_lifetime",
+                     "ap_wpa2_tdls_wrong_lifetime_resp",
+                     "erp_key_lifetime_in_memory",
+                     "sae_key_lifetime_in_memory",
+                     "sae_okc_pmk_lifetime",
+                     "sae_pmk_lifetime",
+                     "wpas_ap_lifetime_in_memory",
+                     "wpas_ap_lifetime_in_memory2"]
+
 def get_failed(vm):
     failed = []
     for i in range(num_servers):
@@ -504,6 +519,15 @@ def main():
             if l in tests:
                 tests.remove(l)
                 tests.insert(0, l)
+
+        # Test cases that read full wpa_supplicant or hostapd process memory
+        # can apparently cause resources issues at least with newer python3
+        # versions, so run them first before possible memory fragmentation has
+        # made this need more resources.
+        for l in memory_read_tests:
+            if l in tests:
+                tests.remove(l)
+                tests.insert(0, l)
     if args.short:
         tests = [t for t in tests if t not in long_tests]