* [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification
@ 2019-11-12 3:52 Yongxin Liu
2019-11-12 6:12 ` Li Wang
2019-11-13 16:22 ` Jan Stancek
0 siblings, 2 replies; 5+ messages in thread
From: Yongxin Liu @ 2019-11-12 3:52 UTC (permalink / raw)
To: ltp
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 <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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification
2019-11-12 3:52 [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification Yongxin Liu
@ 2019-11-12 6:12 ` Li Wang
2019-11-13 9:25 ` Li Wang
2019-11-13 16:22 ` Jan Stancek
1 sibling, 1 reply; 5+ messages in thread
From: Li Wang @ 2019-11-12 6:12 UTC (permalink / raw)
To: ltp
On Tue, Nov 12, 2019 at 1:01 PM Yongxin Liu <yongxin.liu@windriver.com>
wrote:
> 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 <yongxin.liu@windriver.com>
>
Acked-by: Li Wang <liwang@redhat.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
>
>
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191112/ef065f8c/attachment.htm>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification
2019-11-12 6:12 ` Li Wang
@ 2019-11-13 9:25 ` Li Wang
0 siblings, 0 replies; 5+ messages in thread
From: Li Wang @ 2019-11-13 9:25 UTC (permalink / raw)
To: ltp
Merged, thanks!
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191113/981ac8be/attachment.htm>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification
2019-11-12 3:52 [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification Yongxin Liu
2019-11-12 6:12 ` Li Wang
@ 2019-11-13 16:22 ` Jan Stancek
2019-11-13 16:27 ` Jan Stancek
1 sibling, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2019-11-13 16:22 UTC (permalink / raw)
To: ltp
----- Original Message -----
> 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
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification
2019-11-13 16:22 ` Jan Stancek
@ 2019-11-13 16:27 ` Jan Stancek
0 siblings, 0 replies; 5+ messages in thread
From: Jan Stancek @ 2019-11-13 16:27 UTC (permalink / raw)
To: ltp
----- Original Message -----
>
>
> ----- Original Message -----
> > 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
>
> 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?
Ah, test is using TST_RETRY_FUNC, so udev should have time
to catch up. Please ignore my query.
Thanks,
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-13 16:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 3:52 [LTP] [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification Yongxin Liu
2019-11-12 6:12 ` Li Wang
2019-11-13 9:25 ` Li Wang
2019-11-13 16:22 ` Jan Stancek
2019-11-13 16:27 ` Jan Stancek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.