xfs/419: remove irrelevant swapfile test
[xfstests-dev.git] / common / filestreams
index f5441f5a82e908b94096d277cc27e3d508df90bf..8165effea3ac6838b1c999c8836cc1f4861a6eb3 100644 (file)
@@ -1,23 +1,8 @@
 ##/bin/bash
-#
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2007 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
-#
-#
 # Core of filestreams tests.
-#
 
 _check_filestreams_support()
 {
@@ -105,17 +90,22 @@ _test_streams() {
        local use_directio="$7"
        local expected_result="$8"      # "fail" if failure is expected
 
+       # Disable the scratch rt device to avoid test failures relating to the
+       # rt bitmap consuming free space in our small data device and throwing
+       # off the filestreams allocator.
+       unset SCRATCH_RTDEV
+
        local size=`expr $agsize \* 1024 \* 1024 \* $agcount`
        _scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \
                || _fail "mkfs failed"
 
        if [ "$use_iflag" = "0" ]; then
                # mount using filestreams mount option
-               _scratch_mount "-o filestreams" \
+               _try_scratch_mount "-o filestreams" \
                        || _fail "filestreams mount failed"
        else
                # test will set inode flag
-               _scratch_mount || _fail "mount failed"
+               _scratch_mount
        fi
 
        cd $SCRATCH_MNT