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"
rm -f $here/$seq.full
echo "brevity is wit..."
-count=2000
+count=1000
procs=20
_check_test_fs
_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:
# 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
# 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
# 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.
#
fsz=$1
ags=$2
procs=$3
+ nops=$4
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full
_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
+
+if [ $HOSTOS = "IRIX" ]; then
+ # for 10000 ops was taking 30mins on my IRIX box
+ numops=1000
+else
+ numops=10000
+fi
-workout 100m 6 15
+workout $filesize $agcount $numprocs $numops
echo "*** done"
status=0
_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`
_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
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
_supported_fs xfs
_supported_os Linux IRIX
+[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
+
rm -f $seq.full
run_fsx()
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()
_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
}
{ 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
}
#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,
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;
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;
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);
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;
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,