Re: [PATCH] fstests: add btrfs fs-verity send/recv test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 15, 2022 at 01:57:56PM -0700, Boris Burkov wrote:
> diff --git a/tests/btrfs/271 b/tests/btrfs/271
> new file mode 100755
> index 00000000..93b34540
> --- /dev/null
> +++ b/tests/btrfs/271

There is already a btrfs/271, so this patch doesn't apply anymore.  Best to use
a higher number and let the maintainer renumber the test when applying.

> @@ -0,0 +1,114 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2022 YOUR NAME HERE.  All Rights Reserved.

YOUR NAME HERE is a great company to work for :-)

> +_require_test

I don't see where this uses the test filesystem; it seems to use scratch only.

> +	if [ $salt -eq 1 ]; then
> +		extra_args+=" --salt=deadbeef"
> +	fi

I like to use true and false for this sort of thing so you can just do:

	if $salt; then

> +	echo "check received subvolume..."
> +	echo 3 > /proc/sys/vm/drop_caches

A comment explaining why the drop_caches is needed would be helpful.
And should there be a sync before it, and should it be _scratch_cycle_mount?

> +	_fsv_measure $fsv_file > $tmp.digest-after
> +	$GETCAP_PROG $fsv_file > $tmp.cap-after
> +	diff $tmp.digest-before $tmp.digest-after
> +	diff $tmp.cap-before $tmp.cap-after
> +	_scratch_unmount
> +	echo OK

Should this compare the file's contents too?

- Eric



[Index of Archives]     [linux Cryptography]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux