Valgrind自动测试-是否在某处使用? [英] Valgrind automatic tests -- are they used somewhere?

查看:80
本文介绍了Valgrind自动测试-是否在某处使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您认为基于valgrind工具套件运行一组自动测试是否有意义?您是否听说过或看到了这样的设置?这样的设置可以执行哪些自动操作(不受人的直觉)?

Do you think that running set of automatic tests based on valgrind's tool suite makes sense? Did you hear about or see such setup in action? What automatic (free from human intuition) actions could such setup perform?

推荐答案

如果您要检查内存问题,这将很有意义。 /错误的代码,作为单元测试或最终构建测试的一部分。可能有两种方法:

This would make sense if you were checking for memory problems / bad code as part of unit testing or final build testing. There may be two approaches:


  1. 编写测试工具,该工具将通过其库使用 valgrind的API 创建一个替换valgrind可执行文件的自定义前端(似乎让人头疼)

  2. Valgrind也可以输出用于memcheck的XML(--xml = yes选项)

  3. 使用期望 http://en.wikipedia.org/wiki/期望自动执行您的命令行valgrind操作并检查输出

  4. 编写运行valgrind并grep输出的shell脚本

  5. 也许将此功能添加到 DejaGNU 之类的东西中,该东西使用Expect和tcl

  1. writing a test tool that will use valgrind's API through its library, pretty much creating a custom front-end replacing the valgrind executable (seems like a headache)
  2. Valgrind can also output XML for memcheck ( the --xml=yes option)
  3. Use Expect http://en.wikipedia.org/wiki/Expect to automate your commandline valgrind actions and inspect the output
  4. Write shell scripts that run valgrind and grep the output
  5. Maybe look into adding this functionality to something like DejaGNU which uses expect and tcl

也许这些工具可以自动创建错误项

Maybe these tools could automatically create bug items in your tracker (although it might fill up quickly).

我自己没有看到任何东西,但是作为valgrind用户,它会很方便。如果您创建了很棒的东西,则可以将其作为一个开源项目启动!

Not seen anything myself, but as a valgrind user, it would be handy. If you create something cool, maybe launch it as an open-source project!

编辑
http://www.redhat.com /f/summitfiles/presentation/June2/Developer%20Tools/Cox,Malcom_Automated%20Testing.pdf

其中似乎涵盖了使用DejaGNU和Valgrind作为自动测试我在上面建议

Which seems to cover automated testing using DejaGNU and Valgrind as I suggested above

祝你好运!

这篇关于Valgrind自动测试-是否在某处使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