]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: hostapd SIGUSR1
authorJouni Malinen <j@w1.fi>
Tue, 27 Dec 2016 12:23:46 +0000 (14:23 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 27 Dec 2016 12:23:46 +0000 (14:23 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_config.py

index 84a1e3f1c37a3424b6355c0468ee52b3bfd27c82..836fc8a671efbf5bd32d40dfeab95edafb3cd202 100644 (file)
@@ -120,6 +120,15 @@ def test_ap_config_reload_before_enable(dev, apdev, params):
     os.kill(pid, signal.SIGHUP)
     hapd.ping()
 
+def test_ap_config_sigusr1(dev, apdev, params):
+    """hostapd SIGUSR1"""
+    hapd = hostapd.add_ap(apdev[0], { "ssid": "foobar" })
+    with open(os.path.join(params['logdir'], 'hostapd-test.pid'), "r") as f:
+        pid = int(f.read())
+    os.kill(pid, signal.SIGUSR1)
+    dev[0].connect("foobar", key_mgmt="NONE", scan_freq="2412")
+    os.kill(pid, signal.SIGUSR1)
+
 def test_ap_config_invalid_value(dev, apdev, params):
     """Ignoring invalid hostapd configuration parameter updates"""
     hapd = hostapd.add_ap(apdev[0], { "ssid": "test" }, no_enable=True)