On Jul 14, 2025 / 16:02, Shin'ichiro Kawasaki wrote: > The test case repeats creating and deleting a loop device. This > generates many udev events and makes following test cases fail. To avoid > the unexpected test case failures, drain the udev events by restarting > the systemd-udevd service at the end of the test case. Alan, John, I sent out this patch with wrong CC list, then it reached to you. Sorry about this noise. Yi, Bart, Gulam and Daniel, you should have been CCed to this post. Thank you for the fix discussion. > > Link: https://github.com/linux-blktests/blktests/issues/181 > Reported-by: Yi Zhang <yi.zhang@xxxxxxxxxx> > Suggested-by: Bart Van Assche <bvanassche@xxxxxxx> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> > --- > tests/loop/010 | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tests/loop/010 b/tests/loop/010 > index 309fd8a..6d4b9fb 100755 > --- a/tests/loop/010 > +++ b/tests/loop/010 > @@ -78,5 +78,12 @@ test() { > if _dmesg_since_test_start | grep --quiet "$grep_str"; then > echo "Fail" > fi > + > + # The repeated loop device creation and deletions generated so many udev > + # events. Drain the events to not influence following test cases. > + if systemctl is-active systemd-udevd.service >/dev/null; then > + systemctl restart systemd-udevd.service > + fi > + > echo "Test complete" > } > -- > 2.50.1 >