mirror of
git://git.yoctoproject.org/poky
synced 2026-09-07 21:34:02 +00:00
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>
44 lines
1.2 KiB
Bash
44 lines
1.2 KiB
Bash
#!/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
|
|
|
|
cd tests || exit 1
|
|
|
|
comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
|
|
|
|
|
|
echo
|
|
echo "-------------------- util-linux regression tests --------------------"
|
|
echo
|
|
echo " For development purpose only. "
|
|
echo " Don't execute on production system! "
|
|
echo
|
|
|
|
res=0
|
|
count=0
|
|
for ts in $comps;
|
|
do
|
|
$ts | sed -u '{
|
|
s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
|
|
s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
|
|
s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/
|
|
}'
|
|
done
|
|
|
|
|
|
if [ "x$UDEV_PID" != "x" ]; then
|
|
/etc/init.d/udev start
|
|
fi
|
|
|