Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Standardize the way kernel's testing modules report results

Aperta
#414 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
c, rust

Direzione di ricerca

Inizia esaminando tools/testing/selftests/kselftest_module.h e tools/testing/selftests/kselftest/module.sh, quindi ispeziona i moduli di test lib elencati e la suite drivers/lkdtm. Confronta il modo in cui questi moduli vengono attualmente caricati e scaricati e riportano i risultati, inclusa la conversione test_strscpy indicata nella checklist. Il lavoro è completato quando vengono documentati i modelli esistenti di logging e di segnalazione dello stato e viene proposto un approccio standard.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Python
Stelle
14
Fork
32
Merge medio
10h 18m
PR unite (30g)
5

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kernelci/kernelci-project

Tutte le issue di kernelci/kernelci-project

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.