tests: Do not fail if driver supports power saving

Couple of "invalid value" tests started to fail now that mac80211_hwsim
actually accepts power save configuration. Fix these by running the same
command for more code coverage, but in a way that ignores the result of
the operation (succeeds with older kernel versions and fails with
newer).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2018-05-04 23:56:32 +03:00 committed by Jouni Malinen
parent 60a5737e8f
commit 23c024b9c1
2 changed files with 7 additions and 2 deletions

View File

@ -19,7 +19,6 @@ def test_p2p_set(dev):
"noa 0,0,-1",
"noa 0,0,1",
"noa 255,10,20",
"ps 1",
"ps 2",
"oppps 1",
"ctwindow 1",
@ -36,6 +35,9 @@ def test_p2p_set(dev):
"ssid_postfix 123456789012345678901234" ]:
if "FAIL" not in dev[0].request("P2P_SET " + cmd):
raise Exception("Invalid P2P_SET accepted: " + cmd)
dev[0].request("P2P_SET ps 1")
if "OK" not in dev[0].request("P2P_SET ps 0"):
raise Exception("P2P_SET ps 0 failed unexpectedly")
def test_p2p_set_discoverability(dev):
"""P2P_SET discoverability"""

View File

@ -922,7 +922,6 @@ def test_wpas_ctrl_set(dev):
"ampdu 0",
"radio_disable 0",
"ps 10",
"ps 1",
"dot11RSNAConfigPMKLifetime 0",
"dot11RSNAConfigPMKReauthThreshold 101",
"dot11RSNAConfigSATimeout 0",
@ -934,6 +933,10 @@ def test_wpas_ctrl_set(dev):
if "FAIL" not in dev[0].request("SET " + val):
raise Exception("Unexpected SET success for " + val)
vals = [ "ps 1" ]
for val in vals:
dev[0].request("SET " + val)
vals = [ "EAPOL::heldPeriod 60",
"EAPOL::authPeriod 30",
"EAPOL::startPeriod 30",