Annotate test cases which are timing sensitive
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- PR 合并指标
- PR 指标待抓取
描述
Feature or enhancement
Proposal:
Many tests in the cpython test suite are sensitive to timing and assume an entirely unloaded system. For example, the TimerfdTests check for 1ms accuracy in expected durations. Some people (eg people building and testing python) may be running the test suite on build machines which are potentially heavily loaded so this sort of expectation isn't feasible.
It seems like a good solution to this would be to annotate the tests which are timing sensitive in some way, so they can be skipped easily.
For reference, we're manually patching python to skip tests which are failing under load but we're now having to rebase these patches on upgrades:
- https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
- https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
- https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/python/python3/0001-test_active_children-skip-problematic-test.patch
- https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/python/python3/0001-test_deadlock-skip-problematic-test.patch
- https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
- https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-130508
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查链接的 PR gh-130508 和 TimerfdTests 示例。将列出的 Yocto 补丁文件名(包括 no_stdout_fileno 和 test_active_children 补丁)与 CPython 测试套件进行比较。当对时间敏感的测试具有一致的注释,并且可以在高负载下轻松跳过时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- testing-qa
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100