integration-test-authoring

Create Breenix kernel integration tests using QEMU and serial completion signals.

7|Updated Nov 21, 2015
One-click install
npx skills add https://github.com/ryanbreen/breenix --skill integration-test-authoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-test-authoring
Source: https://github.com/ryanbreen/breenix/tree/main/breenix-integration-test-authoring
Command: npx skills add https://github.com/ryanbreen/breenix --skill integration-test-authoring

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating reliable integration tests for operating system kernels is challenging due to the need for QEMU virtualization, specific boot sequences, and precise signal detection. This Skill provides a structured approach to authoring these tests, ensuring new kernel features are thoroughly validated.

Core Features & Use Cases

  • Shared QEMU Testing: Leverage a shared QEMU instance for faster, more efficient test execution across multiple kernel features.
  • Checkpoint Signals: Define and monitor specific log signals to verify kernel behavior and test completion.
  • Use Case: You've implemented a new memory management feature in Breenix. Use this Skill to quickly set up a kernel-side test, define a completion signal, and integrate it into the existing shared QEMU test suite, ensuring your changes don't introduce regressions.

Quick Start

Kernel-side test code snippet

#[cfg(feature = "testing")] pub fn test_my_feature() { use crate::serial::serial_println; serial_println!("✅ MY_FEATURE TEST COMPLETE"); }

Rust integration test snippet

#[test] fn test_my_feature() { shared_qemu::run_test( "my_feature", "✅ MY_FEATURE TEST COMPLETE" ); }

Frequently Asked Questions about integration-test-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write integration tests for a Rust kernel running in QEMU?

Integration tests for Rust kernels in QEMU combine kernel-side test code guarded by #[cfg(feature = 'testing')] with host-side Rust test harnesses that launch QEMU, monitor serial output for completion signals, and verify kernel behavior. This Skill provides a structured pattern using shared_qemu test runners and checkpoint signals for efficient multi-feature testing.

What's the best way to verify kernel feature implementations don't cause regressions?

Automated integration testing with shared QEMU instances catches regressions by running kernel tests against new features and monitoring for expected completion signals. This Skill streamlines that workflow, letting you define unique start and completion signals in serial output, then integrate tests into a shared harness for consistent validation.

How do I monitor kernel output during QEMU tests to confirm test completion?

Integration tests detect kernel behavior by defining unique checkpoint signals—specific serial_println output patterns—that mark test start and completion. The shared_qemu harness monitors these signals and reports pass/fail status, eliminating manual log inspection and enabling automated CI workflows.

Can I integrate kernel tests into CI/CD pipelines with QEMU?

Yes. This Skill supports optional xtask CI integration, allowing you to orchestrate kernel tests in automated pipelines. Tests use shared QEMU instances and signal detection, making CI execution fast and repeatable without requiring manual kernel boot or log parsing.

What setup do I need before writing kernel integration tests?

Before authoring tests, you need a working Breenix kernel project, QEMU installed for virtualization, a serial communication mechanism (serial_println) in your kernel code, and the shared_qemu test harness available. This Skill assumes those prerequisites and focuses on test authoring patterns and signal definition.

Why use signal detection instead of checking kernel logs directly in tests?

Signal detection via serial output is deterministic and fast—tests wait only for expected completion markers rather than parsing entire logs. This approach scales efficiently across multiple kernel features in a shared QEMU instance and integrates cleanly with CI systems that need clear pass/fail signals.