[oe-commits] [openembedded-core] 01/18: util-linux: Stop udevd to run ptests

git at git.openembedded.org git at git.openembedded.org
Sun Jun 30 21:34:45 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch warrior
in repository openembedded-core.

commit 3d62aaa8d06387053f98e4156dc8920e2e97feea
Author: Mariano López <just.another.mariano at gmail.com>
AuthorDate: Thu Jun 13 22:32:40 2019 -0500

    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]
    
    Signed-off-by: Mariano López <just.another.mariano at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-core/util-linux/util-linux.inc       |  4 ++++
 meta/recipes-core/util-linux/util-linux/run-ptest | 14 ++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 7b9b4d2..a61bc78 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -318,4 +318,8 @@ do_install_ptest() {
     sed -i -e \
          '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \
          ${D}${PTEST_PATH}/tests/commands.sh
+
+
+    sed -i 's|@base_sbindir@|${base_sbindir}|g'       ${D}${PTEST_PATH}/run-ptest
+
 }
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest
index 0324832..e135ee5 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 @@
 #!/bin/sh
 
+
+# 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
+fi
+
 current_path=$(readlink -f $0)
 export bindir=$(dirname $current_path)
 export PATH=$bindir/bin:$PATH
@@ -27,3 +36,8 @@ do
    }' 
 done
 
+
+if [ "x$UDEV_PID" != "x" ]; then
+    /etc/init.d/udev start
+fi
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list