Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Standardize the way kernel's testing modules report results

Đang mở
#414 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
c, rust

Hướng nghiên cứu

Bắt đầu bằng việc xem xét tools/testing/selftests/kselftest_module.h và tools/testing/selftests/kselftest/module.sh, sau đó kiểm tra các mô-đun kiểm thử lib được liệt kê và bộ drivers/lkdtm. So sánh cách các mô-đun này hiện được nạp, dỡ và báo cáo kết quả, bao gồm cả việc chuyển đổi test_strscpy được tham chiếu trong checklist. Được xem là hoàn tất khi đã ghi lại các mẫu ghi log và báo cáo trạng thái hiện có, đồng thời đề xuất một cách tiếp cận tiêu chuẩn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Python
Star
14
Fork
32
Merge trung bình
13 giờ 53 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của kernelci/kernelci-project

Tất cả issue của kernelci/kernelci-project

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.