From: cem@kernel.org
To: fstests@vger.kernel.org
Cc: zlang@kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH] common: fix rt_ops setup in _scratch_mkfs_sized
Date: Fri, 8 Sep 2023 14:12:34 +0200 [thread overview]
Message-ID: <20230908121234.553218-1-cem@kernel.org> (raw)
From: Carlos Maiolino <cem@kernel.org>
Tests using _scratch_mkfs_sized() will fail if SCRATCH_RTDEV is set,
but, USE_EXTERNAL is not, this happens because the function pass
"-r size=$fssize" to the _scratch_mkfs_xfs argument line, which in turn
will not set rtdev because USE_EXTERNAL is not set.
Tests like xfs/015 will fail as:
xfs/015 6s ... [failed, exit status 1]- output mismatch
.
.
+size specified for non-existent rt subvolume
+Usage: mkfs.xfs
.
.
with this patch the test runs properly using the rtdev if USE_EXTERNAL
is set.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
Particularly I think SCRATCH_RTDEV should not depend on USE_EXTERNAL, as the
latter is also linked to external logdevs, but I noticed tests specific for RT
devices also set USE_EXTERNAL, so I opted to change it according to the current
usage
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 1618ded5..20608fbe 100644
--- a/common/rc
+++ b/common/rc
@@ -965,7 +965,7 @@ _scratch_mkfs_sized()
[ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small"
fi
- if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_RTDEV" ]; then
+ if [ "$FSTYP" = "xfs" ] && [ "$USE_EXTERNAL" = yes -a -b "$SCRATCH_RTDEV" ]; then
local rtdevsize=`blockdev --getsize64 $SCRATCH_RTDEV`
[ "$fssize" -gt "$rtdevsize" ] && _notrun "Scratch rt device too small"
rt_ops="-r size=$fssize"
--
2.39.2
next reply other threads:[~2023-09-08 12:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 12:12 cem [this message]
2023-09-08 14:13 ` [PATCH] common: fix rt_ops setup in _scratch_mkfs_sized Zorro Lang
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=20230908121234.553218-1-cem@kernel.org \
--to=cem@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@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 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.