[LTP] [PATCH] tools: Check headers with checkpatch.pl
Richard Palethorpe
rpalethorpe@suse.de
Tue Jul 26 14:53:02 CEST 2022
Hello,
Petr Vorel <pvorel@suse.cz> writes:
> 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).
The Sparse based tool does include headers though. So really we are
checking the target which includes more than just a single c file.
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Kind regards,
> Petr
--
Thank you,
Richard.
More information about the ltp
mailing list