LWN: Comments on "Driver regression testing with roadtest" https://lwn.net/Articles/887974/ This is a special feed containing comments posted to the individual LWN article titled "Driver regression testing with roadtest". en-us Fri, 29 Aug 2025 17:44:16 +0000 Fri, 29 Aug 2025 17:44:16 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Driver regression testing with roadtest https://lwn.net/Articles/890197/ https://lwn.net/Articles/890197/ arnout <p>There was <a href="https://fosdem.org/2022/schedule/event/unit_testing_linux_drivers/">a talk at FOSDEM</a> discussing a completely different <a href="https://github.com/lcarlier/EasyMock/">approach called EasyMock</a>. Rather then using UML, it mocks away all of the kernel itself. It's not so great for regression testing of changes outside of the driver (because exactly those things are mocked away), but I think it has much more potential for testing the implementation of the driver itself, because it's much easier to mock corner cases and error paths (e.g. failing allocations). <p>With roadtest, I expect things like error paths for allocations will remain untested because they can't be mocked. Mon, 04 Apr 2022 14:16:21 +0000 Driver regression testing with roadtest https://lwn.net/Articles/890000/ https://lwn.net/Articles/890000/ andy_shev <div class="FormattedComment"> `assertEqual()` against float, well done!<br> </div> Fri, 01 Apr 2022 15:31:56 +0000 Driver regression testing with roadtest https://lwn.net/Articles/889528/ https://lwn.net/Articles/889528/ qwertyface There's a really nice property-based testing framework for Python called <a href="https://hypothesis.readthedocs.io/en/latest/">Hypothesis</a>. I would imagine that in some cases using it to generate test-cases (register values etc.) would work quite nicely within Roadtest. Tue, 29 Mar 2022 11:34:22 +0000 Driver regression testing with roadtest https://lwn.net/Articles/889146/ https://lwn.net/Articles/889146/ riteshsarraf Yes. That is something we've been <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837920#22">targeting</a>. Just that this hasn't had the urgency, given that in its current model, it works fine. Thu, 24 Mar 2022 15:56:50 +0000 Driver regression testing with roadtest https://lwn.net/Articles/889093/ https://lwn.net/Articles/889093/ johill <div class="FormattedComment"> <a href="https://patchwork.ozlabs.org/project/linux-um/list/?series=291826&amp;state=%2A&amp;archive=both">https://patchwork.ozlabs.org/project/linux-um/list/?serie...</a><br> </div> Thu, 24 Mar 2022 12:14:57 +0000 Driver regression testing with roadtest https://lwn.net/Articles/889087/ https://lwn.net/Articles/889087/ pabs <div class="FormattedComment"> One other thing I was thinking; that Debian&#x27;s src:user-mode-linux should be merged into src:linux (like the RT builds are) so it is always up to date with Debian&#x27;s other Linux kernel packages.<br> <p> https://kernel-team.pages.debian.net/kernel-handbook/<br> </div> Thu, 24 Mar 2022 10:51:01 +0000 Driver regression testing with roadtest https://lwn.net/Articles/889084/ https://lwn.net/Articles/889084/ riteshsarraf <div class="FormattedComment"> Thank you for bringing this up. I will try to review the set of patches we&#x27;re carrying in Debian, and what all can be pushed upstream.<br> </div> Thu, 24 Mar 2022 10:37:39 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888755/ https://lwn.net/Articles/888755/ pabs <div class="FormattedComment"> Sorry, I&#x27;ll have to leave that to you. My Linux kernel knowledge is minimal at this point and I&#x27;m not the UML maintainer in Debian, just a bystander that looked it at one point.<br> </div> Tue, 22 Mar 2022 01:02:48 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888652/ https://lwn.net/Articles/888652/ johill <div class="FormattedComment"> Do you want to propose a couple of patches then? :) Should be pretty simple, I&#x27;d think, but if not I guess I can also just write them quickly.<br> </div> Mon, 21 Mar 2022 11:23:43 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888566/ https://lwn.net/Articles/888566/ pabs <div class="FormattedComment"> Kconfig and runtime config values sound good to me. It seems that it wasn&#x27;t noticed that strrchr fix was already applied because Debian&#x27;s patch modifies KERNEL_DEFINES while the upstream change was to KBUILD_CFLAGS. I don&#x27;t understand enough of the Linux build system to know why both exist and which one the strrchr fix should be in though.<br> <p> Also, I see there is also a DocBook based linux(1) manual page and of course the Kconfig files duplicate the upstream ones:<br> <p> <a href="https://sources.debian.org/src/user-mode-linux/5.16um1/linux.sgml">https://sources.debian.org/src/user-mode-linux/5.16um1/li...</a><br> <a href="https://sources.debian.org/src/user-mode-linux/5.16um1/config.i386">https://sources.debian.org/src/user-mode-linux/5.16um1/co...</a><br> <a href="https://sources.debian.org/src/user-mode-linux/5.16um1/config.amd64">https://sources.debian.org/src/user-mode-linux/5.16um1/co...</a><br> </div> Sun, 20 Mar 2022 00:42:23 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888559/ https://lwn.net/Articles/888559/ johill I wasn't (and we should probably discuss this on the uml list), but: <ul> <li>x-terminal-emulator - that's just changing a default, not sure it makes that much sense for non-debian, but the best would probably be to make a new Kconfig variable for it, defaulting to the current value xterm <li>/tmp/uml.ctl - similarly, and likely it should also be made runtime-configurable? <li>the strrchr fix is just outdated? the bug report for it is from 2008, the fix from 2009, and in 2011 the bug was fixed upstream in commit 2c51a4bc023 <li>WRITE_ZEROES was submitted upstream </ul> Sat, 19 Mar 2022 20:54:07 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888507/ https://lwn.net/Articles/888507/ pabs <div class="FormattedComment"> BTW, are you aware of the patches that Debian applies to UML? <br> <p> <a href="https://sources.debian.org/src/user-mode-linux/sid/debian/patches/">https://sources.debian.org/src/user-mode-linux/sid/debian...</a><br> <a href="https://tracker.debian.org/pkg/user-mode-linux">https://tracker.debian.org/pkg/user-mode-linux</a><br> </div> Sat, 19 Mar 2022 13:42:29 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888498/ https://lwn.net/Articles/888498/ roc <div class="FormattedComment"> This sounds like a really good approach. Bravo!<br> </div> Sat, 19 Mar 2022 10:46:14 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888493/ https://lwn.net/Articles/888493/ johill <div class="FormattedComment"> The website is largely irrelevant these days, it was most interesting back in those days when the project was out of tree (though I should say I wasn&#x27;t involved back then). It should probably be largely removed and replaced by pointers to the in-kernel documentation.<br> <p> Which, sadly, is also lacking, but especially Anton has been working on it, and I still have a task in my backlog to describe all the stuff they&#x27;re also using here (time-travel &amp; virtio/vhost-user).<br> <p> A couple of people also use it all the time (kunit, in wifi we use it for the hostap tests [1], etc.) so it&#x27;s at least constantly maintained to work for those use cases.<br> <p> [1] <a href="https://w1.fi/cgit/hostap/tree/tests/hwsim/vm">https://w1.fi/cgit/hostap/tree/tests/hwsim/vm</a><br> </div> Sat, 19 Mar 2022 08:42:58 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888488/ https://lwn.net/Articles/888488/ pabs <div class="FormattedComment"> Is UML well maintained? Its website at least does not give that impression, as it references Linux 2.6.<br> </div> Sat, 19 Mar 2022 06:44:48 +0000 Driver regression testing with roadtest https://lwn.net/Articles/888469/ https://lwn.net/Articles/888469/ pmulholland <div class="FormattedComment"> It’s great to see an open framework like this emerge for kernel testing.<br> <p> I’ve designed and used proprietary frameworks like this for embedded systems testing (bare metal, RTOS and embedded Linux), and the complexity of mocking the hardware can really be chosen to be almost as shallow as the register and interrupt interface, or you can build out an entire virtual device, or something in between.<br> <p> As an idea of how powerful python based regression testing can be, with some abstraction I’ve emulated I2C, USB, and even PCI devices using a few lines of python, with the kernel booting up and discovering them. <br> </div> Sat, 19 Mar 2022 00:55:48 +0000