On Wed, Aug 17, 2022 at 10:12:06PM -0700, Eric Biggers wrote: > 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. I thought that, but now it looks like we have btrfs/290 and 291 from the last tests I added :/ Will fix, though! > > > @@ -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