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 "-----------------------------------------------"
|
||||||
echo "fsstress.$_n : $_param"
|
echo "fsstress.$_n : $_param"
|
||||||
echo "-----------------------------------------------"
|
echo "-----------------------------------------------"
|
||||||
# -v >$tmp.out
|
|
||||||
# -m limits number of users/groups so check doesn't fail (malloc) later
|
# -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
|
then
|
||||||
echo " fsstress (count=$_count) returned $? - see $seq.full"
|
echo " fsstress (count=$_count) returned $? - see $seq.full"
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ _setup_testdir
|
|||||||
rm -f $here/$seq.full
|
rm -f $here/$seq.full
|
||||||
echo "brevity is wit..."
|
echo "brevity is wit..."
|
||||||
|
|
||||||
count=2000
|
count=1000
|
||||||
procs=20
|
procs=20
|
||||||
|
|
||||||
_check_test_fs
|
_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
|
_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
|
exit
|
||||||
|
|
||||||
# Test with error injection:
|
# Test with error injection:
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ _supported_os IRIX Linux
|
|||||||
# so we set them differently for different machines
|
# so we set them differently for different machines
|
||||||
#
|
#
|
||||||
if [ $HOSTOS == "IRIX" ]; then
|
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
|
# e.g. getting around 37secs for 1,1,1 on IP30 debug
|
||||||
numchildren=2
|
numchildren=2
|
||||||
numloops=1
|
numloops=1
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ _supported_fs xfs
|
|||||||
# It does not work on Linux due to some locking issues...
|
# It does not work on Linux due to some locking issues...
|
||||||
_supported_os IRIX
|
_supported_os IRIX
|
||||||
|
|
||||||
|
[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
|
||||||
|
|
||||||
_setup_testdir
|
_setup_testdir
|
||||||
|
|
||||||
#quiet=-q
|
#quiet=-q
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
# full boundary due to the fact that we will retry allocation
|
# full boundary due to the fact that we will retry allocation
|
||||||
# several times after flushing, before giving back ENOSPC.
|
# 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.
|
# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
|
||||||
#
|
#
|
||||||
@@ -75,6 +81,7 @@ workout()
|
|||||||
fsz=$1
|
fsz=$1
|
||||||
ags=$2
|
ags=$2
|
||||||
procs=$3
|
procs=$3
|
||||||
|
nops=$4
|
||||||
|
|
||||||
umount $SCRATCH_DEV >/dev/null 2>&1
|
umount $SCRATCH_DEV >/dev/null 2>&1
|
||||||
echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full
|
echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full
|
||||||
@@ -84,16 +91,26 @@ workout()
|
|||||||
_scratch_mount >>$seq.full 2>&1 \
|
_scratch_mount >>$seq.full 2>&1 \
|
||||||
|| _fail "mount failed"
|
|| _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
|
>>$seq.full
|
||||||
_check_scratch_fs
|
_check_scratch_fs
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "*** test out-of-space handling for random write operations"
|
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"
|
echo "*** done"
|
||||||
status=0
|
status=0
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
|||||||
|
|
||||||
_filter_resv()
|
_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`
|
pgsize=`$here/src/feature -p`
|
||||||
@@ -67,6 +68,14 @@ pgsize=`$here/src/feature -p`
|
|||||||
_supported_fs xfs
|
_supported_fs xfs
|
||||||
_supported_os IRIX Linux
|
_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
|
||||||
echo "*** First case - I/O blocksize same as pagesize"
|
echo "*** First case - I/O blocksize same as pagesize"
|
||||||
$here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv
|
$here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
QA output created by 084
|
QA output created by 084
|
||||||
|
|
||||||
*** First case - I/O blocksize same as pagesize
|
*** 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
|
done
|
||||||
|
|
||||||
*** Second case - 512 byte I/O blocksize
|
*** 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
|
done
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
|||||||
_supported_fs xfs
|
_supported_fs xfs
|
||||||
_supported_os Linux IRIX
|
_supported_os Linux IRIX
|
||||||
|
|
||||||
|
[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
|
||||||
|
|
||||||
rm -f $seq.full
|
rm -f $seq.full
|
||||||
|
|
||||||
run_fsx()
|
run_fsx()
|
||||||
|
|||||||
+12
@@ -74,6 +74,18 @@ _acl_ls()
|
|||||||
ls -ln $* | awk '{ print $1, $3, $4, $NF }' | _acl_filter_id
|
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 an ACL with n ACEs in it
|
||||||
#
|
#
|
||||||
_create_n_aces()
|
_create_n_aces()
|
||||||
|
|||||||
+3
-3
@@ -398,11 +398,11 @@ _cmp_output()
|
|||||||
_process_op_diff()
|
_process_op_diff()
|
||||||
{
|
{
|
||||||
$AWK_PROG <$1 '
|
$AWK_PROG <$1 '
|
||||||
BEGIN { num_splits = 1 }
|
BEGIN { num_splits = 1; max_splits = 50 }
|
||||||
/^[0-9]/ {
|
/^[0-9]/ {
|
||||||
|
|
||||||
# ensure a split happened in previous difference
|
# 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
|
print num_splits, " split(s) found prior to diff cmd: ", $0
|
||||||
num_splits = 1 # shut-up end condition
|
num_splits = 1 # shut-up end condition
|
||||||
exit 1
|
exit 1
|
||||||
@@ -417,7 +417,7 @@ _process_op_diff()
|
|||||||
}
|
}
|
||||||
{ next }
|
{ next }
|
||||||
END {
|
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"
|
print num_splits, " split(s) found prior to diff end"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-4
@@ -40,6 +40,11 @@
|
|||||||
#define XFS_ERRTAG_MAX 17
|
#define XFS_ERRTAG_MAX 17
|
||||||
#define XFS_IDMODULO_MAX 32
|
#define XFS_IDMODULO_MAX 32
|
||||||
|
|
||||||
|
/* was (getpagesize()*32) BUT want it to be same
|
||||||
|
* on all platforms
|
||||||
|
*/
|
||||||
|
#define FILELEN_MAX (32*4096)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OP_ALLOCSP,
|
OP_ALLOCSP,
|
||||||
OP_ATTR_REMOVE,
|
OP_ATTR_REMOVE,
|
||||||
@@ -1737,7 +1742,7 @@ dread_f(int opno, long r)
|
|||||||
off = (off64_t)(lr % stb.st_size);
|
off = (off64_t)(lr % stb.st_size);
|
||||||
off -= (off % align);
|
off -= (off % align);
|
||||||
lseek64(fd, off, SEEK_SET);
|
lseek64(fd, off, SEEK_SET);
|
||||||
len = (random() % (getpagesize() * 32)) + 1;
|
len = (random() % FILELEN_MAX) + 1;
|
||||||
len -= (len % align);
|
len -= (len % align);
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
len = align;
|
len = align;
|
||||||
@@ -1807,7 +1812,7 @@ dwrite_f(int opno, long r)
|
|||||||
off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
|
off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
|
||||||
off -= (off % align);
|
off -= (off % align);
|
||||||
lseek64(fd, off, SEEK_SET);
|
lseek64(fd, off, SEEK_SET);
|
||||||
len = (random() % (getpagesize() * 32)) + 1;
|
len = (random() % FILELEN_MAX) + 1;
|
||||||
len -= (len % align);
|
len -= (len % align);
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
len = align;
|
len = align;
|
||||||
@@ -2139,7 +2144,7 @@ read_f(int opno, long r)
|
|||||||
lr = ((__int64_t)random() << 32) + random();
|
lr = ((__int64_t)random() << 32) + random();
|
||||||
off = (off64_t)(lr % stb.st_size);
|
off = (off64_t)(lr % stb.st_size);
|
||||||
lseek64(fd, off, SEEK_SET);
|
lseek64(fd, off, SEEK_SET);
|
||||||
len = (random() % (getpagesize() * 32)) + 1;
|
len = (random() % FILELEN_MAX) + 1;
|
||||||
buf = malloc(len);
|
buf = malloc(len);
|
||||||
e = read(fd, buf, len) < 0 ? errno : 0;
|
e = read(fd, buf, len) < 0 ? errno : 0;
|
||||||
free(buf);
|
free(buf);
|
||||||
@@ -2539,7 +2544,7 @@ write_f(int opno, long r)
|
|||||||
off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
|
off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
|
||||||
off %= maxfsize;
|
off %= maxfsize;
|
||||||
lseek64(fd, off, SEEK_SET);
|
lseek64(fd, off, SEEK_SET);
|
||||||
len = (random() % (getpagesize() * 32)) + 1;
|
len = (random() % FILELEN_MAX) + 1;
|
||||||
buf = malloc(len);
|
buf = malloc(len);
|
||||||
memset(buf, nameseq & 0xff, len);
|
memset(buf, nameseq & 0xff, len);
|
||||||
e = write(fd, buf, len) < 0 ? errno : 0;
|
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,
|
return syssgi(SGI_FS_BULKSTAT, fd,
|
||||||
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
||||||
((xfs_fsop_bulkreq_t*)arg)->icount,
|
((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)
|
else if (cmd == SGI_FS_BULKSTAT_SINGLE)
|
||||||
return syssgi(SGI_FS_BULKSTAT_SINGLE, fd,
|
return syssgi(SGI_FS_BULKSTAT_SINGLE, fd,
|
||||||
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
((xfs_fsop_bulkreq_t*)arg)->lastip,
|
||||||
|
|||||||
Reference in New Issue
Block a user