mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
QA test updates - fixes for pquota, extsize, fsstress, and ensure mount options passed through to test_dev.
Merge of master-melb:xfs-cmds:24763a by kenmcd.
This commit is contained in:
@@ -47,10 +47,16 @@ _do_test()
|
||||
echo "------------------------------------------"
|
||||
if $here/src/randholes $_param $out >$tmp.out
|
||||
then
|
||||
# only check if we're not allocating in huge chunks (extsz flag)
|
||||
if _test_inode_flag extsize $out || _test_inode_flag realtime $out
|
||||
then
|
||||
echo "holes is in range"
|
||||
else
|
||||
# quick check - how many holes did we get?
|
||||
count=`xfs_bmap $out | egrep -c ': hole'`
|
||||
# blocks can end up adjacent, therefore number of holes varies
|
||||
_within_tolerance "holes" $count $_holes 10% -v
|
||||
fi
|
||||
else
|
||||
echo " randholes returned $? - see $seq.out.full"
|
||||
echo "--------------------------------------" >>$here/$seq.out.full
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# FS QA Test No. 009
|
||||
#
|
||||
# alloc test
|
||||
# XFS allocator test (preallocation - allocp, resvsp ,etc)
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
|
||||
|
||||
@@ -62,10 +62,9 @@ _do_test()
|
||||
echo "-----------------------------------------------"
|
||||
# -m limits number of users/groups so check doesn't fail (malloc) later
|
||||
dbgoutfile=$seq.full
|
||||
if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
|
||||
if ! $FSSTRESS_PROG $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
|
||||
then
|
||||
echo " fsstress (count=$_count) returned $? - see $seq.full"
|
||||
|
||||
echo "--------------------------------------" >>$here/$seq.full
|
||||
echo "$_n - output from fsstress:" >>$here/$seq.full
|
||||
echo "--------------------------------------" >>$here/$seq.full
|
||||
|
||||
@@ -75,9 +75,11 @@ _log_traffic()
|
||||
|
||||
# having any quota enabled (acct/enfd) means extra log traffic - evil!
|
||||
$here/src/feature -U $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled log traffic"
|
||||
_notrun "UQuota are enabled, test needs controlled log traffic"
|
||||
$here/src/feature -G $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled log traffic"
|
||||
_notrun "GQuota are enabled, test needs controlled log traffic"
|
||||
$here/src/feature -P $SCRATCH_DEV && \
|
||||
_notrun "PQuota are enabled, test needs controlled log traffic"
|
||||
|
||||
echo " *** fiddle"
|
||||
while [ $count -ge 0 ]
|
||||
|
||||
@@ -53,7 +53,7 @@ echo "*** test"
|
||||
for l in 0 1 2 3 4
|
||||
do
|
||||
echo " *** test $l"
|
||||
ltp/fsstress -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID >>$seq.full
|
||||
$FSSTRESS_PROG -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID >>$seq.full
|
||||
|
||||
_scratch_mount -o remount,ro \
|
||||
|| _fail "remount ro failed"
|
||||
|
||||
@@ -30,8 +30,7 @@ _cleanup()
|
||||
_filter()
|
||||
{
|
||||
sed "s#$testdir[^ :]*#<TESTFILE>#g;
|
||||
s#$tmp[^ :]*#<TMPFILE>#g;
|
||||
s#/proc[^ :]*#<PROCFILE>#g" $1
|
||||
s#$tmp[^ :]*#<TMPFILE>#g" $1
|
||||
}
|
||||
|
||||
_attr()
|
||||
@@ -81,9 +80,6 @@ testfile=$testdir/attribute_$$
|
||||
echo "*** list non-existant file"
|
||||
_attr_list $testfile
|
||||
|
||||
echo "*** list non-xfs file (in /proc)"
|
||||
_attr_list /proc/devices
|
||||
|
||||
echo "*** list empty file"
|
||||
touch $testfile
|
||||
_attr_list $testfile
|
||||
|
||||
@@ -3,10 +3,6 @@ QA output created by 020
|
||||
*** print attributes
|
||||
getfattr: <TESTFILE>: No such file or directory
|
||||
!!! error return
|
||||
*** list non-xfs file (in /proc)
|
||||
*** print attributes
|
||||
getfattr: <PROCFILE>: Operation not supported
|
||||
!!! error return
|
||||
*** list empty file
|
||||
*** print attributes
|
||||
*** query non-existant attribute
|
||||
|
||||
@@ -66,11 +66,11 @@ then
|
||||
else
|
||||
_scratch_mount
|
||||
src/feature -U $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
_notrun "UQuota are enabled, test needs controlled sb recovery"
|
||||
src/feature -G $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
_notrun "GQuota are enabled, test needs controlled sb recovery"
|
||||
src/feature -P $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
_notrun "PQuota are enabled, test needs controlled sb recovery"
|
||||
umount $SCRATCH_DEV
|
||||
fi
|
||||
clear=""
|
||||
|
||||
@@ -78,9 +78,11 @@ _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
|
||||
# check we won't get any quota inodes setup on mount
|
||||
_scratch_mount
|
||||
src/feature -U $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
_notrun "UQuota are enabled, test needs controlled sb recovery"
|
||||
src/feature -G $SCRATCH_DEV && \
|
||||
_notrun "Quota are enabled, test needs controlled sb recovery"
|
||||
_notrun "GQuota are enabled, test needs controlled sb recovery"
|
||||
src/feature -P $SCRATCH_DEV && \
|
||||
_notrun "PQuota are enabled, test needs controlled sb recovery"
|
||||
umount $SCRATCH_DEV
|
||||
|
||||
# rootino, rbmino, and rsumino are now set (lets blow em away!)
|
||||
|
||||
@@ -81,7 +81,7 @@ mount -t xfs -o loop $SCRATCH_MNT/test.xfs $SCRATCH_MNT/test >> $seq.full 2>&1 \
|
||||
|| _fail "!!! failed to loop mount xfs"
|
||||
|
||||
_log "stress"
|
||||
ltp/fsstress -d $SCRATCH_MNT/test -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
|
||||
$FSSTRESS_PROG -d $SCRATCH_MNT/test -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
|
||||
|| _fail "!!! stress failed"
|
||||
|
||||
_log "clean"
|
||||
@@ -101,7 +101,7 @@ mount -t ext2 -o loop $SCRATCH_MNT/test/test.ext2 $SCRATCH_MNT/test2 >> $seq.ful
|
||||
|| _fail "!!! failed to loop mount xfs"
|
||||
|
||||
_log "stress ext2 on xfs via loop"
|
||||
ltp/fsstress -d $SCRATCH_MNT/test2 -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
|
||||
$FSSTRESS_PROG -d $SCRATCH_MNT/test2 -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
|
||||
|| _fail "!!! stress ext2 failed"
|
||||
|
||||
_log "clean"
|
||||
|
||||
@@ -65,7 +65,7 @@ _filter_and_check_blocks()
|
||||
if (/^'$name'\s+([-|+]){2}\s+(\d+)/ && '$enforce') {
|
||||
$maximum = '$blkhard';
|
||||
$minimum = '$blkhard' * 85/100;
|
||||
if ($2 < $minimum || $2 > $maximum) {
|
||||
if (($2 < $minimum || $2 > $maximum) && '$noextsz') {
|
||||
printf(" URK - %d is out of range! [%d,%d] \n",
|
||||
$2, $minimum, $maximum);
|
||||
}
|
||||
@@ -89,6 +89,14 @@ else
|
||||
QUOTA_FS=$SCRATCH_MNT
|
||||
fi
|
||||
|
||||
# Figure out whether we're doing large allocations
|
||||
# (bail out if they're so large they stuff the test up)
|
||||
_test_inode_flag extsz-inherit $SCRATCH_MNT
|
||||
noextsz=$?
|
||||
extsize=`_test_inode_extsz $SCRATCH_MNT`
|
||||
[ $extsize -ge 512000 ] && \
|
||||
_notrun "Extent size hint is too large ($extsize bytes)"
|
||||
|
||||
_qsetup
|
||||
|
||||
echo "Using output from '" `ls -l $seq.out` "'" >>$seq.full
|
||||
@@ -138,7 +146,6 @@ ls -l $SCRATCH_MNT >>$seq.full
|
||||
_qmount
|
||||
_repquota -$type $QUOTA_FS | _filter_and_check_blocks
|
||||
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -56,9 +56,11 @@ _supported_os IRIX Linux
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
_scratch_mount
|
||||
$here/src/feature -U $SCRATCH_DEV && \
|
||||
_notrun "Quota enabled, test needs controlled xfsdump output"
|
||||
_notrun "UQuota enabled, test needs controlled xfsdump output"
|
||||
$here/src/feature -G $SCRATCH_DEV && \
|
||||
_notrun "Quota enabled, test needs controlled xfsdump output"
|
||||
_notrun "GQuota enabled, test needs controlled xfsdump output"
|
||||
$here/src/feature -P $SCRATCH_DEV && \
|
||||
_notrun "PQuota enabled, test needs controlled xfsdump output"
|
||||
umount $SCRATCH_DEV
|
||||
|
||||
#
|
||||
|
||||
@@ -66,7 +66,7 @@ touch $tmp.running
|
||||
while [ -f "$tmp.running" ]
|
||||
do
|
||||
# -w ensures that the only ops are ones which cause write I/O
|
||||
ltp/fsstress -d $STRESS_DIR -w -p $procs -n $nops $FSSTRESS_AVOID \
|
||||
$FSSTRESS_PROG -d $STRESS_DIR -w -p $procs -n $nops $FSSTRESS_AVOID \
|
||||
> /dev/null 2>&1
|
||||
done
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ _supported_os IRIX Linux
|
||||
|
||||
_setup_testdir
|
||||
|
||||
$here/ltp/fsstress \
|
||||
$FSSTRESS_PROG \
|
||||
-d $testdir/fsstress \
|
||||
-f allocsp=0 \
|
||||
-f freesp=0 \
|
||||
|
||||
@@ -65,8 +65,10 @@ _do_test()
|
||||
cd $out
|
||||
if ! $here/ltp/fsx $_param -P $here $seq.$_n >/dev/null
|
||||
then
|
||||
echo " fsx ($_param) returned $? - see $seq.$_n.full"
|
||||
mv $seq.$_n.fsxlog $here/$seq.$_n.full
|
||||
echo " fsx ($_param) failed, $? - compare $seq.$_n.{good,bad,fsxlog}"
|
||||
mv $out/$seq.$_n $here/$seq.$_n.full
|
||||
od -xAx $here/$seq.$_n.full > $here/$seq.$_n.bad
|
||||
od -xAx $here/$seq.$_n.fsxgood > $here/$seq.$_n.good
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -60,7 +60,7 @@ echo "*** test concurrent block/fs access"
|
||||
cat $SCRATCH_DEV >/dev/null &
|
||||
pid=$!
|
||||
|
||||
ltp/fsstress -d $SCRATCH_MNT -p 2 -n 2000 $FSSTRESS_AVOID >>$seq.full
|
||||
$FSSTRESS_PROG -d $SCRATCH_MNT -p 2 -n 2000 $FSSTRESS_AVOID >>$seq.full
|
||||
|
||||
_lets_get_pidst
|
||||
_check_scratch_fs
|
||||
|
||||
@@ -64,7 +64,7 @@ workout()
|
||||
|| _fail "mount failed"
|
||||
|
||||
# -w ensures that the only ops are ones which cause write I/O
|
||||
ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \
|
||||
$FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \
|
||||
>>$seq.full
|
||||
_check_scratch_fs
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ _do_meta()
|
||||
param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
|
||||
-f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
|
||||
_echofull "calling fsstress $param -m8 -n $count"
|
||||
if ! $here/ltp/fsstress $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
|
||||
if ! $FSSTRESS_PROG $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
|
||||
then
|
||||
_echofull "fsstress failed"
|
||||
fi
|
||||
|
||||
@@ -58,7 +58,7 @@ _mkfs_filter()
|
||||
-e 's/agcount=[0-9][0-9]*/agcount=N/' \
|
||||
-e 's/meta-data=[^ ]*/meta-data=DEV/' \
|
||||
-e 's/ *isize/ isize/' \
|
||||
-e '/ *= *sectsz=[0-9][0-9]* *$/d' \
|
||||
-e '/ *= *sectsz=[0-9][0-9]* *attr=[0-9][0-9]*$/d' \
|
||||
-e '/ *= *mmr=[0-9][0-9]* *$/d' \
|
||||
-e 's/ *mixed-case=[YN]//' \
|
||||
-e 's/sectsz=[0-9][0-9]* *//' \
|
||||
|
||||
@@ -46,7 +46,7 @@ _stress_scratch()
|
||||
procs=3
|
||||
nops=1000
|
||||
# -w ensures that the only ops are ones which cause write I/O
|
||||
ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID &
|
||||
$FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID &
|
||||
}
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user