[LTP] [PATCH 1/2] ptrace07: Fix compilation when not on x86
Martin Doucha
mdoucha@suse.cz
Wed Oct 19 11:30:28 CEST 2022
On 18. 10. 22 17:25, Richard Palethorpe via ltp wrote:
> Strictly cpuid.h should not be included on non-x86, but this means
> each test author has to remember not to include it. Instead we can set
> a blank macro to allow compilation.
>
> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
Hi,
defining an empty macro is a bad idea because it'll allow a broken test
to be compiled and then it'll behave erratically for no apparent reason.
It's better to get a build failure.
Reverting 1df4de06206b079f24dde7157d037b48727c743d is the best solution
here. Building ptrace07 and similar arch-specific tests without a key
piece of code does not make sense. The preprocessor arch checks should
wrap around the whole file, not just a small non-portable bit that's
crucial for the test to work.
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list