<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Xu,</div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Yang Xu <<a href="mailto:xuyang2018.jy@cn.fujitsu.com">xuyang2018.jy@cn.fujitsu.com</a>> wrote:<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I have seen this patchset, Can we use a function to check whether kernel <br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Yes, we can, I was even thinking to define a global MACRO can check</div><div class="gmail_default" style="font-size:small">any syscall not only __NR_time.</div><div class="gmail_default" style="font-size:small">(maybe we can achieve it for other tests)</div><div class="gmail_default" style="font-size:small"><div><div class="gmail_default"></div></div><div class="gmail_default">But for this kind of case, I'd not suggest using that MACRO/function</div><div class="gmail_default">to check __NR_time, because the test will perform twice at the moment</div><div class="gmail_default">for the __NR_time syscall if it supporting(first time for support checking,</div><div class="gmail_default">second time for real invoking). </div><div class="gmail_default"><br></div><div class="gmail_default">Considering this is a time comparing test, that makes our seconds</div><div class="gmail_default">more inaccurate to compare.</div></div><div class="gmail_default"></div><div class="gmail_default" style="font-size:small"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
supports time syscall (like time_supported_by_kernel()) in setup<br>
and then we use time() - !return value in verify funtion?<br></blockquote><div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Though we check the syscall in setup(), shouldn't we also export a variable</div><div class="gmail_default" style="font-size:small">to record the result we checked? That does not make things be simple too.</div></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>