Test Overview
Aurora OS includes multiple test suites to ensure kernel stability and correctness:- Unit Tests - Kernel component tests (allocator, scheduler, capabilities)
- QEMU Boot Tests - End-to-end boot validation
- Source Checks - Validate kernel symbols and structure
- Browser Tests - WebAssembly runtime testing with Playwright
- Fuzz Testing - Automated fuzzing for security
Running All Tests
- Builds the kernel (if needed)
- Compiles and runs unit tests
- Executes QEMU boot validation
The test suite runs automatically in CI on every pull request.
Unit Tests
Test Harness
The kernel includes a hosted test harness that runs without QEMU:Test Coverage
Physical Allocator Tests
Physical Allocator Tests
Tests the kernel’s physical memory allocator:
- Page allocation and deallocation
- Memory region management
- Boundary conditions
- Out-of-memory handling
Heap Tests (kmalloc/kfree)
Heap Tests (kmalloc/kfree)
Tests kernel heap allocation:
- Dynamic allocation
- Memory coalescing
- Free list management
- Fragmentation handling
Capability Tests
Capability Tests
Tests the object-capability system:
- Capability creation
- Capability verification
- Capability revocation
- Permission enforcement
Scheduler Tests
Scheduler Tests
Tests the CFS-style scheduler:
- vruntime ordering
- Process priority
- Time slice allocation
- Context switching
QEMU Boot Tests
Validates that the kernel boots successfully in QEMU:What It Tests
Source Validation
Run static analysis checks on the kernel source:Check Categories
- Symbol Checks
- Filesystem Checks
- Network Checks
- Init Checks
Validates kernel ELF symbols:
- Required kernel symbols are present
- No undefined references
- Proper symbol visibility
Browser Tests (Playwright)
Test the WebAssembly runtime in real browsers:Test Coverage
Browser tests validate:- Page loads without errors
- WASM module initializes
- Boot screen renders
- Kernel bridge functions work
- Service worker caches assets
Playwright automatically serves
wasm-runtime/pwa/ using the webServer configuration.Fuzz Testing
Automated fuzzing runs nightly via GitHub Actions.Local Fuzzing
- LibFuzzer
- Standalone Fuzzer
Trigger Manual Fuzz Run
- Go to GitHub Actions → Nightly Fuzz
- Click “Run workflow”
- Wait for results
Continuous Integration
All tests run automatically on:- Pull requests
- Commits to
main - Nightly builds
CI Test Matrix
See
.github/workflows/ for full CI configuration.Test Development
Adding Unit Tests
- Add test functions to
tests/unit/kernel/test_harness.c:
- Register in test suite:
Adding Browser Tests
- Create a new spec file in
tests/browser/:
Benchmarking
Performance benchmarks must run inside the full kernel:In-kernel benchmarking tools are under development.
Test Logs and Artifacts
- Local
- CI
Test artifacts are saved to:
Troubleshooting
Unit Tests Fail to Compile
Unit Tests Fail to Compile
Ensure include paths are correct:
QEMU Boot Test Timeout
QEMU Boot Test Timeout
Increase timeout in
tests/qemu/boot-test.sh:Playwright Tests Hang
Playwright Tests Hang
Check if port 8080 is already in use:
Fuzz Test Crashes
Fuzz Test Crashes
This is expected! Check the crash artifact:
Next Steps
Contributing
Learn how to submit your changes
Setup Guide
Review development environment setup