use class decorators to mark tests that shouldn't be run by default
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 8ee212b..5a3232c 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -1027,3 +1027,19 @@
finally:
sys.stdout = backup
return out
+
+def nonstandard(cls):
+ """
+ Testcase decorator that marks the test as being non-standard,
+ so it is not added to the "all" group.
+ """
+ cls.priority = -1
+ return cls
+
+def disabled(cls):
+ """
+ Testcase decorator that marks the test as being disabled,
+ so it is not added to the "all" group.
+ """
+ cls.priority = -1
+ return cls
diff --git a/tests/basic.py b/tests/basic.py
index 862b6df..6ca8b18 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -117,6 +117,7 @@
'Response packet does not match send packet' +
' for port ' + str(of_port))
+@nonstandard
class PacketInDefaultDrop(base_tests.SimpleDataPlane):
"""
Test packet in function
@@ -125,8 +126,6 @@
in message is received from the controller for each
"""
- priority = -1
-
def runTest(self):
rc = delete_all_flows(self.controller)
self.assertEqual(rc, 0, "Failed to delete all flows")
@@ -152,6 +151,7 @@
'Packet in message received on port ' +
str(of_port))
+@nonstandard
class PacketInBroadcastCheck(base_tests.SimpleDataPlane):
"""
Check if bcast pkts leak when no flows are present
@@ -161,8 +161,6 @@
Look for the packet on other dataplane ports.
"""
- priority = -1
-
def runTest(self):
# Need at least two ports
self.assertTrue(len(config["port_map"]) > 1, "Too few ports for test")
@@ -281,6 +279,7 @@
set(of_ports).difference(dp_ports),
self)
+@disabled
class FlowStatsGet(base_tests.SimpleProtocol):
"""
Get stats
@@ -288,8 +287,6 @@
Simply verify stats get transaction
"""
- priority = -1
-
def runTest(self):
logging.info("Running StatsGet")
logging.info("Inserting trial flow")
diff --git a/tests/bsn_ipmask.py b/tests/bsn_ipmask.py
index 70ca990..ccd97fb 100644
--- a/tests/bsn_ipmask.py
+++ b/tests/bsn_ipmask.py
@@ -36,13 +36,12 @@
else:
return (1 << (63 - index)) - 1
+@nonstandard
class BSNConfigIPMask(base_tests.SimpleDataPlane):
"""
Exercise BSN vendor extension for configuring IP source/dest match mask
"""
- priority = -1
-
def bsn_set_ip_mask(self, index, mask):
"""
Use the BSN_SET_IP_MASK vendor command to change the IP mask for the
diff --git a/tests/bsn_mirror.py b/tests/bsn_mirror.py
index c0ecc07..c916382 100644
--- a/tests/bsn_mirror.py
+++ b/tests/bsn_mirror.py
@@ -75,14 +75,13 @@
action_list.action_object_map[ofp.OFPAT_VENDOR] = bsn_action_mirror
+@nonstandard
class BSNMirrorAction(base_tests.SimpleDataPlane):
"""
Exercise BSN vendor extension for copying packets to a mirror destination
port
"""
- priority = -1
-
def bsn_set_mirroring(self, enabled):
"""
Use the BSN_SET_MIRRORING vendor command to enable/disable
diff --git a/tests/caps.py b/tests/caps.py
index 6c48840..b01fd48 100644
--- a/tests/caps.py
+++ b/tests/caps.py
@@ -92,7 +92,7 @@
time.sleep(flow_count / 100)
-
+@disabled
class FillTableExact(base_tests.SimpleProtocol):
"""
Fill the flow table with exact matches; can take a while
@@ -111,12 +111,11 @@
you can control which table to check.
"""
- priority = -1
-
def runTest(self):
logging.info("Running " + str(self))
flow_caps_common(self)
+@disabled
class FillTableWC(base_tests.SimpleProtocol):
"""
Fill the flow table with wildcard matches
@@ -137,8 +136,6 @@
"""
- priority = -1
-
def runTest(self):
logging.info("Running " + str(self))
flow_caps_common(self, is_exact=False)
diff --git a/tests/cxn.py b/tests/cxn.py
index 5718c66..4b3ee59 100644
--- a/tests/cxn.py
+++ b/tests/cxn.py
@@ -19,12 +19,12 @@
from oftest.testutils import *
+@disabled
class BaseHandshake(unittest.TestCase):
"""
Base handshake case to set up controller, but do not send hello.
"""
- priority = -1
controllers = []
default_timeout = 2
@@ -100,13 +100,12 @@
self.assertTrue(self.controllers[0].wait_disconnected(timeout=10),
"Not notified of controller disconnect")
+@disabled
class CompleteHandshake(BaseHandshake):
"""
Set up multiple controllers and complete handshake, but otherwise do nothing.
"""
- priority = -1
-
def buildControllerList(self):
# controller_list is a list of IP:port tuples
con_list = test_param_get('controller_list')
@@ -247,34 +246,31 @@
break
time.sleep(tick)
+@disabled
class HandshakeAndKeepalive(CompleteHandshake):
"""
Complete handshake and respond to echo request, but otherwise do nothing.
Good for manual testing.
"""
- priority = -1
-
def __init__(self):
CompleteHandshake.__init__(self, keep_alive=True)
+@disabled
class HandshakeNoEcho(CompleteHandshake):
"""
Complete handshake, but otherwise do nothing, and do not respond to echo.
"""
- priority = -1
-
def __init__(self):
CompleteHandshake.__init__(self, keep_alive=False)
+@disabled
class HandshakeAndDrop(CompleteHandshake):
"""
Complete handshake, but otherwise do nothing, and drop connection after a while.
"""
- priority = -1
-
def __init__(self):
CompleteHandshake.__init__(self, keep_alive=True, controller_timeout=10)
diff --git a/tests/flow_query.py b/tests/flow_query.py
index 13c82c3..2ff8083 100644
--- a/tests/flow_query.py
+++ b/tests/flow_query.py
@@ -1665,6 +1665,7 @@
# Disabled.
# Should be DUT dependent.
+@nonstandard
class Flow_Add_5_1(base_tests.SimpleProtocol):
"""
Test FLOW_ADD_5.1 from draft top-half test plan
@@ -1673,8 +1674,6 @@
None
"""
- priority = -1
-
def runTest(self):
logging.info("Flow_Add_5_1 TEST BEGIN")
@@ -1783,6 +1782,7 @@
# Disabled because of bogus capacity reported by OVS.
# Should be DUT dependent.
+@nonstandard
class Flow_Add_6(base_tests.SimpleProtocol):
"""
Test FLOW_ADD_6 from draft top-half test plan
@@ -1791,8 +1791,6 @@
num_flows - Number of flows to generate
"""
- priority = -1
-
def runTest(self):
logging.info("Flow_Add_6 TEST BEGIN")
diff --git a/tests/load.py b/tests/load.py
index 6c8bda4..ecd565b 100644
--- a/tests/load.py
+++ b/tests/load.py
@@ -30,6 +30,7 @@
from oftest.testutils import *
+@nonstandard
class LoadBarrier(base_tests.SimpleProtocol):
"""
Test barrier under load with loopback
@@ -44,8 +45,6 @@
the test fails.
"""
- priority = -1
-
def runTest(self):
# Set up flow to send from port 1 to port 2 and copy to CPU
# Test parameter gives LB port base (assumes consecutive)
diff --git a/tests/message_types.py b/tests/message_types.py
index 2beaaab..c13bfae 100644
--- a/tests/message_types.py
+++ b/tests/message_types.py
@@ -503,14 +503,12 @@
self.assertEqual(response.in_port,of_ports[0],"PacketIn in_port or recieved port field is incorrect")
-
+@nonstandard
class PortStatusMessage(base_tests.SimpleDataPlane):
"""Verify Port Status Messages are sent to the controller
whenever physical ports are added, modified or deleted"""
- priority = -1
-
def runTest(self):
logging.info("Running PortStatusMessage Test")
diff --git a/tests/nicira_role.py b/tests/nicira_role.py
index a8ac8cf..fa4cc97 100644
--- a/tests/nicira_role.py
+++ b/tests/nicira_role.py
@@ -19,13 +19,12 @@
NXT_ROLE_VALUE = dict( other=0, slave=1, master=2 )
+@nonstandard
class NiciraRoleRequest(base_tests.SimpleDataPlane):
"""
Exercise Nicira vendor extension for requesting HA roles
"""
- priority = 0
-
def nicira_role_request(self, role):
"""
Use the BSN_SET_IP_MASK vendor command to change the IP mask for the
diff --git a/tests/pktact.py b/tests/pktact.py
index dff4420..0b04c56 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -960,13 +960,12 @@
vid = test_param_get('vid', default=TEST_VID_DEFAULT)
flow_match_test(self, config["port_map"], dl_vlan=vid)
+@disabled
class ExactMatchTaggedMany(BaseMatchCase):
"""
ExactMatchTagged with many VLANS
"""
- priority = -1
-
def runTest(self):
for vid in range(2,100,10):
flow_match_test(self, config["port_map"], dl_vlan=vid, max_test=5)
@@ -1293,13 +1292,12 @@
flow_match_test(self, config["port_map"], pkt=pkt,
exp_pkt=exp_pkt, action_list=[vid_act])
+@disabled
class PacketOnly(base_tests.DataPlaneOnly):
"""
Just send a packet thru the switch
"""
- priority = -1
-
def runTest(self):
pkt = simple_tcp_packet()
of_ports = config["port_map"].keys()
@@ -1309,13 +1307,12 @@
logging.debug("Data: " + str(pkt).encode('hex'))
self.dataplane.send(ing_port, str(pkt))
+@disabled
class PacketOnlyTagged(base_tests.DataPlaneOnly):
"""
Just send a packet thru the switch
"""
- priority = -1
-
def runTest(self):
vid = test_param_get('vid', default=TEST_VID_DEFAULT)
pkt = simple_tcp_packet(dl_vlan_enable=True, dl_vlan=vid)
@@ -1867,6 +1864,7 @@
ModifyL2SrcDstMC
]
+@disabled
class IterCases(BaseMatchCase):
"""
Iterate over a bunch of test cases
@@ -1874,8 +1872,6 @@
The cases come from the list above
"""
- priority = -1
-
def runTest(self):
count = test_param_get('iter_count', default=10)
tests_done = 0
@@ -1911,6 +1907,7 @@
# and modifies tag 4 to tag 5. Then verify (in addition) that
# tag 6 does not get modified.
+@disabled
class MixedVLAN(BaseMatchCase):
"""
Test mixture of VLAN tag actions
@@ -1934,8 +1931,6 @@
If only VID 5 distinguishes pkt, this will fail on some platforms
"""
- priority = -1
-
class MatchEach(base_tests.SimpleDataPlane):
"""
Check that each match field is actually matched on.