diff options
Diffstat (limited to 'test/test_vlib.py')
-rw-r--r-- | test/test_vlib.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/test_vlib.py b/test/test_vlib.py index 20b60be7d0c..36a4340fa57 100644 --- a/test/test_vlib.py +++ b/test/test_vlib.py @@ -110,5 +110,34 @@ class TestVlib(VppTestCase): else: self.logger.info(cmd + " FAIL retval " + str(r.retval)) + def test_vlib_buffer_c_unittest(self): + """ Vlib buffer.c Code Coverage Test """ + + cmds = ["loopback create", + "packet-generator new {\n" + " name vlib\n" + " limit 15\n" + " size 128-128\n" + " interface loop0\n" + " node ethernet-input\n" + " data {\n" + " IP6: 00:d0:2d:5e:86:85 -> 00:0d:ea:d0:00:00\n" + " ICMP: db00::1 -> db00::2\n" + " incrementing 30\n" + " }\n", + "}\n", + "pa en", + "test vlib", + "show buffers", + ] + + 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) |