mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs qa changes to get thinks working on irix
add verbosity to a file for debugging reduce iteration count
This commit is contained in:
@@ -84,9 +84,9 @@ _do_test()
|
||||
echo "-----------------------------------------------"
|
||||
echo "fsstress.$_n : $_param"
|
||||
echo "-----------------------------------------------"
|
||||
# -v >$tmp.out
|
||||
# -m limits number of users/groups so check doesn't fail (malloc) later
|
||||
if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -m 8 -n $_count -d $out >/dev/null 2>&1
|
||||
dbgoutfile=$seq.full
|
||||
if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
|
||||
then
|
||||
echo " fsstress (count=$_count) returned $? - see $seq.full"
|
||||
|
||||
@@ -111,7 +111,7 @@ _setup_testdir
|
||||
rm -f $here/$seq.full
|
||||
echo "brevity is wit..."
|
||||
|
||||
count=2000
|
||||
count=1000
|
||||
procs=20
|
||||
|
||||
_check_test_fs
|
||||
@@ -128,6 +128,9 @@ _do_test 2 "-p $procs -r" $count
|
||||
|
||||
_do_test 3 "-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" $count
|
||||
|
||||
# if all ok by here then probably don't need $seq.full
|
||||
rm -f $seq.full
|
||||
|
||||
exit
|
||||
|
||||
# Test with error injection:
|
||||
|
||||
@@ -134,7 +134,7 @@ _supported_os IRIX Linux
|
||||
# so we set them differently for different machines
|
||||
#
|
||||
if [ $HOSTOS == "IRIX" ]; then
|
||||
if uname -R | grep -i debug; then
|
||||
if uname -R | grep -iq debug; then
|
||||
# e.g. getting around 37secs for 1,1,1 on IP30 debug
|
||||
numchildren=2
|
||||
numloops=1
|
||||
|
||||
@@ -64,6 +64,8 @@ _supported_fs xfs
|
||||
# It does not work on Linux due to some locking issues...
|
||||
_supported_os IRIX
|
||||
|
||||
[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
|
||||
|
||||
_setup_testdir
|
||||
|
||||
#quiet=-q
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
# full boundary due to the fact that we will retry allocation
|
||||
# several times after flushing, before giving back ENOSPC.
|
||||
#
|
||||
# Note that this test will intentionally cause console msgs of form:
|
||||
# dksc0d1s4: Process [fsstress] ran out of disk space
|
||||
# dksc0d1s4: Process [fsstress] ran out of disk space
|
||||
# dksc0d1s4: Process [fsstress] ran out of disk space
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#
|
||||
@@ -75,6 +81,7 @@ workout()
|
||||
fsz=$1
|
||||
ags=$2
|
||||
procs=$3
|
||||
nops=$4
|
||||
|
||||
umount $SCRATCH_DEV >/dev/null 2>&1
|
||||
echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full
|
||||
@@ -84,16 +91,26 @@ workout()
|
||||
_scratch_mount >>$seq.full 2>&1 \
|
||||
|| _fail "mount failed"
|
||||
|
||||
ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n 10000 $FSSTRESS_AVOID \
|
||||
# -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 \
|
||||
>>$seq.full
|
||||
_check_scratch_fs
|
||||
}
|
||||
|
||||
echo "*** test out-of-space handling for random write operations"
|
||||
|
||||
# args: filesystem size/ag count/number fsstress processes
|
||||
filesize=100m
|
||||
agcount=6
|
||||
numprocs=15
|
||||
|
||||
workout 100m 6 15
|
||||
if [ $HOSTOS = "IRIX" ]; then
|
||||
# for 10000 ops was taking 30mins on my IRIX box
|
||||
numops=1000
|
||||
else
|
||||
numops=10000
|
||||
fi
|
||||
|
||||
workout $filesize $agcount $numprocs $numops
|
||||
|
||||
echo "*** done"
|
||||
status=0
|
||||
|
||||
@@ -53,7 +53,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
_filter_resv()
|
||||
{
|
||||
sed -e "s,$TEST_DIR/resv,[TESTFILE],g"
|
||||
sed -e "s,$TEST_DIR/resv,[TESTFILE],g" \
|
||||
-e 's/[0-9][0-9]* bytes/NUM bytes/g'
|
||||
}
|
||||
|
||||
pgsize=`$here/src/feature -p`
|
||||
@@ -67,6 +68,14 @@ pgsize=`$here/src/feature -p`
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
if [ $HOSTOS == "IRIX" ]; then
|
||||
if uname -R | grep -iq debug; then
|
||||
# taking up to 23 mins on my 512K octane on debug
|
||||
# not worth worrying about
|
||||
_notrun "don't bother running on debug IRIX"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "*** First case - I/O blocksize same as pagesize"
|
||||
$here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
QA output created by 084
|
||||
|
||||
*** First case - I/O blocksize same as pagesize
|
||||
reserved 40960000 bytes for [TESTFILE] using XFS_IOC_RESVSP64
|
||||
reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64
|
||||
done
|
||||
|
||||
*** Second case - 512 byte I/O blocksize
|
||||
reserved 40960000 bytes for [TESTFILE] using XFS_IOC_RESVSP64
|
||||
reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64
|
||||
done
|
||||
|
||||
@@ -54,6 +54,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
|
||||
|
||||
rm -f $seq.full
|
||||
|
||||
run_fsx()
|
||||
|
||||
+12
@@ -74,6 +74,18 @@ _acl_ls()
|
||||
ls -ln $* | awk '{ print $1, $3, $4, $NF }' | _acl_filter_id
|
||||
}
|
||||
|
||||
#
|
||||
_acl_list()
|
||||
{
|
||||
_file1=$1
|
||||
|
||||
if [ $HOSTOS = "IRIX" ]; then
|
||||
ls -D $_file1 | _acl_filter_id
|
||||
else
|
||||
chacl -l $_file1 | _acl_filter_id
|
||||
fi
|
||||
}
|
||||
|
||||
# create an ACL with n ACEs in it
|
||||
#
|
||||
_create_n_aces()
|
||||
|
||||
+3
-3
@@ -398,11 +398,11 @@ _cmp_output()
|
||||
_process_op_diff()
|
||||
{
|
||||
$AWK_PROG <$1 '
|
||||
BEGIN { num_splits = 1 }
|
||||
BEGIN { num_splits = 1; max_splits = 50 }
|
||||
/^[0-9]/ {
|
||||
|
||||
# ensure a split happened in previous difference
|
||||
if (num_splits < 1 || num_splits > 3) {
|
||||
if (num_splits < 1 || num_splits > max_splits) {
|
||||
print num_splits, " split(s) found prior to diff cmd: ", $0
|
||||
num_splits = 1 # shut-up end condition
|
||||
exit 1
|
||||
@@ -417,7 +417,7 @@ _process_op_diff()
|
||||
}
|
||||
{ next }
|
||||
END {
|
||||
if (num_splits < 1 || num_splits > 3) {
|
||||
if (num_splits < 1 || num_splits > max_splits) {
|
||||
print num_splits, " split(s) found prior to diff end"
|
||||
exit 1
|
||||
}
|
||||
|
||||
+9
-4
@@ -40,6 +40,11 @@
|
||||
#define XFS_ERRTAG_MAX 17
|
||||
#define XFS_IDMODULO_MAX 32
|
||||
|
||||
/* was (getpagesize()*32) BUT want it to be same
|
||||
* on all platforms
|
||||
*/
|
||||
#define FILELEN_MAX (32*4096)
|
||||
|
||||
typedef enum {
|
||||
OP_ALLOCSP,
|
||||
OP_ATTR_REMOVE,
|
||||
@@ -1737,7 +1742,7 @@ dread_f(int opno, long r)
|
||||
off = (off64_t)(lr % stb.st_size);
|
||||
off -= (off % align);
|
||||
lseek64(fd, off, SEEK_SET);
|
||||
len = (random() % (getpagesize() * 32)) + 1;
|
||||
len = (random() % FILELEN_MAX) + 1;
|
||||
len -= (len % align);
|
||||
if (len <= 0)
|
||||
len = align;
|
||||
@@ -1807,7 +1812,7 @@ dwrite_f(int opno, long r)
|
||||
off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
|
||||
off -= (off % align);
|
||||
lseek64(fd, off, SEEK_SET);
|
||||
len = (random() % (getpagesize() * 32)) + 1;
|
||||
len = (random() % FILELEN_MAX) + 1;
|
||||
len -= (len % align);
|
||||
if (len <= 0)
|
||||
len = align;
|
||||
@@ -2139,7 +2144,7 @@ read_f(int opno, long r)
|
||||
lr = ((__int64_t)random() << 32) + random();
|
||||
off = (off64_t)(lr % stb.st_size);
|
||||
lseek64(fd, off, SEEK_SET);
|
||||
len = (random() % (getpagesize() * 32)) + 1;
|
||||
len = (random() % FILELEN_MAX) + 1;
|
||||
buf = malloc(len);
|
||||
e = read(fd, buf, len) < 0 ? errno : 0;
|
||||
free(buf);
|
||||
@@ -2539,7 +2544,7 @@ write_f(int opno, long r)
|
||||
off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
|
||||
off %= maxfsize;
|
||||
lseek64(fd, off, SEEK_SET);
|
||||
len = (random() % (getpagesize() * 32)) + 1;
|
||||
len = (random() % FILELEN_MAX) + 1;
|
||||
buf = malloc(len);
|
||||
memset(buf, nameseq & 0xff, len);
|
||||
e = write(fd, buf, len) < 0 ? errno : 0;
|
||||
|
||||
+2
-1
@@ -239,7 +239,8 @@ xfsctl(char* path, int fd, int cmd, void* arg) {
|
||||
return syssgi(SGI_FS_BULKSTAT, fd,
|
||||
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
||||
((xfs_fsop_bulkreq_t*)arg)->icount,
|
||||
((xfs_fsop_bulkreq_t*)arg)->ubuffer);
|
||||
((xfs_fsop_bulkreq_t*)arg)->ubuffer,
|
||||
((xfs_fsop_bulkreq_t*)arg)->ocount);
|
||||
else if (cmd == SGI_FS_BULKSTAT_SINGLE)
|
||||
return syssgi(SGI_FS_BULKSTAT_SINGLE, fd,
|
||||
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
||||
|
||||
Reference in New Issue
Block a user