]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfstest: allow fsstress to use load factor where appropriate
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 20 Feb 2013 10:42:10 +0000 (10:42 +0000)
committerRich Johnston <rjohnston@sgi.com>
Fri, 1 Mar 2013 16:09:08 +0000 (10:09 -0600)
1) Add _scale_fsstress_args function which transform arguments according
   to load factors
2) Let all non deterministic fsstress tests to use scaled arguments

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
17 files changed:
017
068
070
076
083
087
104
114
167
232
232.out
233
233.out
269
270
common.rc
group

diff --git a/017 b/017
index 9ca0e72e23828c96089e5516621aa9036ece683b..7db46675d4ffd00461175b9eda4a0c1927031de7 100755 (executable)
--- a/017
+++ b/017
@@ -67,7 +67,8 @@ echo "*** test"
 for l in 0 1 2 3 4
 do
         echo "    *** test $l"
-        $FSSTRESS_PROG -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID >>$seq.full
+       FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID`
+        $FSSTRESS_PROG  $FSSTRESS_ARGS >>$seq.full
 
         _scratch_mount -o remount,ro \
             || _fail "remount ro failed"
diff --git a/068 b/068
index a641e2f7d4f12df650eb8150a068c0cb42f7f603..cbfea9504a7dee4cb86eee6809134bdaba31855c 100755 (executable)
--- a/068
+++ b/068
@@ -82,8 +82,8 @@ touch $tmp.running
       do
       # We do both read & write IO - not only is this more realistic,
       # but it also potentially tests atime updates
-      $FSSTRESS_PROG -d $STRESS_DIR -p $procs -n $nops $FSSTRESS_AVOID \
-         > /dev/null 2>&1
+      FSSTRESS_ARGS=`_scale_fsstress_args -d $STRESS_DIR -p $procs -n $nops $FSSTRESS_AVOID`
+      $FSSTRESS_PROG $FSSTRESS_ARGS > /dev/null 2>&1
     done
 
     rm -r $STRESS_DIR/*
diff --git a/070 b/070
index f48c33cf1796f9bcdba0998bfcd7fbe72c9e81c2..334cce7c9e5272ce41fcecfbc5d8d317ac080b15 100755 (executable)
--- a/070
+++ b/070
@@ -52,7 +52,7 @@ _require_attrs
 
 _setup_testdir
 
-$FSSTRESS_PROG \
+FSSTRESS_ARGS=`_scale_fsstress_args \
        -d $testdir/fsstress \
        -f allocsp=0 \
        -f freesp=0 \
@@ -62,7 +62,8 @@ $FSSTRESS_PROG \
        -f unresvsp=0 \
        -f attr_set=100 \
        -f attr_remove=100 \
-        -p 1 -n 10000 -S c >$seq.full 2>&1
+        -p 1 -n 10000 -S c`
+$FSSTRESS_PROG $FSSTRESS_ARGS >$seq.full 2>&1
 
 status=$?
 exit
diff --git a/076 b/076
index e472b26945b8845dfc747e4a08e7ea9fbbe3877e..793b86944fc0ec00e79e944109e250347f59ece0 100755 (executable)
--- a/076
+++ b/076
@@ -74,8 +74,9 @@ echo "*** test concurrent block/fs access"
 cat $SCRATCH_DEV >/dev/null &
 pid=$!
 
-$FSSTRESS_PROG -d $SCRATCH_MNT -p 2 -n 2000 $FSSTRESS_AVOID >>$seq.full
-
+FSSTRESS_ARGS=`_scale_fsstress_args -p 2 -n 2000 $FSSTRESS_AVOID`
+echo "run fsstress with args: $FSSTRESS_ARGS" >>$seq.full
+$FSSTRESS_PROG $FSSTRESS_ARGS >>$seq.full
 _lets_get_pidst
 _check_scratch_fs
 
diff --git a/083 b/083
index e0670b9ef3a73818c9d86512f0689ae7fb80b2bf..f5349a942bc3605d6b1634bd5092e51890b0a3b4 100755 (executable)
--- a/083
+++ b/083
@@ -84,8 +84,8 @@ workout()
                || _fail "mount failed"
 
        # -w ensures that the only ops are ones which cause write I/O
-       $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \
-               >>$seq.full
+       FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID`
+       $FSSTRESS_PROG $FSSTRESS_ARGS >>$seq.full
        _check_scratch_fs
 }
 
diff --git a/087 b/087
index 48e5eaa74a9e623d5c6cbaa8751890f28f796cdd..e7be9a0acfdfed58aaf108d68c6a456905e54ca9 100755 (executable)
--- a/087
+++ b/087
@@ -47,7 +47,8 @@ _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 ! $FSSTRESS_PROG $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
+    FSSTRESS_ARGS=`_scale_fsstress_args $param $FSSTRESS_AVOID -m 8 -n $count -d $out`
+    if ! $FSSTRESS_PROG $FSSTRESS_ARGS >>$seq.full 2>&1
     then
        _echofull "fsstress failed"
     fi
