php / php/php-src

run-tests.php: Add a flag similar to --asan that skips tests when run under Valgrind

未关闭
#14,805 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Category: Tests Feature
主要语言
C
星标
40.4k
派生
8.1k
平均合并
2 天 13 小时
30 天内合并 PR
96

描述

Description

I just ran 11k tests under Valgrind to try and find issues with one of my big PRs, and any test excepting an OOM failure will either time out or use all the memory before being killed.

It would be great if those could be skipped and not accidentally triggered.

Some relevant tests:

  • ext/standard/tests/gh14643_longname.phpt
  • Zend/tests/bug79836_4.phpt
  • tests/basic/bug67198.phpt (maybe)
  • tests/basic/enable_post_data_reading_05.phpt (maybe)

Other tests are those opening PHP procs and timing out:

  • ext/standard/tests/file/proc_open01.phpt
  • ext/standard/tests/http/gh11274.phpt
  • ext/standard/tests/streams/bug64433.phpt
  • ext/standard/tests/url/get_headers_error_003.phpt

And some tests seem to be bogus with Valgrind or an issue that we cannot fix:

  • ext/standard/tests/mail/mail_basic2.phpt
  • ext/standard/tests/mail/mail_variation2.phpt

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先在 run-tests.php 中阅读现有 --asan 标志的解析和应用方式。然后在 Valgrind 下运行列出的 .phpt 测试,以确认存在问题的情况,接着验证新的 Valgrind 相关标志会跳过预期的测试,且不会影响正常的测试运行。

由索引模型根据 Issue 内容生成。

评估

技术栈
php
领域
testing-qa
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
50/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。