#! /bin/bash
-# FS QA Test No. 073
-#
-# Test xfs_copy
-#
-#-----------------------------------------------------------------------
+# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2000-2003,2008 Silicon Graphics, Inc. All Rights Reserved.
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+# FS QA Test No. 073
#
-#-----------------------------------------------------------------------
+# Test xfs_copy
#
-
seq=`basename $0`
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
diff -u $tmp.manifest1 $tmp.manifest2
echo comparing new image geometry to old
- xfs_info $source_dir \
+ $XFS_INFO_PROG $source_dir \
| _filter_copy $source $source_dir '/dev/loop.' '#' \
| tr -s ' ' \
> $tmp.geometry1
- xfs_info $target_dir \
+ $XFS_INFO_PROG $target_dir \
| _filter_copy $target $target_dir '/dev/loop.' '#' \
| tr -s ' ' \
> $tmp.geometry2
_supported_os Linux
_require_test
_require_attrs
-
-[ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices"
-[ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed"
-
+_require_xfs_copy
_require_scratch
_require_loop
rm -f $seqres.full
_scratch_mkfs_xfs -dsize=41m,agcount=2 >>$seqres.full 2>&1
-_scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
+_scratch_mount
echo
echo === populating scratch device