From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: David Sterba <dsterba@suse.com>,
Nikolay Borisov <nborisov@suse.com>,
Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>
Subject: Re: [RFC PATCH v5 7/7] btrfs-progs: add test override for mkfs to use different checksums
Date: Wed, 25 Sep 2019 19:20:36 +0200 [thread overview]
Message-ID: <20190925172036.GK2751@twin.jikos.cz> (raw)
In-Reply-To: <20190925133728.18027-8-jthumshirn@suse.de>
On Wed, Sep 25, 2019 at 03:37:28PM +0200, Johannes Thumshirn wrote:
> Similar to check's test overrides add an override for mkfs tests so we can
> specify different mkfs flags.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
> tests/common | 10 ++++++++--
> tests/mkfs-tests/001-basic-profiles/test.sh | 8 +++++++-
> 2 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/tests/common b/tests/common
> index 75e5540155cc..5148820bef58 100644
> --- a/tests/common
> +++ b/tests/common
> @@ -473,16 +473,22 @@ prepare_test_dev()
> # $1-$n: optional, default is -f
> run_check_mkfs_test_dev()
> {
> + MKFS_ARGS="$@"
> +
> setup_root_helper
>
> # check accidental files/devices passed
> - for opt in "$@"; do
> + for opt in "$MKFS_ARGS"; do
> if [ -f "$opt" -o -b "$opt" ]; then
> _fail "ERROR: unexpected option for run_check_mkfs_test_dev: device"
> fi
> done
>
> - run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$@" "$TEST_DEV"
> + if [ "$TEST_ENABLE_OVERRIDE" = 'true' ]; then
> + MKFS_ARGS="$TEST_ARGS_MKFS $MKFS_ARGS"
> + fi
> +
> + run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$MKFS_ARGS" "$TEST_DEV"
> }
>
> run_check_mount_test_dev()
> diff --git a/tests/mkfs-tests/001-basic-profiles/test.sh b/tests/mkfs-tests/001-basic-profiles/test.sh
> index 6e295274119d..e0110c722555 100755
> --- a/tests/mkfs-tests/001-basic-profiles/test.sh
> +++ b/tests/mkfs-tests/001-basic-profiles/test.sh
> @@ -21,7 +21,13 @@ test_get_info()
> }
> test_do_mkfs()
> {
> - run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$@"
> + MKFS_ARGS="$@"
> +
> + if [ "$TEST_ENABLE_OVERRIDE" = 'true' ]; then
> + MKFS_ARGS="$TEST_ARGS_MKFS $MKFS_ARGS"
> + fi
> +
> + run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$MKFS_ARGS"
This is supposed to be transparent for all tests, so all the override
happens inside tests/common in _cmd_spec, so all what's needed is to add
a line to the 'case'.
next prev parent reply other threads:[~2019-09-25 17:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 13:37 [PATCH v5 0/7] btrfs-progs: support xxhash64 checksums Johannes Thumshirn
2019-09-25 13:37 ` [PATCH v5 1/7] btrfs-progs: add option for checksum type to mkfs Johannes Thumshirn
2019-09-25 13:50 ` Johannes Thumshirn
2019-09-25 14:01 ` Johannes Thumshirn
2019-09-25 16:48 ` David Sterba
2019-09-25 13:37 ` [PATCH v5 2/7] btrfs-progs: add is_valid_csum_type() helper Johannes Thumshirn
2019-09-25 13:37 ` [PATCH v5 3/7] btrfs-progs: add table for checksum type and name Johannes Thumshirn
2019-09-25 13:37 ` [PATCH v5 4/7] btrfs-progs: also print checksum type when running mkfs Johannes Thumshirn
2019-09-25 13:37 ` [PATCH v5 5/7] btrfs-progs: add xxhash64 to mkfs Johannes Thumshirn
2019-09-26 10:06 ` Johannes Thumshirn
2019-09-26 11:24 ` David Sterba
2019-09-26 10:11 ` [PATCH v6] " Johannes Thumshirn
2019-10-07 11:11 ` Qu Wenruo
2019-10-07 15:41 ` David Sterba
2019-09-25 13:37 ` [PATCH v5 6/7] btrfs-progs: move crc32c implementation to crypto/ Johannes Thumshirn
2019-09-25 13:37 ` [RFC PATCH v5 7/7] btrfs-progs: add test override for mkfs to use different checksums Johannes Thumshirn
2019-09-25 17:20 ` David Sterba [this message]
2019-09-25 17:22 ` [PATCH v5 0/7] btrfs-progs: support xxhash64 checksums David Sterba
2019-09-26 6:49 ` Johannes Thumshirn
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=20190925172036.GK2751@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=jthumshirn@suse.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).