From: David Sterba <dsterba@suse.cz>
To: Boris Burkov <boris@bur.io>
Cc: linux-btrfs@vger.kernel.org, linux-fscrypt@vger.kernel.org,
fstests@vger.kernel.org
Subject: Re: [PATCH v3] fstests: add btrfs fs-verity send/recv test
Date: Fri, 19 Aug 2022 13:09:17 +0200 [thread overview]
Message-ID: <20220819110917.GQ13489@twin.jikos.cz> (raw)
In-Reply-To: <e1e77ce5d7277b235e48adc8daf00a0dc0ae36e9.1660860807.git.boris@bur.io>
On Thu, Aug 18, 2022 at 03:16:30PM -0700, Boris Burkov wrote:
> Test btrfs send/recv support for fs-verity. Includes tests for
> signatures, salts, and interaction with chmod/caps. The last of those is
> to ensure the various features that go in during inode_finalize interact
> properly.
>
> This depends on the kernel patch adding support for send:
> btrfs: send: add support for fs-verity
>
> And the btrfs-progs patch adding support for recv:
> btrfs-progs: receive: add support for fs-verity
>
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
> Changes for v3:
> - commit a few things from v2 that I left unstaged (277 in output,
> true/false)
> Changes for v2:
> - btrfs/271 -> btrfs/277
> - YOUR NAME HERE -> Meta
> - change 0/1 to false/true
> - change drop caches to cycle mount
> - get rid of unneeded _require_test
> - compare file contents
>
> tests/btrfs/277 | 115 ++++++++++++++++++++++++++++++++++++++++++++
> tests/btrfs/277.out | 59 +++++++++++++++++++++++
> 2 files changed, 174 insertions(+)
> create mode 100755 tests/btrfs/277
> create mode 100644 tests/btrfs/277.out
>
> diff --git a/tests/btrfs/277 b/tests/btrfs/277
> new file mode 100755
> index 00000000..251e2818
> --- /dev/null
> +++ b/tests/btrfs/277
> @@ -0,0 +1,115 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2022 Meta, Inc. All Rights Reserved.
> +#
> +# FS QA Test 277
> +#
> +# Test sendstreams involving fs-verity enabled files.
> +#
> +. ./common/preamble
> +_begin_fstest auto quick verity send
> +
> +# Override the default cleanup function.
> +_cleanup()
> +{
> + cd /
> + _restore_fsverity_signatures
> + rm -r -f $tmp.*
> +}
> +
> +# Import common functions.
> +. ./common/filter
> +. ./common/verity
> +
> +# real QA test starts here
> +
> +# Modify as appropriate.
> +_supported_fs btrfs
> +_require_scratch_verity
> +_require_fsverity_builtin_signatures
> +_require_command "$SETCAP_PROG" setcap
> +_require_command "$GETCAP_PROG" getcap
> +
> +subv=$SCRATCH_MNT/subv
> +fsv_file=$subv/file.fsv
> +keyfile=$tmp.key.pem
> +certfile=$tmp.cert.pem
> +certfileder=$tmp.cert.der
> +sigfile=$tmp.sig
> +stream=$tmp.fsv.ss
> +
> +_test_send_verity() {
> + local sig=$1
> + local salt=$2
> + local extra_args=""
> +
> + _scratch_mkfs >> $seqres.full
> + _scratch_mount
> + echo -e "\nverity send/recv test: sig: $sig salt: $salt"
> + _disable_fsverity_signatures
> +
> + echo "create subvolume"
> + $BTRFS_UTIL_PROG subv create $subv >> $seqres.full
Please use full name of subcommands, ie. 'subvolume'
prev parent reply other threads:[~2022-08-19 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 22:16 [PATCH v3] fstests: add btrfs fs-verity send/recv test Boris Burkov
2022-08-18 22:32 ` Eric Biggers
2022-08-19 11:09 ` David Sterba [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=20220819110917.GQ13489@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=boris@bur.io \
--cc=fstests@vger.kernel.org \
--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