tests: tag the tests that do not work with multi-worker configuration
[vpp.git] / src / plugins / flowprobe / test / test_flowprobe.py
index 70b3acb..517729d 100644 (file)
@@ -12,7 +12,9 @@ from scapy.layers.l2 import Ether
 from scapy.layers.inet import IP, TCP, UDP
 from scapy.layers.inet6 import IPv6
 
+from framework import tag_fixme_vpp_workers
 from framework import VppTestCase, VppTestRunner, running_extended_tests
+from framework import tag_run_solo
 from vpp_object import VppObject
 from vpp_pg_interface import CaptureTimeoutError
 from util import ppp
@@ -20,6 +22,7 @@ from ipfix import IPFIX, Set, Template, Data, IPFIXDecoder
 from vpp_ip_route import VppIpRoute, VppRoutePath
 from vpp_papi.macaddress import mac_ntop
 from socket import inet_ntop
+from vpp_papi import VppEnum
 
 
 class VppCFLOW(VppObject):
@@ -42,10 +45,20 @@ class VppCFLOW(VppObject):
 
     def add_vpp_config(self):
         self.enable_exporter()
+        l2_flag = 0
+        l3_flag = 0
+        l4_flag = 0
+        if 'l2' in self._collect.lower():
+            l2_flag = (VppEnum.vl_api_flowprobe_record_flags_t.
+                       FLOWPROBE_RECORD_FLAG_L2)
+        if 'l3' in self._collect.lower():
+            l3_flag = (VppEnum.vl_api_flowprobe_record_flags_t.
+                       FLOWPROBE_RECORD_FLAG_L3)
+        if 'l4' in self._collect.lower():
+            l4_flag = (VppEnum.vl_api_flowprobe_record_flags_t.
+                       FLOWPROBE_RECORD_FLAG_L4)
         self._test.vapi.flowprobe_params(
-            record_l2=1 if 'l2' in self._collect.lower() else 0,
-            record_l3=1 if 'l3' in self._collect.lower() else 0,
-            record_l4=1 if 'l4' in self._collect.lower() else 0,
+            record_flags=(l2_flag | l3_flag | l4_flag),
             active_timer=self._active, passive_timer=self._passive)
         self.enable_flowprobe_feature()
         self._test.vapi.cli("ipfix flush")
@@ -332,6 +345,8 @@ class MethodHolder(VppTestCase):
         return p
 
 
+@tag_run_solo
+@tag_fixme_vpp_workers
 class Flowprobe(MethodHolder):
     """Template verification, timer tests"""
 
@@ -470,6 +485,7 @@ class Flowprobe(MethodHolder):
         self.logger.info("FFP_TEST_FINISH_0000")
 
 
+@tag_fixme_vpp_workers
 class Datapath(MethodHolder):
     """collect information on Ethernet, IP4 and IP6 datapath (no timers)"""