diff options
author | Mariano López <just.another.mariano@gmail.com> | 2019-06-13 22:32:40 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-14 22:48:22 +0100 |
commit | fbee8ff72a3848505871b37948c6f4bea4a59745 (patch) | |
tree | d67f063b0d57baa6106bc05f18002da14c695d41 /meta/recipes-core | |
parent | 3c5fb84222b70cc206b56bfa16b2e91427b8f97f (diff) | |
download | poky-fbee8ff72a3848505871b37948c6f4bea4a59745.tar.gz |
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: f7becf0b5743dfbee06b354a086dc553db2b1348)
Signed-off-by: Mariano López <just.another.mariano@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 4 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux/run-ptest | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index df1d1224dd..1d279a58aa 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() { | |||
318 | sed -i -e \ | 318 | sed -i -e \ |
319 | '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ | 319 | '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ |
320 | ${D}${PTEST_PATH}/tests/commands.sh | 320 | ${D}${PTEST_PATH}/tests/commands.sh |
321 | |||
322 | |||
323 | sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest | ||
324 | |||
321 | } | 325 | } |
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 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | |||
4 | # When udevd (from eudev) is running most eject/mount tests will fail because | ||
5 | # of automount. We need to stop udevd before executing util-linux's tests. | ||
6 | # The systemd-udevd daemon doesn't change the outcome of util-linux's tests. | ||
7 | UDEV_PID="`pidof "@base_sbindir@/udevd"`" | ||
8 | if [ "x$UDEV_PID" != "x" ]; then | ||
9 | /etc/init.d/udev stop | ||
10 | fi | ||
11 | |||
3 | current_path=$(readlink -f $0) | 12 | current_path=$(readlink -f $0) |
4 | export bindir=$(dirname $current_path) | 13 | export bindir=$(dirname $current_path) |
5 | export PATH=$bindir/bin:$PATH | 14 | export PATH=$bindir/bin:$PATH |
@@ -27,3 +36,8 @@ do | |||
27 | }' | 36 | }' |
28 | done | 37 | done |
29 | 38 | ||
39 | |||
40 | if [ "x$UDEV_PID" != "x" ]; then | ||
41 | /etc/init.d/udev start | ||
42 | fi | ||
43 | |||