Parcourir la source

tests: IBSS RSN OOM during wpa_init

This is a regression test for a segfault that was fixed in the previous
commit.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen il y a 9 ans
Parent
commit
8aab52461d
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      tests/hwsim/test_ibss.py

+ 9 - 0
tests/hwsim/test_ibss.py

@@ -11,6 +11,7 @@ import re
 import subprocess
 
 import hwsim_utils
+from utils import alloc_fail
 
 def connect_ibss_cmd(dev, id, freq=2412):
     dev.dump_monitor()
@@ -386,3 +387,11 @@ def _test_ibss_5ghz(dev):
     dev[1].request("DISCONNECT")
     dev[0].dump_monitor()
     dev[1].dump_monitor()
+
+def test_ibss_rsn_oom(dev):
+    """IBSS RSN OOM during wpa_init"""
+    with alloc_fail(dev[0], 1, "wpa_init"):
+        ssid="ibss-rsn"
+        id = add_ibss_rsn(dev[0], ssid)
+        connect_ibss_cmd(dev[0], id)
+        bssid0 = wait_ibss_connection(dev[0])