aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch
blob: 1b433d3ad350c7dcb4eb3ac53d5b448b57d6ab85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From fae8852a63d9fa6e56fb8b24eaf10560bd13757f Mon Sep 17 00:00:00 2001
From: Yongxin Liu <yongxin.liu@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@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