public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: fstests@vger.kernel.org
Cc: Chao Yu <chao@kernel.org>,
	jaegeuk@kernel.org, David Disseldorp <ddiss@suse.de>
Subject: [PATCH] f2fs/008: avoid endless wait
Date: Tue, 11 Mar 2025 16:03:47 +1100	[thread overview]
Message-ID: <20250311050346.5868-2-ddiss@suse.de> (raw)

"udevadm wait <dev>" without a --timeout=SECONDS parameter will wait
endlessly. Endless wait can be triggered in f2fs/008 by e.g. using a
zram device as a SCRATCH_DEV, where "device type is unknown" failure
sees the /dev/mapper/$vgname-$lvname node never appear.

Signed-off-by: David Disseldorp <ddiss@suse.de>
---
It might make more sense to add a default timeout to _udev_wait(), but
that could also call udev{adm }settle.

 tests/f2fs/008 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/f2fs/008 b/tests/f2fs/008
index 47696f2b..fdb0b0c2 100755
--- a/tests/f2fs/008
+++ b/tests/f2fs/008
@@ -35,9 +35,12 @@ _cleanup()
 	rm -f $tmp.*
 }
 
-$LVM_PROG pvcreate -f $SCRATCH_DEV >>$seqres.full 2>&1
-$LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1
-$LVM_PROG lvcreate -y -L 1024m -n $lvname $vgname >>$seqres.full 2>&1
+$LVM_PROG pvcreate -f $SCRATCH_DEV >>$seqres.full 2>&1 \
+	|| _notrun "unabled to create LVM physical volume"
+$LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1 \
+	|| _notrun "unabled to create LVM volume group"
+$LVM_PROG lvcreate -y -L 1024m -n $lvname $vgname >>$seqres.full 2>&1 \
+	|| _notrun "unabled to create LVM logical volume"
 _udev_wait /dev/mapper/$vgname-$lvname
 
 _mkfs_dev /dev/mapper/$vgname-$lvname >>$seqres.full 2>&1
-- 
2.43.0


             reply	other threads:[~2025-03-11  5:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11  5:03 David Disseldorp [this message]
2025-03-11 20:48 ` [PATCH] f2fs/008: avoid endless wait Dave Chinner
2026-03-19  0:55   ` [PATCH] avoid endless udevadm wait David Disseldorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250311050346.5868-2-ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=chao@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=jaegeuk@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox