The systemd project has a number of code quality tools set up in the source tree and on the github infrastructure. Here’s an incomprehensive list of the available functionality:
ninja -C build test to run the unit tests. Some tests are skipped if
no privileges are available, hence consider also running them with
ninja -C build test. A couple of unit tests are considered “unsafe” (as
they change system state); to run those too, build with
-Dtests=unsafe. Finally, some unit tests are considered to be very slow,
build them too with
meson -Dslow-tests=true. (Note that there are a couple
of manual tests in addition to these unit tests.)
./test/run-integration-tests.sh to run the full integration test
suite. This will build OS images with a number of integration tests and run
them in nspawn and qemu. Requires root.
./coccinelle/run-coccinelle.sh to run all
Coccinelle semantic patch scripts we ship. The
output will show false positives, hence take it with a pinch of salt.
./tools/find-double-newline.sh recdiff to find double newlines. Use
./tools/find-double-newline.sh recpatch to fix them. Take this with a grain
of salt, in particular as we generally leave foreign header files we include in
our tree unmodified, if possible.
./tools/find-tabs.sh recdiff to find TABs, and
./tools/find-tabs.sh recpatch to fix them. (Again, grain of salt, foreign
headers should usually be left unmodified.)
ninja -C build check-api-docs to compare the list of exported
libudev.so with the list of man pages. Symbols
lacking documentation are highlighted.
ninja -C build hwdb-update to automatically download and import the
PCI, USB and OUI databases into hwdb.
ninja -C build man/update-man-rules to update the meson rules for
building man pages automatically from the docbook XML files included in
There are multiple CI systems in use that run on every github PR submission.
Our tree includes
.vimrc files, to
ensure that editors follow the right indentiation styles automatically.
When building systemd from a git checkout the build scripts will automatically enable a git commit hook that ensures whitespace cleanliness.
LGTM analyzes every commit pushed to master. The list of active alerts can be found at https://lgtm.com/projects/g/systemd/systemd/alerts/?mode=list.
Access to Coverity and oss-fuzz reports is limited. Please reach out to the maintainers if you need access.