Linus Torvalds Slams 'Disgusting' DRM Testing Code in Latest Linux Kernel

· 1 min read

article picture

Linux creator Linus Torvalds expressed strong criticism over newly merged graphics driver updates in Linux 6.15, specifically targeting problematic testing code that he wants removed from regular kernel builds.

The contentious "hdrtest" code, which checks C header files in the Intel Xe kernel driver, has drawn Torvalds' ire for two main reasons: it unnecessarily slows down regular kernel builds and creates unwanted files in include directories.

"This thing needs to die," Torvalds stated bluntly in a recent mailing list post. He particularly objected to the testing code being included in regular builds rather than existing as a separate, optional testing tool.

The testing implementation not only leaves behind what Torvalds colorfully termed as "turds" in the source tree but also interferes with filename completion functionality. While these files could be hidden through gitignore, Torvalds emphasized this would merely mask the underlying problem rather than solve it.

As an immediate measure, Torvalds has marked the code as BROKEN. He suggested that instead of including it in standard Kconfig setup and normal builds, it should be restructured as a separate testing option, such as "make drm-hdrtest."

The code in question serves a basic maintenance purpose - ensuring DRM header files are self-contained and meet kernel-doc test requirements. While the rest of the DRM-Next code has successfully merged into Linux 6.15, developers are now expected to address and clean up the controversial testing implementation.

This incident reflects Torvalds' well-known stance on maintaining clean, efficient code in the Linux kernel, particularly when it affects the broader development community.