mkswap01.sh: Add "udevadm trigger" before swap verification
PATCH 1/1 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.
--- testcases/commands/mkswap/mkswap01.sh | 2 ++ 1 file changed, 2 insertions(+)
testcases/commands/mkswap/mkswap01.sh +2 -0
@@ -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
Signature · 1 line
2.14.4
PATCH 1/1 mkswap01.sh: Add "udevadm trigger" before swap verification
Quoted 9 lines · Yongxin Liu
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.Signed-off-by Yongxin Liu <[email protected]>
Quoted 23 lines
--- testcases/commands/mkswap/mkswap01.sh | 2 ++ 1 file changed, 2 insertions(+)testcases/commands/mkswap/mkswap01.sh +2
-0@@ -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
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20191112/ef065f8c/attachment.htm>
Li Wang
AppliedPATCH 1/1 mkswap01.sh: Add "udevadm trigger" before swap verification
Merged, thanks!
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20191113/981ac8be/attachment.htm>
PATCH 1/1 mkswap01.sh: Add "udevadm trigger" before swap verification
In reply to Yongxin Liu----- Original Message -----
testcases/commands/mkswap/mkswap01.sh mkswap_test() · line 132
Quoted 10 lines
testcases/commands/mkswap/mkswap01.sh +1
-0@@ -129,6 +129,8 @@ mkswap_test() return fi + udevadm trigger --name-match=$TST_DEVICE
It's been many months since I looked at this,..
Can you explain why this fixes it?
Don't we need "udevadm settle" as well to make sure udev caught up before we check result?
Regards,
Jan
PATCH 1/1 mkswap01.sh: Add "udevadm trigger" before swap verification
----- Original Message -----
Quoted 12 lines
----- Original Message -----
Quoted 9 lines
testcases/commands/mkswap/mkswap01.sh +0
-0@@ -129,6 +129,8 @@ mkswap_test() return fi
Quoted 7 lines
testcases/commands/mkswap/mkswap01.sh mkswap_test() · line 132
Quoted 1 line
testcases/commands/mkswap/mkswap01.sh +1
-0+ udevadm trigger --name-match=$TST_DEVICEIt's been many months since I looked at this,..
Can you explain why this fixes it?Don't we need "udevadm settle" as well to make sure udev caught up before we check result?
Ah, test is using TST_RETRY_FUNC, so udev should have time to catch up. Please ignore my query.
Thanks,
Jan