mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: move xfs specific tests out of top directory
And into tests/xfs. Tests found and moved via: $ grep "supported_fs xfs$" [0-2]* | cut -d : -f 1 > xfs.tests $ for i in `cat xfs.tests`; do > git mv $i* tests/xfs/ > grep ^$i group >> tests/xfs/group > sed -i -e "/^$i/d" group > done Output now looks like: sudo ./check -g quick -r FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 test-1 3.5.0-rc5-dgc+ MKFS_OPTIONS -- -f -bsize=4096 /dev/vdb MOUNT_OPTIONS -- /dev/vdb /mnt/scratch xfs/170 4s generic/120 16s generic/248 0s generic/213 0s generic/256 39s xfs/121 6s xfs/026 11s generic/131 1s xfs/187 1s generic/135 0s .... Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Phil White <pwhite@sgi.com> [rjohnston@sgi.com did not move test 032, belongs in shared] Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
committed by
Rich Johnston
parent
797e625f28
commit
fc48dfb966
Executable
+123
@@ -0,0 +1,123 @@
|
||||
#! /bin/bash
|
||||
# FS QA Test No. 108
|
||||
#
|
||||
# Simple quota accounting test for direct/buffered/mmap IO.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2005 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`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.quota
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux #IRIX
|
||||
_require_scratch
|
||||
_require_xfs_quota
|
||||
|
||||
test_files()
|
||||
{
|
||||
echo; echo "### create files, setting up ownership (type=$type)"
|
||||
rm -f $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
$XFS_IO_PROG -fc "chproj $prid" $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
chown $uid $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
chgrp $gid $SCRATCH_MNT/{buffer,direct,mmap}
|
||||
for file in $SCRATCH_MNT/{buffer,direct,mmap}; do
|
||||
$here/src/lstat64 $file | head -3 | _filter_scratch
|
||||
$XFS_IO_PROG -c lsproj $file
|
||||
done
|
||||
}
|
||||
|
||||
test_accounting()
|
||||
{
|
||||
echo "### some controlled buffered, direct and mmapd IO (type=$type)"
|
||||
echo "--- initiating parallel IO..." >>$seq.full
|
||||
$XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -c 'fsync' \
|
||||
$SCRATCH_MNT/buffer >>$seq.full 2>&1 &
|
||||
$XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -d \
|
||||
$SCRATCH_MNT/direct >>$seq.full 2>&1 &
|
||||
$XFS_IO_PROG -c 't 16m' -c 'mm -rw 0 16m' -c 'mw 0 16m' -c 'ms -s' \
|
||||
$SCRATCH_MNT/mmap >>$seq.full 2>&1 &
|
||||
wait
|
||||
echo "--- completed parallel IO ($type)" >>$seq.full
|
||||
|
||||
for file in $SCRATCH_MNT/{buffer,direct,mmap}; do
|
||||
$here/src/lstat64 $file | head -3 | _filter_scratch
|
||||
done
|
||||
xfs_quota -c "quota -hnb -$type $id" $QARGS | _filter_scratch | _filter_spaces
|
||||
xfs_quota -c "quota -hni -$type $id" $QARGS | _filter_scratch | _filter_spaces
|
||||
xfs_quota -c "quota -hnr -$type $id" $QARGS | _filter_scratch | _filter_spaces
|
||||
}
|
||||
|
||||
export MOUNT_OPTIONS="-opquota"
|
||||
_qmount
|
||||
_require_prjquota $SCRATCH_DEV
|
||||
|
||||
# real QA test starts here
|
||||
rm -f $tmp.projects $seq.full
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
|
||||
cat $tmp.mkfs >>$seq.full
|
||||
_scratch_mount
|
||||
|
||||
uid=1
|
||||
gid=2
|
||||
prid=3
|
||||
export QARGS="-x -D /dev/null -P /dev/null $SCRATCH_MNT"
|
||||
umount $SCRATCH_DEV
|
||||
|
||||
echo; echo "### test user accounting"
|
||||
export MOUNT_OPTIONS="-ouquota"
|
||||
_qmount
|
||||
type=u
|
||||
id=$uid
|
||||
test_files
|
||||
test_accounting
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
|
||||
echo; echo "### test group accounting"
|
||||
export MOUNT_OPTIONS="-ogquota"
|
||||
_qmount
|
||||
type=g
|
||||
id=$gid
|
||||
test_files
|
||||
test_accounting
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
|
||||
#echo; echo "### test project accounting"
|
||||
export MOUNT_OPTIONS="-opquota"
|
||||
_qmount
|
||||
type=p
|
||||
id=$prid
|
||||
test_files
|
||||
test_accounting
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
|
||||
status=0
|
||||
exit
|
||||
Reference in New Issue
Block a user