Linux's KUnit Finally Supporting JUnit Output

Written by Michael Larabel in Linux Kernel on 21 June 2026 at 05:45 AM EDT. 1 Comment
LINUX KERNEL
KUnit as the unit testing framework for the Linux kernel and was inspired in part by Java's JUnit when originally conceived, is now finally able to output to the JUnit format for better interoperability with other CI systems and the like that standardize on that common format.

KUnit was proposed nearly a decade ago and was merged for Linux 5.5 that released in early 2020. While KUnit was inspired by JUnit, Python unittest.mock, and GoogleTest, it's taken around six years to see JUnit output support added to this unit testing framework.

JUnit example output


Finally with the Linux 7.2 kernel, JUnit XML output support is merged. The intention with adding it is around better interoperability with Jenkins and other continuous integration (CI) systems relying on that common format. For Linux 7.2, it's a "primitive" level of support for JUnit.

With the now merged KUnit updates for Linux 7.2, the "--junit" argument can be used to output to JUnit XML as an alternative to JSON and other formats already handled by KUnit.
Related News
About The Author

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week