tests: WNM Sleep Mode - open (fail)
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0c52ad116d
commit
554a59bc6d
1 changed files with 12 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
# WNM tests
|
# WNM tests
|
||||||
# Copyright (c) 2013-2014, Jouni Malinen <j@w1.fi>
|
# Copyright (c) 2013-2017, Jouni Malinen <j@w1.fi>
|
||||||
#
|
#
|
||||||
# This software may be distributed under the terms of the BSD license.
|
# This software may be distributed under the terms of the BSD license.
|
||||||
# See README for more details.
|
# See README for more details.
|
||||||
|
@ -14,7 +14,7 @@ import subprocess
|
||||||
|
|
||||||
import hostapd
|
import hostapd
|
||||||
from wpasupplicant import WpaSupplicant
|
from wpasupplicant import WpaSupplicant
|
||||||
from utils import alloc_fail, wait_fail_trigger
|
from utils import alloc_fail, fail_test, wait_fail_trigger
|
||||||
from wlantest import Wlantest
|
from wlantest import Wlantest
|
||||||
|
|
||||||
@remote_compatible
|
@remote_compatible
|
||||||
|
@ -187,6 +187,16 @@ def test_wnm_sleep_mode_open(dev, apdev):
|
||||||
if "FAIL" not in dev[0].request("WNM_SLEEP " + cmd):
|
if "FAIL" not in dev[0].request("WNM_SLEEP " + cmd):
|
||||||
raise Exception("Invalid WNM_SLEEP accepted")
|
raise Exception("Invalid WNM_SLEEP accepted")
|
||||||
|
|
||||||
|
def test_wnm_sleep_mode_open_fail(dev, apdev):
|
||||||
|
"""WNM Sleep Mode - open (fail)"""
|
||||||
|
params = { "ssid": "test-wnm", "wnm_sleep_mode": "1" }
|
||||||
|
hapd = hostapd.add_ap(apdev[0], params)
|
||||||
|
|
||||||
|
dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
|
||||||
|
with fail_test(hapd, 1, "nl80211_send_frame_cmd;ieee802_11_send_wnmsleep_resp"):
|
||||||
|
dev[0].request("WNM_SLEEP enter")
|
||||||
|
wait_fail_trigger(hapd, "GET_FAIL")
|
||||||
|
|
||||||
@remote_compatible
|
@remote_compatible
|
||||||
def test_wnm_sleep_mode_rsn(dev, apdev):
|
def test_wnm_sleep_mode_rsn(dev, apdev):
|
||||||
"""WNM Sleep Mode - RSN"""
|
"""WNM Sleep Mode - RSN"""
|
||||||
|
|
Loading…
Reference in a new issue