xfs/{019, 031}: make sure we don't set rtinherit=1 on mkfs
[xfstests-dev.git] / tests / xfs / 019
index 4d2fdedae3324fdb3595e24c3d5a6a627ff6d730..aa5365e7d07abb6904e6ea89ad15e8efb01caf38 100755 (executable)
@@ -1,27 +1,11 @@
 #! /bin/bash
-# FS QA Test No. 019
-#
-# mkfs protofile test
-#
-#-----------------------------------------------------------------------
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2000-2004 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. 019
 #
-#-----------------------------------------------------------------------
+# mkfs protofile test
 #
-
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
@@ -63,10 +47,15 @@ _filter_stat()
 
 # real QA test starts here
 _supported_fs xfs
-_supported_os IRIX Linux
+_supported_os Linux
 
 _require_scratch
 
+# mkfs cannot create a filesystem with protofiles if realtime is enabled, so
+# don't run this test if the rtinherit is anywhere in the mkfs options.
+echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
+       _notrun "Cannot mkfs with a protofile and -d rtinherit."
+
 protofile=$tmp.proto
 tempfile=$tmp.file
 
@@ -122,7 +111,7 @@ _verify_fs()
 
        echo "*** mount FS"
        _full " mount"
-       _scratch_mount >>$seqfull 2>&1 \
+       _try_scratch_mount >>$seqfull 2>&1 \
                || _fail "mount failed"
 
        echo "*** verify FS"