<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 19, 2022 at 5:30 PM Martin Doucha <<a href="mailto:mdoucha@suse.cz" target="_blank">mdoucha@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 18. 10. 22 17:25, Richard Palethorpe via ltp wrote:<br>
> Strictly cpuid.h should not be included on non-x86, but this means<br>
> each test author has to remember not to include it. Instead we can set<br>
> a blank macro to allow compilation.<br>
> <br>
> Signed-off-by: Richard Palethorpe <<a href="mailto:rpalethorpe@suse.com" target="_blank">rpalethorpe@suse.com</a>><br>
> ---<br>
<br>
Hi,<br>
defining an empty macro is a bad idea because it'll allow a broken test <br>
to be compiled and then it'll behave erratically for no apparent reason. <br>
It's better to get a build failure.<br>
<br>
Reverting 1df4de06206b079f24dde7157d037b48727c743d is the best solution <br>
here. Building ptrace07 and similar arch-specific tests without a key <br>
piece of code does not make sense. The preprocessor arch checks should <br>
wrap around the whole file, not just a small non-portable bit that's <br>
crucial for the test to work.<br></blockquote><div><br></div><div><div class="gmail_default">From what I know, one of the uses of "empty macro" is to conditionally</div><div class="gmail_default">include certain portions of a program. In ptrace07, it invokes that useless</div><div class="gmail_default">macro for compiling pass on non-x86 arch but does not allow execute it.</div><div class="gmail_default"><br></div><div class="gmail_default">I don't see why that's crucial for a test, if we wrap around the whole file and</div><div class="gmail_default">avoid it compiling on non-x86, isn't this essentially same as that? </div><div class="gmail_default"><br></div><div class="gmail_default">The only distinction between them is partly or wholly skipping the key</div><div class="gmail_default">code compilation. or maybe I completely misunderstood this part.</div></div><div><br></div></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>