<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Richard Palethorpe <<a href="mailto:rpalethorpe@suse.de" target="_blank">rpalethorpe@suse.de</a>> wrote:<br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> -/*<br>
> - * setup() - performs all the ONE TIME setup for this test.<br>
> - */<br>
> -void setup(void)<br>
> -{<br>
> + set_setitimer_value(USEC2, USEC2);<br>
> + TST_EXP_PASS(sys_setitimer(tc->which, value, ovalue));<br>
> <br>
> - tst_sig(NOFORK, DEF_HANDLER, cleanup);<br>
> + if (ovalue->it_value.tv_sec != 0 || ovalue->it_value.tv_usec >= USEC2)<br>
> + tst_brk(TFAIL, "old timer value is not within<br>
> the expected range");<br>
<br>
Maybe we could split testing the return value and ovalue from testing<br>
the signal is delivered?<br>
<br>
When testing the return value and ovalue; a very long timeout can be<br>
used (which is never hit). When testing the signal a very short one can<br>
be used.<br>
<br>
This way, the test is not racing with the signal and the loop below<br>
won't be executed much.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Very good point. Also, I plan to add the 'it_interval' check to</div><div class="gmail_default" style="font-size:small">verify the periodic timer, which will make the functionality test</div><div class="gmail_default" style="font-size:small">more complete.</div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This will be achieved in a separate patch.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
In any case LGTM<br>
<br>
Reviewed-by: Richard Palethorpe <<a href="mailto:rpalethorpe@suse.com" target="_blank">rpalethorpe@suse.com</a>><br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Thanks for the review.</div><div class="gmail_default" style="font-size:small"><br></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>