rdma: support non-power-of-2 number of rxq
[vpp.git] / test / test_session.py
index f1a3dcd..8e03968 100644 (file)
@@ -1,11 +1,14 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import unittest
 
+from framework import tag_fixme_vpp_workers
 from framework import VppTestCase, VppTestRunner
+from framework import tag_run_solo
 from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
 
 
+@tag_fixme_vpp_workers
 class TestSession(VppTestCase):
     """ Session Test Case """
 
@@ -20,7 +23,7 @@ class TestSession(VppTestCase):
     def setUp(self):
         super(TestSession, self).setUp()
 
-        self.vapi.session_enable_disable(is_enabled=1)
+        self.vapi.session_enable_disable(is_enable=1)
         self.create_loopback_interfaces(2)
 
         table_id = 0
@@ -37,9 +40,9 @@ class TestSession(VppTestCase):
             table_id += 1
 
         # Configure namespaces
-        self.vapi.app_namespace_add_del(namespace_id=b"0",
+        self.vapi.app_namespace_add_del(namespace_id="0",
                                         sw_if_index=self.loop0.sw_if_index)
-        self.vapi.app_namespace_add_del(namespace_id=b"1",
+        self.vapi.app_namespace_add_del(namespace_id="1",
                                         sw_if_index=self.loop1.sw_if_index)
 
     def tearDown(self):
@@ -49,7 +52,7 @@ class TestSession(VppTestCase):
             i.admin_down()
 
         super(TestSession, self).tearDown()
-        self.vapi.session_enable_disable(is_enabled=1)
+        self.vapi.session_enable_disable(is_enable=1)
 
     def test_segment_manager_alloc(self):
         """ Session Segment Manager Multiple Segment Allocation """
@@ -89,6 +92,7 @@ class TestSession(VppTestCase):
         ip_t10.remove_vpp_config()
 
 
+@tag_fixme_vpp_workers
 class TestSessionUnitTests(VppTestCase):
     """ Session Unit Tests Case """
 
@@ -102,7 +106,7 @@ class TestSessionUnitTests(VppTestCase):
 
     def setUp(self):
         super(TestSessionUnitTests, self).setUp()
-        self.vapi.session_enable_disable(is_enabled=1)
+        self.vapi.session_enable_disable(is_enable=1)
 
     def test_session(self):
         """ Session Unit Tests """
@@ -114,7 +118,34 @@ class TestSessionUnitTests(VppTestCase):
 
     def tearDown(self):
         super(TestSessionUnitTests, self).tearDown()
-        self.vapi.session_enable_disable(is_enabled=0)
+        self.vapi.session_enable_disable(is_enable=0)
+
+
+@tag_run_solo
+class TestSvmFifoUnitTests(VppTestCase):
+    """ SVM Fifo Unit Tests Case """
+
+    @classmethod
+    def setUpClass(cls):
+        super(TestSvmFifoUnitTests, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSvmFifoUnitTests, cls).tearDownClass()
+
+    def setUp(self):
+        super(TestSvmFifoUnitTests, self).setUp()
+
+    def test_svm_fifo(self):
+        """ SVM Fifo Unit Tests """
+        error = self.vapi.cli("test svm fifo all")
+
+        if error:
+            self.logger.critical(error)
+        self.assertNotIn("failed", error)
+
+    def tearDown(self):
+        super(TestSvmFifoUnitTests, self).tearDown()
 
 if __name__ == '__main__':
     unittest.main(testRunner=VppTestRunner)