Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

kbuild: skip building kselftest when not required by jobfilter (speed up bisection)

未关闭
#3,127 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
50/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python

调研方向

从 src/lava_callback.py 中的 get_jobfilter() 开始,然后检查 config/jobs.yaml 和 config/scheduler.yaml,沿着事件链接追踪 kselftest 测试到其构建作业。将其与 kernelci/kbuild.py 中当前的过滤逻辑进行比较。完成的标准是:请求的 kselftest 作业保留所需的构件,而不相关的二分构建跳过 kselftest。

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

描述

Goal

To speed up bisection, do not build kselftest when it isn't needed by the requested jobs (kselftest builds are expensive and dominate bisection turnaround).

This was originally attempted in #2729, but that approach needs more design work before it can land — see below. Converting to an issue to track the proper solution.

Current attempt (#2729)

In kernelci/kbuild.py, when a jobfilter is present, kselftest is disabled unless <build-name>-kselftest literally appears in the filter:

if node['jobfilter'] and self._kfselftest is True:
    kselftest_name = node['name'] + "-kselftest"
    if kselftest_name not in node['jobfilter']:
        self._kfselftest = False

Why this isn't enough

  1. Downstream tests are invisible to the build. kbuild.py runs in the build container and only receives node + params + a flat jobfilter list of strings. It has no knowledge of which tests consume kselftest artifacts. So a jobfilter containing a kselftest test (but not the kselftest build name) would silently produce a build without kselftest, and the test would fail mysteriously. The dependency knowledge lives in kernelci-pipeline:

    • test → needs-kselftest is identifiable from config/jobs.yaml (test_method: kselftest, kcidb_test_suite: kselftest.*)
    • build → test link is the event field in config/scheduler.yaml
  2. Possible naming bug. Dedicated kselftest build variants are already named kbuild-...-kselftest (e.g. config/jobs.yaml, scheduler.yaml). For such a node, node['name'] + "-kselftest" becomes kbuild-...-kselftest-kselftest, which never matches the filter — so kselftest would be disabled on the very build meant to produce it (this is exactly the bisection-of-a-kselftest-test path). Needs verification against real node['name'] values.

Proposed direction

Move the decision to kernelci-pipeline, which already has self._configs loaded and builds the jobfilter in get_jobfilter() (src/lava_callback.py):

  • When any requested job in the jobfilter resolves to a kselftest test (test_method == 'kselftest'), auto-enable kselftest on the corresponding build (e.g. set a kselftest: enable param on the build node, or ensure the kselftest-enabled build name is in the filter).
  • Otherwise, leave kselftest off so bisection builds stay fast.

The one non-trivial piece is reverse-resolving the scheduler graph (test → triggering build-node event → build job), since the build job doesn't inherently know its downstream tests. This is an in-memory config walk, not new infrastructure.

Closes #2729 (superseded by this issue).

主要语言
Python
星标
120
派生
108
平均合并
1 天 12 小时
30 天内合并 PR
21

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

kernelci/kernelci-core 的其他 Issue

查看 kernelci/kernelci-core 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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