mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
+6
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user