dpdk: add qat gen4-b device support
[vpp.git] / test / test_session.py
index afea5f6..6c48e54 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 """
 
@@ -13,10 +16,14 @@ class TestSession(VppTestCase):
     def setUpClass(cls):
         super(TestSession, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSession, cls).tearDownClass()
+
     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
@@ -45,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 """
@@ -85,12 +92,21 @@ class TestSession(VppTestCase):
         ip_t10.remove_vpp_config()
 
 
+@tag_fixme_vpp_workers
 class TestSessionUnitTests(VppTestCase):
     """ Session Unit Tests Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestSessionUnitTests, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSessionUnitTests, cls).tearDownClass()
+
     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 """
@@ -102,7 +118,61 @@ 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 TestSegmentManagerTests(VppTestCase):
+    """ SVM Fifo Unit Tests Case """
+
+    @classmethod
+    def setUpClass(cls):
+        super(TestSegmentManagerTests, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSegmentManagerTests, cls).tearDownClass()
+
+    def setUp(self):
+        super(TestSegmentManagerTests, self).setUp()
+
+    def test_segment_manager(self):
+        """ Segment manager Tests """
+        error = self.vapi.cli("test segment-manager all")
+
+        if error:
+            self.logger.critical(error)
+        self.assertNotIn("failed", error)
+
+    def tearDown(self):
+        super(TestSegmentManagerTests, self).tearDown()
+
+
+@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)