Testing and Continuous Delivery

Externally verifying Linux’s real-time deadline scheduling capabilities

H.2213
Theodore Tucker
<p>A number of industrial applications now demand hard real-time scheduling capabilities from the kernel of a Linux-based operating system, but scheduling measurements from the system itself cannot be completely trusted as they are referenced to the same clock as the kernel-under-test. Yet, if the system can output signals to hardware as it runs, their timing can be analysed by an external microcontroller, and a second "external" measurement obtained to compare with the system's own report.</p> <p>Codethink wrote embedded Rust firmware to run on a Raspberry Pi Pico which analyses the timings of characters received on a UART serial port. On the other end of the serial port is our "Rusty Worker": a Rust program on a Linux system which uses the <code>sched_setattr</code> syscall to request that Linux schedules it with specified parameters, and then measures its own scheduling period and runtime. The single-threaded and interrupt-based architecture of this firmware allowed accurate external measurements of the Rusty Worker’s scheduling parameters at microsecond precision, and meant it was easy to extend to monitor the "petting" behaviour of a watchdog.</p> <p>Rust was a natural choice for the verification firmware and Rusty Worker. Higher level or interpreted languages would increase non-determinism and reduce our confidence in the accuracy of the collected timing data, whereas C or C++ programs risk undefined behaviour unacceptable in a safety-related context. Yet, Rust really came into its own with the relative simplicity of the cargo toolchain for embedded targets, so reproducibly building the firmware with a self-built toolchain (and without access to the internet) was just as straightforward as building the Rusty Worker for a Linux target.</p> <p>Having equipped our suite of bare-metal CI runners with KiCad-designed custom PCBs that feature a Raspberry Pi Pico and Debug Probe, we are able to run “soak” tests to collect thousands of self- and externally-measured deadline scheduling parameters for each iteration of our <a href="https://www.codethink.co.uk/ctrl-os.html">Codethink Trustable Reproducible Linux (CTRL OS)</a>, as soon as engineers push a new commit. We then use the open source <a href="https://gitlab.com/CodethinkLabs/trustable/trustable">Eclipse Trustable Software Framework (TSF)</a> to facilitate automatic “real time” aggregation and statistical analysis of the external scheduling measurements for each commit, clearly communicating the results and trends to senior stakeholders and junior engineers alike.</p> <p>TSF challenges us both to robustly, systematically, and continuously evidence our claims about Linux’s capabilities as a real-time operating system, and to scrutinise the software used for testing as strictly as the software under test. We are excited to share how we work towards these goals with external scheduling measurements and embedded Rust.</p>

Additional information

Live Stream https://live.fosdem.org/watch/h2213
Type devroom
Language English

More sessions

2/1/26
Testing and Continuous Delivery
Ivan Baravy
H.2213
<p>OS kernel development is often connected with time consuming testing process and non-trivial debug technics. Although emulators like QEMU and Bochs ease this work significantly, nothing can compare with convenience of userspace developer environment. Moving parts of the kernel to the userspace binary is not straightforward, especially if the kernel has almost no compatibility with POSIX and is written entirely in assembly. Still, sometimes it is doable. The talk shares experience, ...
2/1/26
Testing and Continuous Delivery
Andreea Daniela Andrisan
H.2213
<p>Talk about a project that implements a hardware-in-the-loop testing framework for validating Linux distributions on specific development boards. The system uses a universal testing harness that automatically detects target hardware platforms and adapts generic testing scripts to board-specific configurations with Claude AI help. Platform adaptation is achieved through specific configuration files that define board-specific parameters, enabling the same testing codebase to validate different ...
2/1/26
Testing and Continuous Delivery
Marek Pikuła
H.2213
<p>The <strong>ci-multiplatform</strong> project is a generic, OCI-based multi-architecture CI system designed to make cross-platform testing practical for open-source projects using GitLab CI. Originally created while enabling RISC-V support for Pixman (https://gitlab.freedesktop.org/pixman/pixman), it has since grown into an independent project under the RISE (RISC-V Software Ecosystem) umbrella: https://gitlab.com/riseproject/CI/ci-multiplatform, with a mirror on freedesktop.org: ...
2/1/26
Testing and Continuous Delivery
Connor Aird
H.2213
<p>Testing is central to modern software quality, yet many widely used Fortran codebases still lack automated tests. Existing tests are often limited to coarse end-to-end regression checks that provide only partial confidence. With the growth of open-source Fortran tools, we can now bring unit testing and continuous validation to legacy and modern Fortran projects alike. </p> <p>This talk surveys the current landscape of Fortran testing frameworks before focusing on three I have evaluated in ...
2/1/26
Testing and Continuous Delivery
Rémi Duraffort
H.2213
<p>ESPHome is a versatile framework to create custom firmware for various microcontrollers. In this talks we will look at how to automatically test the latest ESPHome firmware on an ESP32.</p> <p>As ESPHome devices are used to interact with the real world, we will also look at how to test that the LUX sensors is able to detect light variations.</p> <p>In order to test the ESP32 device, we are going to use lava on the command line, directly inside a gitlab runner.</p>
2/1/26
Testing and Continuous Delivery
Ullrich Hafner
H.2213
<p>The CI/CD server Jenkins provides powerful build-quality visualizations through plugins such as <a href="https://plugins.jenkins.io/warnings-ng/">Warnings</a>, <a href="https://plugins.jenkins.io/coverage/">Coverage</a>, and <a href="https://plugins.jenkins.io/git-forensics/">Git Forensics</a>. These plugins aggregate and visualize data from static analysis tools, coverage reports, software metrics, and Git history, enabling teams to track quality trends across builds. We have now brought ...
2/1/26
Testing and Continuous Delivery
Michael Nazzareno Trimarchi
H.2213
<p>CI/CD with Gerrit, AI-Enhanced Review, and Hardware-in-the-Loop Testing in Jenkins Pipelines This presentation will explore advanced Continuous Integration (CI) strategies essential for open-source embedded systems development, moving beyond standard software testing to encompass physical hardware validation. We will begin by establishing the necessity of integrating rigorous unit and integration testing directly into the development workflow, demonstrating how to effectively define these ...