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

Standardize the way kernel's testing modules report results

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
停滞
技术栈
c, rust

调研方向

首先查看 tools/testing/selftests/kselftest_module.h 和 tools/testing/selftests/kselftest/module.sh,然后检查列出的 lib 测试模块和 drivers/lkdtm 套件。比较这些模块当前如何加载、卸载以及报告结果,包括清单中引用的 test_strscpy 转换。完成的标准是记录现有的日志和状态报告模式,并提出一种标准方法。

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

描述

We discussed that all kernel testing modules should use a standard way to report results. The log messages should be informative at the same time. Initially, we need to see which kind of logs are being outputted by the current models. Based on this, better improvements should be suggested.

Non-exhaustive list of test suites using test modules:

bpf, sparc
    <skip>
lib
    test_bitmap
    prime_numbers
    test_printf
    test_scanf
    test_strscpy
lkdm
    lkdtm module
lock
    test-ww_mutex module
net
    test_blackhole_dev
user
    test_user_copy
firmware
    test_firmware
static_keys
    test_static_key_base
    test_static_keys
memory-hotplug
    memory-notifier-error-inject
drivers
    test-drm_mm
fpu
    test_fpu
ntb
    ntb_msi_test
ftrace
    trace-printk
    ftrace-direct-too
rust
    rust_minimal
    rust_print

The kselftest only loads and unloads the module. It doesn't check the status of executed tests to decide if test passed or failed.

These tests can be divided into 2 categories of their dependence:

  1. tools/testing/selftests/kselftest_module.h and tools/testing/selftests/kselftest/module.sh provide a standard way to write a test module which can be loaded from kselftest. These modules are found in the lib/. One such example is lib test suite. It 5 tests. Each test just loads the test module and exits successfully. It doesn't check the status of the modules if the module test got passed or failed. Every test module has a separate config option to turn on and off.
  2. The second type of test modules are scattered around the kernel code. They are enabled by separate config options as needed. lkdtm suite is one example. Its module is found in the drivers/lkdtm.

  • [] 41eefc46a3a4682976afb5f8c4b9734ed6bfd406 has converted test_strscpy selftest to kunit test. remove strscpy selftest.
主要语言
Python
星标
14
派生
32
平均合并
10 小时 18 分钟
30 天内合并 PR
5

环境准备

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

从这里开始

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

kernelci/kernelci-project 的其他 Issue

查看 kernelci/kernelci-project 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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