[oe-commits] [openembedded-core] 28/39: ltp: Add "udevadm trigger" before swap verification in mkswap01.sh

git at git.openembedded.org git at git.openembedded.org
Wed Nov 13 22:49:02 UTC 2019


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

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

commit 6a4b3bbdb3594ff7b6f81683765b6df76ed405e7
Author: Yongxin Liu <yongxin.liu at windriver.com>
AuthorDate: Wed Nov 13 14:48:55 2019 +0800

    ltp: Add "udevadm trigger" before swap verification in mkswap01.sh
    
    Swap verification sometimes fails due to race condition with udev.
    This is a known issue: https://github.com/linux-test-project/ltp/issues/458.
    "udevadm trigger" forces udev to sync up device events with kernel.
    
    Signed-off-by: Yongxin Liu <yongxin.liu at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...-Add-udevadm-trigger-before-swap-verifica.patch | 35 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20190517.bb          |  1 +
 2 files changed, 36 insertions(+)

diff --git a/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch b/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch
new file mode 100644
index 0000000..1b433d3
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch
@@ -0,0 +1,35 @@
+From fae8852a63d9fa6e56fb8b24eaf10560bd13757f Mon Sep 17 00:00:00 2001
+From: Yongxin Liu <yongxin.liu at windriver.com>
+Date: Tue, 12 Nov 2019 11:33:50 +0800
+Subject: [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification
+
+Fix: https://github.com/linux-test-project/ltp/issues/458
+
+Sometimes the swap device cannot show up in /dev/disk/by-uuid/
+or /dev/disk/by-lable/ due to the issue #458. When this issue
+happens, "blkid -c /dev/null" and "ls /dev/disk/by-uuid/" show
+different UUID of the device.
+
+Upstream-Status: Submitted [https://patchwork.ozlabs.org/patch/1193414]
+
+Signed-off-by: Yongxin Liu <yongxin.liu at windriver.com>
+---
+ testcases/commands/mkswap/mkswap01.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh
+index 3a348c6e6..9437c4a4e 100755
+--- a/testcases/commands/mkswap/mkswap01.sh
++++ b/testcases/commands/mkswap/mkswap01.sh
+@@ -129,6 +129,8 @@ mkswap_test()
+ 		return
+ 	fi
+ 
++	udevadm trigger --name-match=$TST_DEVICE
++
+ 	if [ -n "$device" ]; then
+ 		mkswap_verify "$mkswap_op" "$op_arg" "$device" "$size" "$dev_file"
+ 		if [ $? -ne 0 ]; then
+-- 
+2.14.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb b/meta/recipes-extended/ltp/ltp_20190517.bb
index 5915b1c..47aa967 100644
--- a/meta/recipes-extended/ltp/ltp_20190517.bb
+++ b/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -50,6 +50,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \
            file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \
            file://0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch \
+           file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
            "
 
 S = "${WORKDIR}/git"

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


More information about the Openembedded-commits mailing list