tests: Allow DFS test cases to be skipped
authorJouni Malinen <j@w1.fi>
Thu, 25 Dec 2014 13:30:42 +0000 (15:30 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 29 Dec 2014 13:49:05 +0000 (15:49 +0200)
Some of the newer dfs_radar* test cases did not allow hostapd
startup to fail. Since these require relatively recent kernel
support, mark the test cases with skip rather than fail based
on that step failing.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_dfs.py

index 84c2815..08ded31 100644 (file)
@@ -140,7 +140,7 @@ def test_dfs_radar(dev, apdev):
     """DFS CAC functionality with radar detected"""
     try:
         hapd2 = None
-        hapd = start_dfs_ap(apdev[0])
+        hapd = start_dfs_ap(apdev[0], allow_failure=True)
         if hapd is None:
             if not os.path.exists("dfs"):
                 return "skip"
@@ -230,7 +230,7 @@ def test_dfs_radar_on_non_dfs_channel(dev, apdev):
 def test_dfs_radar_chanlist(dev, apdev):
     """DFS chanlist when radar is detected"""
     try:
-        hapd = start_dfs_ap(apdev[0], chanlist="40 44")
+        hapd = start_dfs_ap(apdev[0], chanlist="40 44", allow_failure=True)
         if hapd is None:
             if not os.path.exists("dfs"):
                 return "skip"
@@ -267,7 +267,8 @@ def test_dfs_radar_chanlist(dev, apdev):
 def test_dfs_radar_chanlist_vht80(dev, apdev):
     """DFS chanlist when radar is detected and VHT80 configured"""
     try:
-        hapd = start_dfs_ap(apdev[0], chanlist="36", ht40=True, vht80=True)
+        hapd = start_dfs_ap(apdev[0], chanlist="36", ht40=True, vht80=True,
+                            allow_failure=True)
         if hapd is None:
             if not os.path.exists("dfs"):
                 return "skip"
@@ -307,7 +308,8 @@ def test_dfs_radar_chanlist_vht80(dev, apdev):
 def test_dfs_radar_chanlist_vht20(dev, apdev):
     """DFS chanlist when radar is detected and VHT40 configured"""
     try:
-        hapd = start_dfs_ap(apdev[0], chanlist="36", vht20=True)
+        hapd = start_dfs_ap(apdev[0], chanlist="36", vht20=True,
+                            allow_failure=True)
         if hapd is None:
             if not os.path.exists("dfs"):
                 return "skip"
@@ -344,7 +346,8 @@ def test_dfs_radar_chanlist_vht20(dev, apdev):
 def test_dfs_radar_no_ht(dev, apdev):
     """DFS chanlist when radar is detected and no HT configured"""
     try:
-        hapd = start_dfs_ap(apdev[0], chanlist="36", ht=False)
+        hapd = start_dfs_ap(apdev[0], chanlist="36", ht=False,
+                            allow_failure=True)
         if hapd is None:
             if not os.path.exists("dfs"):
                 return "skip"
@@ -381,7 +384,8 @@ def test_dfs_radar_no_ht(dev, apdev):
 def test_dfs_radar_ht40minus(dev, apdev):
     """DFS chanlist when radar is detected and HT40- configured"""
     try:
-        hapd = start_dfs_ap(apdev[0], chanlist="36", ht40minus=True)
+        hapd = start_dfs_ap(apdev[0], chanlist="36", ht40minus=True,
+                            allow_failure=True)
         if hapd is None:
             if not os.path.exists("dfs"):
                 return "skip"