aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-11-19 10:36:41 -0500
committerDamjan Marion <dmarion@me.com>2019-11-20 17:38:49 +0000
commite51a9bbe7693294e2e1021f13697fa97b02a89fb (patch)
tree6c5411e70a534533d4370c0662f17b3d7cef828b /test
parenta548d134ae53c52de17fb02c8c925153cbd0fdf5 (diff)
vlib: improve code coverage, part deux
Type: test Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: If31f4b50da7a6e4a9704ceb3415c582143c08355
Diffstat (limited to 'test')
-rw-r--r--test/test_vlib.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_vlib.py b/test/test_vlib.py
index 36a4340fa57..85b561db471 100644
--- a/test/test_vlib.py
+++ b/test/test_vlib.py
@@ -127,6 +127,7 @@ class TestVlib(VppTestCase):
" }\n",
"}\n",
"pa en",
+ "clear interfaces",
"test vlib",
"show buffers",
]
@@ -139,5 +140,22 @@ class TestVlib(VppTestCase):
else:
self.logger.info(cmd + " FAIL retval " + str(r.retval))
+ def test_vlib_format_unittest(self):
+ """ Vlib format.c Code Coverage Test """
+
+ cmds = ["loopback create",
+ "classify filter pcap mask l2 proto ipv6 match l2 proto 86dd",
+ "classify filter del",
+ "test format-vlib",
+ ]
+
+ for cmd in cmds:
+ r = self.vapi.cli_return_response(cmd)
+ if r.retval != 0:
+ if hasattr(r, 'reply'):
+ self.logger.info(cmd + " FAIL reply " + r.reply)
+ else:
+ self.logger.info(cmd + " FAIL retval " + str(r.retval))
+
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)