xfs/27[26]: force realtime on or off as needed
[xfstests-dev.git] / tests / xfs / 272
index f8e9eb3f236456e852addb6cccc59c62853b227e..6c0fede5ab17ebc78aa6548b2d37787f1b3e64f6 100755 (executable)
@@ -1,25 +1,11 @@
 #! /bin/bash
-# FS QA Test No. 272
-#
-# Check that getfsmap agrees with getbmap.
-#
-#-----------------------------------------------------------------------
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2016, Oracle and/or its affiliates.  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.
+# FS QA Test No. 272
 #
-# 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.
+# Check that getfsmap agrees with getbmap.
 #
-# 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"
@@ -40,7 +26,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_supported_os Linux
 _supported_fs xfs
 _require_xfs_scratch_rmapbt
 _require_xfs_io_command "fsmap"
@@ -52,9 +37,12 @@ echo "Format and mount"
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
 
+# Make sure everything is on the data device
+$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
+
 _pwrite_byte 0x80 0 737373 $SCRATCH_MNT/urk >> $seqres.full
 sync
-./src/punch-alternating $SCRATCH_MNT/urk >> $seqres.full
+$here/src/punch-alternating $SCRATCH_MNT/urk >> $seqres.full
 ino=$(stat -c '%i' $SCRATCH_MNT/urk)
 
 echo "Get fsmap" | tee -a $seqres.full