From: Marcos Paulo de Souza <mpdesouza@suse.de>
To: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Cc: dsterba@suse.com, linux-btrfs@vger.kernel.org,
Marcos Paulo de Souza <mpdesouza@suse.com>,
wqu@suse.com
Subject: Re: [btrfs-progs PATCHv2 1/4] tests: common: Add check_dm_target_support helper
Date: Tue, 17 Dec 2019 22:46:08 -0300 [thread overview]
Message-ID: <3d78ef75d1cc010f5ff2f7741f6276742cf225f7.camel@suse.de> (raw)
In-Reply-To: <20191218011925.19428-2-marcos.souza.org@gmail.com>
Forget this patch, I understood it wrong. I will add setup_root_helper
before the $SUDO_HELPER from v1 in a different patch.
On Tue, 2019-12-17 at 22:19 -0300, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
>
> This function will be used later to test if dm-thin is supported.
> Inspired by fstests.
>
> Suggested-by: Qu Wenruo <wqu@suse.com>
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> ---
> Changes from v1:
> Removed the $SUDO_HELPER variable when executing modprobe and
> dmsetup (Qu
> Wenruo)
>
> tests/common | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/tests/common b/tests/common
> index ca098444..20ad7fd9 100644
> --- a/tests/common
> +++ b/tests/common
> @@ -322,6 +322,19 @@ check_global_prereq()
> fi
> }
>
> +# check if the targets passed as arguments are available, and if not
> just skip
> +# the test
> +check_dm_target_support()
> +{
> + for target in "$@"; do
> + modprobe dm-$target >/dev/null 2>&1
> + dmsetup targets 2>&1 | grep -q ^$target
> + if [ $? -ne 0 ]; then
> + _not_run "This test requires dm $target
> support."
> + fi
> + done
> +}
> +
> check_image()
> {
> local image
next prev parent reply other threads:[~2019-12-18 1:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 1:19 [btrfs-progs PATCHv2 0/4] tests: do not fail if dm-thin is missing Marcos Paulo de Souza
2019-12-18 1:19 ` [btrfs-progs PATCHv2 1/4] tests: common: Add check_dm_target_support helper Marcos Paulo de Souza
2019-12-18 1:46 ` Marcos Paulo de Souza [this message]
2019-12-18 1:19 ` [btrfs-progs PATCHv2 2/4] tests: mkfs: 017: Use " Marcos Paulo de Souza
2019-12-18 1:19 ` [btrfs-progs PATCHv2 3/4] tests: mkfs: 005: " Marcos Paulo de Souza
2019-12-18 1:19 ` [btrfs-progs PATCHv2 4/4] tests: Do not fail is dmsetup is missing Marcos Paulo de Souza
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=3d78ef75d1cc010f5ff2f7741f6276742cf225f7.camel@suse.de \
--to=mpdesouza@suse.de \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=marcos.souza.org@gmail.com \
--cc=mpdesouza@suse.com \
--cc=wqu@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