On 30.08.21 г. 13:56, Filipe Manana wrote: > On Mon, Aug 30, 2021 at 8:18 AM Nikolay Borisov <nborisov@xxxxxxxx> wrote: >> >> >> >> <snip> >>> Finally, this would also be a good opportunity to test regular renames >>> with subvolumes too, as we had bugs and regressions in the past like >>> in commit 4871c1588f92c6c13f4713a7009f25f217055807 ("Btrfs: use right >>> root when checking for hash collision >>> "), and never got any test cases for them. >> >> What specific tests do you have in mind? Ordinary renames of files >> within a subvolume are already tested by merit of generic geneirc/02[345]. > > So besides the case mentioned in that patch's changelog (renaming a > subvolume), checking that we can't rename an inode across subvolumes. > Something like checking that: > > rename /mnt/subvol1/file /mnt/subvol2/file > > fails with -EXDEV. But this is already checked by merit of using this line: _rename_tests_source_dest $SCRATCH_MNT/subvol1/src $SCRATCH_MNT/subvol2/dst "cross-subvol" "-x" it tests multiple combinations of regular/symbolic/directory/dev/null pairs. I.e : cross-subvol regu/regu -> Invalid cross-device link So this is already covered I'd say. Or you mean to test those combinations even without rename exchange, which would boil down to calling _rename_tests_source_dest without the -x flag. > > Thanks. > > >> >> The test in the patch you cited is basically renaming a subvolume within >> the same subvolume, that's easy enough. >> >> <snip> > > >