[LTP] [PATCH 1/2] ioctl09: wait for udevd complete the uevent handling

Cyril Hrubis chrubis@suse.cz
Wed Apr 20 14:52:11 CEST 2022


Hi!
> timeout isn't that enough? And if it isn't wouldn't simply increasing
> > the timeout to a minute or two fix the issue?
> >
> 
> 
> That should be better, I just have a try on my reproducible system,
> but it does not work with enlarged to 180 seconds.

You have to set the test timeout to be four times of this timeout
otherwise it will report that the test had timeouted sporadically.

> ioctl09.c:52: TPASS: access /dev/loop0p1 succeeds
> octl09.c:47: TFAIL: access /sys/block/loop0/loop0p2 fails
> Test timeouted, sending SIGKILL!
> tst_test.c:1509: TINFO: If you are running on slow machine, try exporting
> LTP_TIMEOUT_MUL > 1
> tst_test.c:1511: TBROK: Test killed! (timeout?)
> 
> 
> Note, the `udevadm settle` uses 180s as default timeout as well,
> but it can work, I will look into udevadm.c to see if that does
> something additional besides the waiting.

I guess that the difference is that when we wait on a socket actively we
return sooner than with the exp backoff. By definition the exp backoff
may wait for twice as long as the udevadm and because of that the test
may actually timeout because we waited just a little bit longer.

> If so, we might need to remove the TST_RETRY_FN_EXP_BACKOFF
> from this test.

That would be valid option, remove the exp backoff and wait activelly.
Btw we already have an infrastructure for matching kernel event uevents
in the kernel/uevent/ directory. If we split the uevent.h there into a
header and libs/ltpuevent/ we could simply wait for the event by filling
in the uevent_desc structure and calling wait_for_uevents().

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list