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修改器