From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: Eryu Guan <eguan@redhat.com>
Subject: [PATCH RESEND] check: source common/rc again if TEST_DEV was recreated
Date: Mon, 9 Oct 2017 16:16:57 +0800 [thread overview]
Message-ID: <20171009081657.GF10593@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20170802143915.19585-1-eguan@redhat.com>
If TEST_DEV is recreated by check, FSTYP derived from TEST_DEV
previously could be changed too and might not reflect the reality.
So source common/rc again with correct FSTYP to get fs-specific
configs, e.g. common/xfs.
For example, using this config-section config file, and run section
ext4 first then xfs, you can see:
our local _scratch_mkfs routine ...
./common/rc: line 825: _scratch_mkfs_xfs: command not found
check: failed to mkfs $SCRATCH_DEV using specified options
local.config:
[default]
RECREATE_TEST_DEV=true
TEST_DEV=/dev/sda5
SCRATCH_DEV=/dev/sda6
TEST_DIR=/mnt/test
SCRATCH_MNT=/mnt/scratch
[ext4]
MKFS_OPTIONS="-b 4096"
FSTYP=ext4
[xfs]
FSTYP=xfs
MKFS_OPTIONS="-f -b size=4k"
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
check | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/check b/check
index f8db3cd6dfab..07586ce463c4 100755
--- a/check
+++ b/check
@@ -555,6 +555,10 @@ for section in $HOST_OPTIONS_SECTIONS; do
status=1
exit
fi
+ # TEST_DEV has been recreated, previous FSTYP derived from
+ # TEST_DEV could be changed, source common/rc again with
+ # correct FSTYP to get FSTYP specific configs, e.g. common/xfs
+ . common/rc
_prepare_test_list
elif [ "$OLD_TEST_FS_MOUNT_OPTS" != "$TEST_FS_MOUNT_OPTS" ]; then
_test_unmount 2> /dev/null
--
2.13.3
next prev parent reply other threads:[~2017-10-09 8:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 14:39 [PATCH 1/2] common/config: unset TEST_FS_MOUNT_OPTS across config sections Eryu Guan
2017-08-02 14:39 ` [PATCH 2/2] check: source common/rc again if TEST_DEV was recreated Eryu Guan
2017-08-07 6:28 ` Xiao Yang
2017-08-15 4:00 ` Eryu Guan
2017-08-07 6:12 ` [PATCH 1/2] common/config: unset TEST_FS_MOUNT_OPTS across config sections Xiao Yang
2017-10-09 8:16 ` Eryu Guan [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-11-17 7:00 [PATCH RESEND] check: source common/rc again if TEST_DEV was recreated Eryu Guan
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=20171009081657.GF10593@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.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