INFRA Signal 154
NetBSD GSoC 2026 project adds Linux syscall test suite for compat_linux layer
Illustration only Photo by Hunter Haley on Unsplash
A Google Summer of Code project integrated the Linux Test Project (LTP) to validate NetBSD’s Linux binary compatibility layer.
Engineers running Linux binaries on NetBSD can now rely on a standardized test suite to catch regressions or gaps in syscall emulation. The work also provides a repeatable framework for future compatibility improvements.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
LTP tests were ported to NetBSD and packaged for pkgsrc to verify compat_linux syscall emulation.
A new pkgsrc package automates LTP download, compilation, and execution under NetBSD’s Linux compatibility layer.
Documentation and test logs were published to track current compatibility gaps and guide future fixes.
THE READ
What the cluster adds up to.
The project targeted NetBSD’s compat_linux, a kernel-level layer that translates Linux syscalls for native execution of Linux binaries. Until now, this component lacked systematic testing, relying instead on ad-hoc validation. By adopting the Linux Test Project (LTP), the project introduced a battle-tested framework already used to validate Linux itself. This shift provides a standardized baseline for measuring compatibility, reducing the risk of undetected regressions when NetBSD or Linux syscall behavior changes.
Porting LTP required compiling the test suite under NetBSD, which was achieved using suse15_gcc12 from pkgsrc-wip. The compiler and missing Linux headers were packaged as RPMs, allowing static compilation of LTP tests. A custom pkgsrc package was created to automate the process, mirroring pkgsrc’s fetch-build-install phases. While the package is not yet merged into the official tree, it is available in a personal fork, offering a repeatable workflow for engineers to validate compat_linux without manual setup.
The project documented fundamental syscalls and their test results in a spreadsheet, providing a reference for current compatibility gaps. Running the full LTP syscall suite revealed specific behaviors and edge cases in compat_linux, which were logged and made publicly accessible. This documentation serves as a roadmap for future fixes, allowing maintainers to prioritize syscalls based on usage frequency and application impact. The approach also sets a precedent for using upstream test suites to validate compatibility layers in other BSD projects.
Written by elseif from the cluster below · checked for specifics the sources never containedTHE CLUSTER