#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
+#
# FS QA Test No. 384
#
# test to reproduce PV951636:
# project quotas not updated if a file is mv'd into that directory
#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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
-#
-#-----------------------------------------------------------------------
-#
-
seq=`basename $0`
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
# real QA test starts here
_supported_fs generic
-_supported_os Linux IRIX
+_supported_os Linux
_require_test
_require_quota
_require_xfs_quota_foreign
_require_xfs_io_command "chproj"
-# we can't run with group quotas
-_exclude_scratch_mount_option "gquota" "grpquota"
+# we can't run with group quotas (on v4 xfs); the mount options for group
+# quotas will be filtered out by _qmount_option below.
dir=$SCRATCH_MNT/project
_require_scratch
_scratch_mkfs >/dev/null 2>&1
_scratch_enable_pquota
-_require_prjquota $SCRATCH_DEV
_qmount_option "prjquota"
_qmount
+_require_prjquota $SCRATCH_DEV
report_quota()
{
cp $dir/2 $dir/3
report_quota
-if [ "$HOSTOS" == "IRIX" ] ; then
- mkfile 1M $TEST_DIR/6
-else
- xfs_mkfile 1M $TEST_DIR/6
-fi
+xfs_mkfile 1M $TEST_DIR/6
#try cp to dir
cp $TEST_DIR/6 $dir/6