[LTP] [PATCH] lib: tst_kconfig: Add runtime checks

Petr Vorel pvorel@suse.cz
Thu Mar 26 16:44:21 CET 2026


> Hi!
> > > +// SPDX-License-Identifier: GPL-2.0-or-later
> > nit: please use /* */ otherwise checkpatch complains.

> Hmm, so apparently kernel has a bit crazy rule that the SPDX has to be
> between /* */ in headers and start with // in C sources. Because of some
> tooling that parses kernel headers couldn't handle //.

Yes:

https://docs.kernel.org/process/license-rules.html#license-identifier-syntax

	If a specific tool cannot handle the standard comment style, then the
	appropriate comment mechanism which the tool accepts shall be used. This is
	the reason for having the “/* */” style comment in C header files. There was
	build breakage observed with generated .lds files where ‘ld’ failed to parse
	the C++ comment. This has been fixed by now, but there are still older
	assembler tools which cannot handle C++ style comments.

=> older assembler tools.

> I do not think that there will be any tooling parsing LTP internal
> headers. Maybe we can silence that rule in checkpatch?

I'd prefer to keep changes in our vendored checkpatch pl to bare minimum
to not complicate updating.  Unfortunately there is a single tag
SPDX_LICENSE_TAG for many checkpatch errors. It'd be great if this could be
configurable.

Kind regards,
Petr


More information about the ltp mailing list