← スキル一覧に戻る

kernel-testing
by huynq55-v2
⭐ 0🍴 0📅 2026年1月15日
SKILL.md
name: Kernel Testing description: Automated testing workflow for the Kernel using QEMU and Rust's custom test frameworks.
Kernel Testing Skill
This skill allows you to run unit and integration tests for the kernel, verifying functionality on QEMU.
1. Running Tests
To run the kernel test suite:
chmod +x run-test.sh
./run-test.sh
2. How it Works
- Compilation: The kernel is compiled in
testmode, which includes thecustom_test_frameworksharness and atest_mainentry point. - UEFI Boot: The test kernel is packaged into a UEFI bootable image, similar to the main OS.
- QEMU Execution: The scripts launches QEMU with a special
isa-debug-exitdevice. - Reporting:
- Tests results are printed to the Serial Port.
- Pass: QEMU exits with status
33((0x10 << 1) | 1). - Fail/Panic: QEMU exits with status
35((0x11 << 1) | 1). - The
run-test.shscript captures this exit code and reportsPASSorFAIL.
3. Adding New Tests
Add #[test_case] to any function in the kernel to register it as a test.
#[cfg(test)]
#[test_case]
fn trivial_assertion() {
assert_eq!(1, 1);
}
4. Troubleshooting
- If QEMU hangs, check if the
isa-debug-exitdevice is correctly configured inrun-test.sh. - Ensure
test_main()is conditionally called in_startinsidekernel/src/main.rs.
スコア
総合スコア
40/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です