diff --git a/104 b/104
index 14f2669c1d37db099555a7ff7d3fb1cac3ffc14c..8db6d885720aafced9d84b1aed05c5027156db78 100755 (executable)
--- a/104
+++ b/104
@@ -64,7 +64,9 @@ _stress_scratch()
        procs=3
        nops=1000
        # -w ensures that the only ops are ones which cause write I/O
-       $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID > /dev/null &
+       FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -w -p $procs \
+           -n $nops $FSSTRESS_AVOID`
+       $FSSTRESS_PROG $FSSTRESS_ARGS >> $seq.full &
 }
 
 # real QA test starts here
diff --git a/114 b/114
index 76792229a285984a942c71fb326306dd00f2672d..edce0f49a30f08573d303e889894a74b45ccfbc1 100755 (executable)
--- a/114
+++ b/114
@@ -246,11 +246,11 @@ _test_fsstress()
 
        out=$SCRATCH_MNT/fsstress.$$
        count=1000
-       args="-z \
+       args=`_scale_fsstress_args -z \
 -f rmdir=10 -f link=10 -f creat=10 \
 -f mkdir=10 -f rename=30 -f unlink=10 \
 -f symlink=10 \
--n $count -d $out -p 3"
+-n $count -d $out -p 3`
 
        echo "fsstress $args" | sed -e "s#$out#outdir#"
        if ! $FSSTRESS_PROG $args | _filter_num
diff --git a/167 b/167
index ccb6c2a6de24f1a5f68d01bfd013930e70712cd5..5fb95e824231fe8893f78bef74d3e44d700398b3 100755 (executable)
--- a/167
+++ b/167
@@ -44,8 +44,9 @@ workout()
 {
        procs=100
        nops=15000
-       $FSSTRESS_PROG -d $SCRATCH_MNT -p $procs -n $nops $FSSTRESS_AVOID \
-               >>$seq.full &
+       FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -p $procs -n $nops \
+           $FSSTRESS_AVOID`
+       $FSSTRESS_PROG $FSSTRESS_ARGS >> $seq.full &
        sleep 2
 }
 
diff --git a/232 b/232
index 2795da7bbfb32d9dd9f9b5327412b0e208ddbbca..d915d429bb6c2aceae86e91c112bf02066ff4ffe 100755 (executable)
--- a/232
+++ b/232
@@ -54,9 +54,9 @@ _fsstress()
 
        out=$SCRATCH_MNT/fsstress.$$
        count=2000
-       args="-n $count -d $out -p 7"
+       args=`_scale_fsstress_args -d $out -n $count -p 7`
 
-       echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
+       echo "fsstress $args" >> tee -a $here/$seq.full
        if ! $FSSTRESS_PROG $args | tee -a $here/$seq.full | _filter_num
        then
                echo "    fsstress $args returned $?"
diff --git a/232.out b/232.out
index ef82a890919b82c7a00e4537012dd9bdc854fec7..5da53d4bf958232e89bf8eb5fa885aa633d408ae 100644 (file)
--- a/232.out
+++ b/232.out
@@ -2,7 +2,6 @@ QA output created by 232
 
 Testing fsstress
 
-fsstress -n 2000 -d outdir -p 7
 seed = S
 Comparing user usage
 Comparing group usage
diff --git a/233 b/233
index 28e6ac79b3efc05395e1239d4d839dac071b7a72..649de51a01ee63c58b55bb3285f511e3e54c494e 100755 (executable)
--- a/233
+++ b/233
@@ -58,12 +58,12 @@ _fsstress()
 
        out=$SCRATCH_MNT/fsstress.$$
        count=5000
-       args="-z \
+       args=`_scale_fsstress_args -z \
 -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
--n $count -d $out -p 7"
+-n $count -d $out -p 7`
 
-       echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
+       echo "fsstress $args" >> tee -a $here/$seq.full
        if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $here/$seq.full | _filter_num
        then
                echo "    fsstress $args returned $?"
diff --git a/233.out b/233.out
index fa36ca347ae2fe951772482ff3a75827a161bb98..91c1a301d44da3b86a88185f4f1efebe957f60f5 100644 (file)
--- a/233.out
+++ b/233.out
@@ -2,7 +2,6 @@ QA output created by 233
 
 Testing fsstress
 
-fsstress -z -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 -n 5000 -d outdir -p 7
 seed = S
 Comparing user usage
 Comparing group usage
diff --git a/269 b/269
index 7e13ed99c71ab0774ae571bd63c05dbf095e35f9..7d63b874263662f300dd150c3d2fc61792960394 100755 (executable)
--- a/269
+++ b/269
@@ -45,7 +45,7 @@ _workout()
        num_iterations=10
        enospc_time=2
        out=$SCRATCH_MNT/fsstress.$$
-       args="-p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out"
+       args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out`
        echo "fsstress $args" >> $here/$seq.full
        $FSSTRESS_PROG $args > /dev/null 2>&1 &
        pid=$!
