vpp自动化测试报错调试
生活随笔
收集整理的这篇文章主要介绍了
vpp自动化测试报错调试
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
1)vpp 自动化测试方法
在源码目录下,执行 make test 命令可进行自动化测试,并可通过 make test-help 来查看具体的参数信息。
2)如果在执行 make test 时,vpp 报错,或者 vpp crash,导致 python 侧 IO 超时,比如:
3)此时应该通过执行 make test-shell DEBUG=gdb,进入测试框架提供的 shell 环境,如下所示:
[root@bogon vpp-18.07.1]# make test-shell DEBUG=gdb ... (virtualenv) [root@bogon test]# (virtualenv) [root@bogon test]#然后单独执行那个报错的测试用例,比如:test_acl_plugin.py:
(virtualenv) [root@bogon test]# python test_acl_plugin.py ... ------------------------------------------------------------------------------ You can debug the VPP using e.g.: gdb /root/vpp/build-root/rpmbuild/vpp-18.07.1/build-root/install-vpp-native/vpp/bin/vpp -ex 'attach 1880693' Now is the time to attach a gdb by running the above command and set up breakpoints etc. ------------------------------------------------------------------------------ Press ENTER to continue running the testcase...执行上述命令后,程序会停下来,根据上面的提示,可通过 gdb attach 来调试上述测试用例在执行过程中启动的 vpp 实例,在你认为有问题的地方打上断点,并 continue,如下所示:
[root@bogon vpp-18.07.1]# gdb /root/vpp/build-root/rpmbuild/vpp-18.07.1/build-root/install-vpp-native/vpp/bin/vpp -ex 'attach 1880693' ... Reading symbols from /root/vpp/build-root/rpmbuild/vpp-18.07.1/build-root/install-vpp-native/vpp/bin/vpp...done. Attaching to program: /root/vpp/build-root/rpmbuild/vpp-18.07.1/build-root/install-vpp-native/vpp/bin/vpp, process 2483450 [New LWP 2483451] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". 0x000000fff67d65d4 in epoll_pwait () from /lib64/libc.so.6 (gdb) b vnet_classify_new_table Breakpoint 1 at 0xfff6dcef90: file /root/vpp/build-root/rpmbuild/vpp-18.07.1/build-data/../src/vnet/classify/vnet_classify.c, line 128. (gdb) c Continuing.4)在刚才启动的测试用例中敲回车,以便让测试用例继续执行,在 gdb 中命中断点后就可以进行调试了。
You can debug the VPP using e.g.: gdb /root/vpp/build-root/rpmbuild/vpp-18.07.1/build-root/install-vpp-native/vpp/bin/vpp -ex 'attach 1880693' Now is the time to attach a gdb by running the above command and set up breakpoints etc. ------------------------------------------------------------------------------ Press ENTER to continue running the testcase... ============================================================================== ACL plugin Test Case ============================================================================== Starting ACL plugin version check; learn MACs ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ACL plugin version check; learn MACs OK ------------------------------------------------------------------------------ Starting ACL create/delete test ...总结
以上是生活随笔为你收集整理的vpp自动化测试报错调试的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Tomcat的Document base
- 下一篇: android device id修改器