In our last update, we shared how we can improve the developer experience for building and testing software by using system extensions with sysext-utils. This time, we want to share how we can leverage that work to improve end-to-end testing of operating systems.
Testing with GNOME OS
For a couple of years now, folks at GNOME have been using openQA with GNOME OS to run end-to-end tests for different components of their stack; from the installer, to the shell, to many of their core applications. These tests run every time changes land in GNOME OS.
Although these tests have helped identify bugs early on, the current workflow comes with some disadvantages and costs.
Every time a change lands in GNOME OS and tests are run, an entire operating system has to be built from scratch. This is slow and uses valuable resources. Since it all happens after the changes have already been merged into a GNOME component, any problems detected by these tests will only be discovered after the fact.
Plus, people interested in these changes must wait until a new GNOME OS build is available.
Leveraging system extensions
System extensions allow us to build and overlay individual software components on existing system images. We can then test the new component without rebuilding the entire OS.
As part of our collaboration with the GNOME Foundation, through the Sovereign Tech Found (STF), we explored the use of extensions to tackle these disadvantages and costs with the current workflow. Using GNOME Shell as a test case, we came up with a new workflow that goes like this:
- A developer sends a merge request to gnome-shell.
- A CI job uses sysext-utils to build a system extension out of that gnome-shell merge request and publishes the extension.
- Another CI job sets up openQA to run the end-to-end tests on the latest GNOME OS build, with that system extension overlaid.
The benefits of new this approach are:
- There is no need to build an entire operating system to test the changes, only the component that changed.
- Tests are run before the changes are merged.
- The published extension can be used by reviewers to manually try these changes in GNOME OS using sysext-utils. This could also be useful for design review and manual QA testing.
This workflow is inspired by Flatpak workflows used in places like Flathub, which is beneficial in itself, considering that many GNOME developers are already familiar with that workflow.
To achieve this we developed new GitLab CI/CD components for building and testing extensions, easily available to all GNOME modules. In fact, we have already integrated some of these jobs in mutter and gnome-shell.
Future work
There are a few merge requests pending review, so things might still change a bit. Nevertheless, we have demonstrated that it's feasible to integrate system extensions with development and testing pipelines, and that we can provide an improved workflow for reviewers and testers, through that integration.
During the process of designing and building this workflow, we identified many opportunities for future improvement. For example:
- Extensions can be better integrated with openQA. Its current API has no concept of system extensions and, therefore, custom SMBIOS wizardry is still needed to integrate extensions.
- Reduce test duplication. Moving openQA tests to each individual GNOME module results in common tests being duplicated across multiple projects and, therefore, reorganisation is needed to reduce duplication.
Additionally, this work could be extended and reused in non-GNOME system components as well, like Flatpak and XDG Desktop Portal, and even other Linux distributions like Fedora by providing similar CI/CD components.
If you’d like to learn more about our work with GNOME, systemd, or anything discussed in this article, please contact us via sales@codethink.co.uk.
Other Content
- Codethink/Arm White Paper: Arm STLs at Runtime on Linux
- Speed Up Embedded Software Testing with QEMU
- Open Source Summit Europe (OSSEU) 2024
- Watch: Real-time Scheduling Fault Simulation
- Improving systemd’s integration testing infrastructure (part 2)
- Meet the Team: Laurence Urhegyi
- Shaping the future of GNOME: GUADEC 2024
- Developing a cryptographically secure bootloader for RISC-V in Rust
- Meet the Team: Philip Martin
- Improving systemd’s integration testing infrastructure (part 1)
- A new way to develop on Linux
- RISC-V Summit Europe 2024
- Safety Frontier: A Retrospective on ELISA
- Codethink sponsors Outreachy
- The Linux kernel is a CNA - so what?
- GNOME OS + systemd-sysupdate
- Codethink has achieved ISO 9001:2015 accreditation
- Outreachy internship: Improving end-to-end testing for GNOME
- Lessons learnt from building a distributed system in Rust
- FOSDEM 2024
- QAnvas and QAD: Streamlining UI Testing for Embedded Systems
- Outreachy: Supporting the open source community through mentorship programmes
- Using Git LFS and fast-import together
- Testing in a Box: Streamlining Embedded Systems Testing
- SDV Europe: What Codethink has planned
- How do Hardware Security Modules impact the automotive sector? The final blog in a three part discussion
- How do Hardware Security Modules impact the automotive sector? Part two of a three part discussion
- How do Hardware Security Modules impact the automotive sector? Part one of a three part discussion
- Automated Kernel Testing on RISC-V Hardware
- Automated end-to-end testing for Android Automotive on Hardware
- GUADEC 2023
- Embedded Open Source Summit 2023
- RISC-V: Exploring a Bug in Stack Unwinding
- Adding RISC-V Vector Cryptography Extension support to QEMU
- Introducing Our New Open-Source Tool: Quality Assurance Daemon
- Achieving Long-Term Maintainability with Open Source
- FOSDEM 2023
- Think before you Pip
- BuildStream 2.0 is here, just in time for the holidays!
- A Valuable & Comprehensive Firmware Code Review by Codethink
- GNOME OS & Atomic Upgrades on the PinePhone
- Flathub-Codethink Collaboration
- Codethink proudly sponsors GUADEC 2022
- Tracking Down an Obscure Reproducibility Bug in glibc
- Web app test automation with `cdt`
- FOSDEM Testing and Automation talk
- Protecting your project from dependency access problems
- Full archive