public inbox for linux-fscrypt@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Boris Burkov <boris@bur.io>
Cc: fstests@vger.kernel.org, linux-fscrypt@vger.kernel.org,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH v12 2/5] common/verity: support btrfs in generic fsverity tests
Date: Tue, 19 Jul 2022 11:47:26 -0700	[thread overview]
Message-ID: <Ytb8Pirys+103mHU@sol.localdomain> (raw)
In-Reply-To: <c2a3bcb8ff16fd6b1ce8c300ee5e8188ccaddb7a.1658188603.git.boris@bur.io>

On Mon, Jul 18, 2022 at 04:58:30PM -0700, Boris Burkov wrote:
> +# btrfs will return IO errors on corrupted data with or without fs-verity.
> +# to really test fs-verity, use nodatasum.
> +if [ "$FSTYP" == "btrfs" ]; then
> +        if [ -z $MOUNT_OPTIONS ]; then
> +                export MOUNT_OPTIONS="-o nodatasum"
> +        else
> +                export MOUNT_OPTIONS+=" -o nodatasum"
> +        fi
> +fi

$MOUNT_OPTIONS needs to be quoted in the if expression.  Otherwise -o is treated
as the OR operator.  Fun fact, [ -z -o foo ] evaluates to true...

> +	echo "Checking for SIGBUS or zeros..."
> +	<$tmp.eof_block_read grep -q -e '^Bus error$' \

This line is odd.  It would be easier to read as:

	grep -q -e '^Bus error$' $tmp.eof_block_read

Other than that, this patch looks fine.  Thanks!

- Eric

  reply	other threads:[~2022-07-19 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 23:58 [PATCH v12 0/5] tests for btrfs fsverity Boris Burkov
2022-07-18 23:58 ` [PATCH v12 1/5] common/verity: require corruption functionality Boris Burkov
2022-07-18 23:58 ` [PATCH v12 2/5] common/verity: support btrfs in generic fsverity tests Boris Burkov
2022-07-19 18:47   ` Eric Biggers [this message]
2022-07-18 23:58 ` [PATCH v12 3/5] btrfs: test btrfs specific fsverity corruption Boris Burkov
2022-07-18 23:58 ` [PATCH v12 4/5] btrfs: test verity orphans with dmlogwrites Boris Burkov
2022-07-19 20:31   ` Sweet Tea Dorminy
2022-07-18 23:58 ` [PATCH v12 5/5] generic: test fs-verity EFBIG scenarios Boris Burkov
2022-07-19 20:32 ` [PATCH v12 0/5] tests for btrfs fsverity Sweet Tea Dorminy

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=Ytb8Pirys+103mHU@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=boris@bur.io \
    --cc=fstests@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fscrypt@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