summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/framework.py3
-rw-r--r--test/test_bihash.py40
2 files changed, 42 insertions, 1 deletions
diff --git a/test/framework.py b/test/framework.py
index d0191c0dd45..4f7c76a6939 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -246,7 +246,8 @@ class VppTestCase(unittest.TestCase):
coredump_size, "}", "api-trace", "{", "on", "}",
"api-segment", "{", "prefix", cls.shm_prefix, "}",
"plugins", "{", "plugin", "dpdk_plugin.so", "{",
- "disable", "}", "}", ]
+ "disable", "}", "plugin", "unittest_plugin.so",
+ "{", "enable", "}", "}", ]
if plugin_path is not None:
cls.vpp_cmdline.extend(["plugin_path", plugin_path])
cls.logger.info("vpp_cmdline: %s" % cls.vpp_cmdline)
diff --git a/test/test_bihash.py b/test/test_bihash.py
new file mode 100644
index 00000000000..a5cf065735f
--- /dev/null
+++ b/test/test_bihash.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+import unittest
+
+from framework import VppTestCase, VppTestRunner
+from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
+
+
+class TestTCP(VppTestCase):
+ """ Bihash Test Cases """
+
+ @classmethod
+ def setUpClass(cls):
+ super(TestTCP, cls).setUpClass()
+
+ def setUp(self):
+ super(TestTCP, self).setUp()
+
+ def tearDown(self):
+ super(TestTCP, self).tearDown()
+
+ def test_bihash_unittest(self):
+ """ Bihash Add/Del Test """
+ error = self.vapi.cli("test bihash ")
+
+ if error:
+ self.logger.critical(error)
+ self.assertEqual(error.find("failed"), -1)
+
+ def test_bihash_thread(self):
+ """ Bihash Thread Test """
+
+ error = self.vapi.cli("test bihash threads 2 nbuckets 64000")
+
+ if error:
+ self.logger.critical(error)
+ self.assertEqual(error.find("failed"), -1)
+
+if __name__ == '__main__':
+ unittest.main(testRunner=VppTestRunner)