All of lore.kernel.org
 help / color / mirror / Atom feed
From: Noah Massey <noah.massey@gmail.com>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: David Sterba <dsterba@suse.com>,
	Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2] btrfs-progs: fix zstd compression test on a kernel without ztsd support
Date: Wed, 4 Sep 2019 11:30:46 -0400	[thread overview]
Message-ID: <CADfjVriTtGZmhcXRS14gmS27g278zkvpgpUJ8g5VY4m+ryP4kA@mail.gmail.com> (raw)
In-Reply-To: <20190904081802.8985-1-jthumshirn@suse.de>

On Wed, Sep 4, 2019 at 4:19 AM Johannes Thumshirn <jthumshirn@suse.de> wrote:
>
> The test-case 'misc-tests/025-zstd-compression' is failing on a kernel or
> btrfs binary built without zstd compression support.
>
> Check if zstd compression is supported by either the kernel or the btrfs
> binary and if not skip the test-case.
>

s/either/both/; s/or/and/


> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
>
> ---
> Changes to v1:
> - Also check $TOP/btrfs not just the kernel for zstd support (Dave)
> ---
>  tests/misc-tests/025-zstd-compression/test.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/tests/misc-tests/025-zstd-compression/test.sh b/tests/misc-tests/025-zstd-compression/test.sh
> index 22795d27500e..d967e358fcb2 100755
> --- a/tests/misc-tests/025-zstd-compression/test.sh
> +++ b/tests/misc-tests/025-zstd-compression/test.sh
> @@ -6,6 +6,16 @@ source "$TEST_TOP/common"
>  check_prereq btrfs
>  check_global_prereq md5sum
>
> +if ! [ -f "/sys/fs/btrfs/features/compress_zstd" ]; then
> +       _not_run "kernel does not support zstd compression feature"
> +       exit
> +fi
> +
> +if ! ldd "$TOP/btrfs" | grep -q zstd; then
> +       _not_run "btrfs is not compiled with zstd compression support"
> +       exit
> +fi
> +
>  # Extract the test image
>  image=$(extract_image compress.raw.xz)
>
> --
> 2.16.4
>

      reply	other threads:[~2019-09-04 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04  8:18 [PATCH v2] btrfs-progs: fix zstd compression test on a kernel without ztsd support Johannes Thumshirn
2019-09-04 15:30 ` Noah Massey [this message]

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=CADfjVriTtGZmhcXRS14gmS27g278zkvpgpUJ8g5VY4m+ryP4kA@mail.gmail.com \
    --to=noah.massey@gmail.com \
    --cc=dsterba@suse.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-btrfs@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 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.