<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>> wrote:<br></div></div><div class="gmail_quote"><div><br></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>
> static void verify_ioctl(void)<br>
> {<br>
> + char cmd[BUFSIZ];<br>
> +<br>
> + sprintf(cmd, "udevadm <span class="gmail_default" style="font-size:small"></span>settle --exit-if-exists=%s", dev_path);<br>
> +<br>
> const char *const cmd_parted_old[] = {"parted", "-s", "test.img",<br>
> "mklabel", "msdos", "mkpart",<br>
> "primary", "ext4", "1M", "10M",<br>
> @@ -75,11 +79,13 @@ static void verify_ioctl(void)<br>
> <br>
> loopinfo.lo_flags = LO_FLAGS_PARTSCAN;<br>
> SAFE_IOCTL(dev_fd, LOOP_SET_STATUS, &loopinfo);<br>
> + tst_system(cmd);<br>
> check_partition(1, true);<br>
> check_partition(2, false);<br>
> <br>
> change_partition(cmd_parted_new);<br>
> TST_RETRY_FUNC(ioctl(dev_fd, BLKRRPART, 0), TST_RETVAL_EQ0);<br>
> + tst_system(cmd);<br>
> check_partition(1, true);<br>
> check_partition(2, true);<br>
<br>
We allready use <span class="gmail_default" style="font-size:small"></span><span class="gmail_default" style="font-size:small"></span>TST_RETRY_FN_EXP_BACKOFF() in there with 30 second<br></blockquote><div> </div><div><span class="gmail_default" style="font-size:small"></span>I have to say<span class="gmail_default" style="font-size:small">,</span> for most systems 30<span class="gmail_default" style="font-size:small"> sec</span> is long enough, but we <span class="gmail_default" style="font-size:small">definitely</span> got</div><div><span class="gmail_default" style="font-size:small">sporadically fails in larger-scale automation testing.</span></div><div><span class="gmail_default" style="font-size:small"></span> </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">
timeout isn't that enough? And if it isn't wouldn't simply increasing<br>
the timeout to a minute or two fix the issue?<br></blockquote><div><br></div><div><br></div><div><div class="gmail_default" style="font-size:small">That should be better, I just have a try on my reproducible system,</div></div><div class="gmail_default" style="font-size:small">but it does not work with enlarged to 180 seconds.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">ioctl09.c:52: TPASS: access /dev/loop0p1 succeeds<br>octl09.c:47: TFAIL: access /sys/block/loop0/loop0p2 fails<br>Test timeouted, sending SIGKILL!<br>tst_test.c:1509: TINFO: If you are running on slow machine, try exporting LTP_TIMEOUT_MUL > 1<br>tst_test.c:1511: TBROK: Test killed! (timeout?)<br></div><div class="gmail_default"></div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Note, the `<span class="gmail_default"></span>udevadm <span class="gmail_default"></span>settle` uses 180s as default timeout as well,</div><div class="gmail_default" style="font-size:small">but it can work, I will look into udevadm.c to see if that does</div><div class="gmail_default" style="font-size:small">something additional besides the waiting.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If so, we might need to remove the <span class="gmail_default"></span>TST_RETRY_FN_EXP_BACKOFF</div><div class="gmail_default" style="font-size:small">from this test.</div></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>