[PATCH blktests 2/2] loop/006: settle udev before completing the test

Sebastian Chlad <[email protected]>
Newsgroups org.kernel.vger.linux-block
Message-ID <[email protected]>
Ensures udev has processed the burst of attach/detach/LOOP_CHANGE_FD
activity generated by this test before control is handed back, so it
does not leave a backlog for the next test to contend with.

Signed-off-by: Sebastian Chlad <[email protected]>
---
 tests/loop/006 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/loop/006 b/tests/loop/006
index 549c112..701d44c 100755
--- a/tests/loop/006
+++ b/tests/loop/006
@@ -69,5 +69,10 @@ test() {
 	fi
 	losetup -d "$loop_dev"
 
+	# Let udev catch up on the attach/detach/change-fd before
+	# handing control back, so it doesn't leave a backlog for
+	# whatever test runs next.
+	udevadm settle
+
 	echo "Test complete"
 }
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.