]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Do not fail if driver supports power saving
authorJouni Malinen <jouni@codeaurora.org>
Fri, 4 May 2018 20:56:32 +0000 (23:56 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 4 May 2018 20:56:32 +0000 (23:56 +0300)
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>
tests/hwsim/test_p2p_set.py
tests/hwsim/test_wpas_ctrl.py

index a96b572899e7e16fc7122f01392e6ab2f46eb5f2..0bdc859b1cc592c46377697fcef17d0c68f03fcd 100644 (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"""
index 15928f5e399a4ea16272bce6ee160cd8e3844886..f8b501a1f501c8e583df208bba9c33c16072a609 100644 (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",