<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Richard Palethorpe <span dir="ltr"><<a href="mailto:rpalethorpe@suse.de" target="_blank">rpalethorpe@suse.de</a>></span> wrote:<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<span><br>
Richard Palethorpe <<a href="mailto:rpalethorpe@suse.com" target="_blank">rpalethorpe@suse.com</a>> writes:<br>
<br>
> /**<br>
> * tst_fzsync_pair_wait_update_{a<wbr>,b} - Wait and then recalculate<br>
> *<br>
> @@ -301,10 +311,26 @@ static inline int tst_fzsync_wait_b(struct tst_fzsync_pair *pair)<br>
> static inline int tst_fzsync_wait_update_a(struc<wbr>t tst_fzsync_pair *pair)<br>
> {<br>
> static int loop_index;<br>
> + int timer_state = tst_timer_state_ms(60000);<br>
> + int exit = 0;<br>
> +<br>
> + if (!(timer_state & TST_TIMER_STARTED)) {<br>
> + tst_timer_start(CLOCK_MONOTON<wbr>IC_RAW);<br>
> + } else if (timer_state & TST_TIMER_EXPIRED) {<br>
> + tst_res(TINFO,<br>
> + "Exceeded fuzzy sync time limit, requesting exit");<br>
> + exit = 1;<br>
<br>
</span>This is not going to work with the -i argument or if the test author<br>
also wants to use tst_timer. I'm going to have to do something<br>
different.</blockquote><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Yes, good catch. I didn't realized that when reviewing the patch.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Maybe we can try to leave the expired time judgement in fzync library and</div><div class="gmail_default" style="font-size:small">without using any LTP timer API. But for the -i parameter, it seems hard to</div><div class="gmail_default" style="font-size:small">set pair->exit to 0 at a proper time :(.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Now I'm thinking that why not to redesign/improve the fzync first and then</div><div class="gmail_default" style="font-size:small">solve the timeout issue. It will be easier than current situation I guess.</div><div class="gmail_default" style="font-size:small"><br></div></div>-- <br><div class="gmail-m_-7979428937008368592m_4876381456216847100gmail-m_-7663150514355294356m_3911800576586558271m_7041929931819254752gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div>
</div></div>