path: root/meta/recipes-core/util-linux/util-linux
diff options
authorMariano López <>2019-06-13 22:32:40 -0500
committerRichard Purdie <>2019-06-30 22:34:22 +0100
commit7f8cad5b1a7d72ba7225dcf42575971338d3b19b (patch)
tree3442af5c198bb1e0dea4e3fff322dc307c75654c /meta/recipes-core/util-linux/util-linux
parent048c1467e2e077076213ec01c4f0d1f181434e4c (diff)
util-linux: Stop udevd to run ptests
The util-linux's ptest uses the SCSI_DEBUG kernel module to create virtual SCSI disks. The automount feature of udevd will try to mount these disks by default. Because udevd controls the mount of the disks, the eject/mount tests will fail or be skipped. This change will stop udevd before executing the util-linux's ptest and start the daemon again after all the tests. This is for eudevd only, systemd-udevd doesn't present this problem because there are no automount rules. [YOCTO #13301] (From OE-Core rev: 3d62aaa8d06387053f98e4156dc8920e2e97feea) Signed-off-by: Mariano López <> Signed-off-by: Richard Purdie <> Signed-off-by: Armin Kuster <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux')
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest
index 03248325bf..e135ee583b 100644
--- a/meta/recipes-core/util-linux/util-linux/run-ptest
+++ b/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -1,5 +1,14 @@
+# When udevd (from eudev) is running most eject/mount tests will fail because
+# of automount. We need to stop udevd before executing util-linux's tests.
+# The systemd-udevd daemon doesn't change the outcome of util-linux's tests.
+UDEV_PID="`pidof "@base_sbindir@/udevd"`"
+if [ "x$UDEV_PID" != "x" ]; then
+ /etc/init.d/udev stop
current_path=$(readlink -f $0)
export bindir=$(dirname $current_path)
export PATH=$bindir/bin:$PATH
@@ -27,3 +36,8 @@ do
+if [ "x$UDEV_PID" != "x" ]; then
+ /etc/init.d/udev start