[LTP] [PATCH v2 2/2] doc: Add ground rules page

Petr Vorel pvorel@suse.cz
Sun Dec 21 11:30:44 CET 2025


Hi all,

> It's really good to write these rules down, especially since maintainers
> can reuse them in patch reviews to comment on issues and avoid repeatedly
> responding to the same questions. Below are what I can think of:

+1

> Don’t require root unless it’s essential
> ============================
> If root/caps are needed, say why in the test output. Drop privileges for
> the part that doesn’t need them (and avoid running the whole test as
> root “because it’s easier”).


> Always clean up, even on failure
> ==========================
> Every test should leave the system as it found it: unmount, restore sysctls,
> delete temp files/dirs, kill spawned processes, remove cgroups/namespaces,
> detach loop devices, restore ulimits, etc. Cleanup must run on early-exit
> paths too.


> Respect LTP portability goals
> ===========================
> Avoid nonstandard libc APIs when a portable equivalent exists; don’t assume
> 64-bit,
> page size, endianness, or particular tool versions.

+1.
I would also mention POSIX shell compatibility.

Maybe also mention 'make check'.

"No regressions"
================
Each commit needs to compile. None commit can actually deliberately break tests.

As the document is getting quite big, I'd put AI policy into separate page.

Kind regards,
Petr


More information about the ltp mailing list