We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Advanced Unit Testing in the Hedron Microkernel

Formal Metadata

Title
Advanced Unit Testing in the Hedron Microkernel
Title of Series
Number of Parts
287
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Concurrent code is hard to get right, but at the same time also hard to test. It gets worse when hardware interaction is required. This leads to a comparatively poor culture of unit testing in kernel code, where both come together. In this talk, I’m going to highlight one particular method of unit testing the page table manipulation code in Hedron, a microkernel written in C++ specially geared towards virtualization workloads. This code safely modifies page tables that are concurrently used by the CPU. Usually, unit tests only check whether the state after an operation meets the expectation of the programmer. In contrast, Hedron employs completely deterministic unit tests that show that the CPU will always see a valid virtual memory mappings while a page table manipulation is in progress (for the tested cases). The goal of this task is to show that unit tests can be a powerful tool even for properties of code that are usually not deemed unit testable.