[LTP] [PATCH] tools: Check headers with checkpatch.pl

Petr Vorel pvorel@suse.cz
Tue Jul 26 14:03:45 CEST 2022


Hi Richie,

> checkpatch.pl doesn't load included headers so they must be passed to
> it specifically. This change automatically includes headers from the
> current directory. Manual intervention is still required if a test
> author changes a header located elsewhere. However you can now write
> 'make check-header.h', once in the correct directory.

> Note that our Sparse based tool (amongst others) loads headers and
> checks at least some of the content.

Thanks a lot for implementing this.

LGTM, just a small nit: target for headers contain .h extension.
Shouldn't we add .c for C sources for consistency?

It'đ strange, that make check in testcases/misc/math/float/ does not include
tfloat.h, but make check-tfloat.h prints errors. But make check in lib/ works as
expected (adds also *.h).

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list