kernelci / kernelci/kernelci-project
Standardize the way kernel's testing modules report results
- Dominant language
- Python
- Stars
- 14
- Forks
- 32
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 3
Description
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
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing tools/testing/selftests/kselftest_module.h and tools/testing/selftests/kselftest/module.sh, then inspect the listed lib test modules and the drivers/lkdtm suite. Compare how these modules currently load, unload, and report results, including the test_strscpy conversion referenced in the checklist. Done means documenting the existing log and status-reporting patterns and proposing a standard approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, rust
- Domain
- operating-systems, testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100