xfs: add a _require_xfs_copy helper
[xfstests-dev.git] / tests / xfs / 284
index d0eb5bd6b8e0734e9136e1870ba8c24e2d718441..8f997e17325314e8cf85f490cf6c1f243b465384 100755 (executable)
@@ -1,27 +1,12 @@
 #! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2016 Red Hat.  All Rights Reserved.
+#
 # FS QA Test 284
 #
 # Do xfs_metadump, xfs_mdrestore, xfs_copy, xfs_db, xfs_repair and mkfs.xfs
 # on mounted XFS to make sure they refuse to proceed.
 #
-#-----------------------------------------------------------------------
-# Copyright (c) 2016 Red Hat.  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
-#-----------------------------------------------------------------------
-#
-
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
@@ -49,10 +34,10 @@ rm -f $seqres.full
 # real QA test starts here
 _supported_fs xfs
 _supported_os Linux
-# xfs_copy does not support realtime devices
-_require_no_realtime
+_require_xfs_copy
 _require_test
 _require_scratch
+_require_no_large_scratch_dev
 
 function filter_mounted()
 {
@@ -64,6 +49,7 @@ COPY_FILE="${TEST_DIR}/${seq}_copyfile"
 
 # Test dump a mounted device
 # xfs_metadump should refuse to dump a mounted device
+_scratch_mkfs >> $seqres.full 2>&1
 _scratch_mount
 _scratch_metadump $METADUMP_FILE 2>&1 | filter_mounted
 _scratch_unmount