diff --git a/270 b/270
index b9ada27c349cbeac8cf3567d9305f8801b1505ec..b75392339eff274e1786e447c8bc3eea9a656de5 100755 (executable)
--- a/270
+++ b/270
@@ -48,7 +48,7 @@ _workout()
        num_iterations=10
        enospc_time=2
        out=$SCRATCH_MNT/fsstress.$$
-       args="-p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out"
+       args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out`
        echo "fsstress $args" >> $here/$seq.full
        # Grant chown capability 
        cp $FSSTRESS_PROG  $tmp.fsstress.bin
index 9eadaf5670bd01d34d82d1bc172c3ca09d24505f..23e9be63b38a0b159b9ee018c147a8698c7f4b49 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -1860,6 +1860,20 @@ _destroy_loop_device()
        losetup -d $dev || _fail "Cannot destroy loop device $dev"
 }
 
+_scale_fsstress_args()
+{
+    args=""
+    while [ $# -gt 0 ]; do
+        case "$1" in
+            -n) args="$args $1 $(($2 * $TIME_FACTOR))"; shift ;;
+            -p) args="$args $1 $(($2 * $LOAD_FACTOR))"; shift ;;
+            *) args="$args $1" ;;
+        esac
+        shift
+    done
+    echo $args
+}
+
 ################################################################################
 
 if [ "$iam" != new -a "$iam" != bench ]
diff --git a/group b/group
index 035ddfe7550ff2cf4a72e990ff46e66fb390a845..7bf814446e2c584660883846ddcefdcb5d5f7fb1 100644 (file)
--- a/group
+++ b/group
@@ -137,7 +137,7 @@ stress
 014 rw udf auto quick
 015 other auto quick
 016 rw auto quick
-017 mount auto quick
+017 mount auto quick stress
 018 deprecated # log logprint v2log
 019 mkfs auto quick
 020 metadata attr udf auto quick
@@ -188,26 +188,26 @@ stress
 065 dump auto
 066 dump ioctl auto quick
 067 acl attr auto quick
-068 other auto freeze dangerous
+068 other auto freeze dangerous stress
 069 rw udf auto quick
-070 attr udf auto quick
+070 attr udf auto quick stress
 071 rw auto
 072 rw auto prealloc quick
 073 copy auto
 074 rw udf auto
 075 rw udf auto quick
-076 metadata rw udf auto quick
+076 metadata rw udf auto quick stress
 077 acl attr auto enospc
 078 growfs auto quick
 079 acl attr ioctl metadata auto quick
 080 rw ioctl
 081 deprecated # log logprint quota
 082 deprecated # log logprint v2log
-083 rw auto
+083 rw auto enospc stress
 084 ioctl rw auto
 085 log auto quick
 086 log v2log auto
-087 log v2log auto quota
+087 log v2log auto quota stress
 088 perms auto quick
 089 metadata auto
 090 rw auto
@@ -224,7 +224,7 @@ stress
 101 udf
 102 udf
 103 metadata dir ioctl auto quick
-104 growfs ioctl prealloc auto
+104 growfs ioctl prealloc auto stress
 105 acl auto quick
 106 quota
 107 quota
@@ -234,7 +234,7 @@ stress
 111 ioctl
 112 rw aio auto quick
 113 rw aio auto quick
-114 parent attr
+114 parent attr stress
 115 parent attr
 116 quota auto quick
 117 attr auto quick
@@ -287,7 +287,7 @@ stress
 164 rw pattern auto prealloc quick
 165 rw pattern auto prealloc quick
 166 rw metadata auto quick
-167 rw metadata auto
+167 rw metadata auto stress
 168 dmapi auto
 169 rw metadata auto quick
 170 rw filestreams auto quick
@@ -355,8 +355,8 @@ stress
 229 auto rw
 230 auto quota quick
 231 auto quota
-232 auto quota
-233 auto quota
+232 auto quota stress
+233 auto quota stress
 234 auto quota
 235 auto quota quick
 236 auto quick metadata
@@ -392,8 +392,8 @@ stress
 266 dump ioctl auto quick
 267 dump ioctl tape
 268 dump ioctl tape
-269 auto rw prealloc ioctl enospc
-270 auto quota rw prealloc ioctl enospc
+269 auto rw prealloc ioctl enospc stress
+270 auto quota rw prealloc ioctl enospc stress
 271 auto rw quick
 272 auto enospc rw
 273 auto rw