btrfs: reorder arguments so that options come first

The option parser in the btrfs utility is going to be updated and
will accept arguments in a stricter form, namely that options must
come before their non-option argument. Otherwise eg. the -f option
in send would be understood as another path and not an option
leading to many test failures.

The canonical form should be:

  btrfs command subcommand [-options] [arguments]

Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
David Sterba
2017-03-30 17:20:18 +02:00
committed by Eryu Guan
parent 5d36d8585a
commit df8c7225ba
40 changed files with 189 additions and 188 deletions
+6 -6
View File
@@ -105,10 +105,10 @@ $FSSUM_PROG -A -f -w $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
$FSSUM_PROG -A -f -w $send_files_dir/2.fssum \
-x $SCRATCH_MNT/mysnap2/mysnap1 $SCRATCH_MNT/mysnap2
$BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f \
$send_files_dir/1.snap 2>&1 1>/dev/null | _filter_scratch
$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 $SCRATCH_MNT/mysnap2 \
-f $send_files_dir/2.snap 2>&1 1>/dev/null | _filter_scratch
$BTRFS_UTIL_PROG send -f $send_files_dir/1.snap \
$SCRATCH_MNT/mysnap1 2>&1 1>/dev/null | _filter_scratch
$BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 -f $send_files_dir/2.snap \
$SCRATCH_MNT/mysnap2 2>&1 1>/dev/null | _filter_scratch
# Now recreate the filesystem by receiving both send streams and verify we get
# the same content that the original filesystem had.
@@ -116,9 +116,9 @@ _scratch_unmount
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/1.snap > /dev/null
$BTRFS_UTIL_PROG receive -f $send_files_dir/1.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
$BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $send_files_dir/2.snap > /dev/null
$BTRFS_UTIL_PROG receive -f $send_files_dir/2.snap $SCRATCH_MNT > /dev/null
$FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
status=0