Whamcloud - gitweb
merge b_devel to b_eq again: 20030801, for convenience of WangDi.
authorericm <ericm>
Fri, 1 Aug 2003 03:55:10 +0000 (03:55 +0000)
committerericm <ericm>
Fri, 1 Aug 2003 03:55:10 +0000 (03:55 +0000)
lustre/tests/acceptance-metadata-double.sh
lustre/tests/compile.sh
lustre/tests/recovery-cleanup.sh

index 496f3b4..c8d5dd8 100644 (file)
@@ -10,6 +10,20 @@ SRCDIR="`dirname $0`"
 CREATE=$SRCDIR/create.pl
 RENAME=$SRCDIR/rename.pl
 
+TIME=${TIME:-/usr/bin/time}
+
+display_elapsed_time() {
+    PREVIOUS_TS=$CURRENT_TS
+    CURRENT_TS=`date +%s`
+    BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS`
+    TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS`
+
+    echo " "
+    echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds"
+    echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds"
+    echo " "
+}    
+
 debug_client_on()
 {
        echo -1 > /proc/sys/portals/debug
@@ -22,73 +36,93 @@ debug_client_off()
 
 MNT=${MNT:-/mnt/lustre}
 
+# Get our initial timestamps.
+START_TS=`date +%s`
+CURRENT_TS=$START_TS
+PREVIOUS_TS=$START_TS
+
 debug_client_on
 echo "create.pl, 2 mounts, 1 thread, 10 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10
 echo "create.pl, 2 mounts, 1 thread, 100 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 10 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10 --use_mcreate=0
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10 --use_mcreate=0
 echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 100 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 1 thread, 10 ops, debug on"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=10
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=10
 echo "rename.pl, 2 mounts, 1 thread, 100 ops, debug on"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent
+
+display_elapsed_time
 
 debug_client_off
 echo "create.pl, 2 mounts, 1 thread, 1000 ops, debug off"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 1000 ops, debug off"
-perl $CREATE --silent --use_mcreate=0 -- $MNT 2 1000
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 1 thread, 1000 ops, debug off"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent
+
+display_elapsed_time
 
 debug_client_on
 echo "create.pl, 2 mounts, 2 threads, 100 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 2 threads, 100 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 2 thread, 1000 ops, debug on"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --num_threads=2 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --num_threads=2 --silent
+
+display_elapsed_time
 
 debug_client_off
 echo "create.pl, 2 mounts, 2 threads, 2000 ops, debug off"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 2 threads, 2000 ops, debug off"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 2 threads, 2000 ops, debug off"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent
+
+display_elapsed_time
 
 debug_client_on
 echo "create.pl, 2 mounts, 4 threads, 100 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 4 threads, 100 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug on"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
+
+display_elapsed_time
 
 debug_client_off
 echo "create.pl, 2 mounts, 4 threads, 2000 ops, debug off"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 4 threads, 2000 ops, debug off"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug off"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
+
+display_elapsed_time
 
 debug_client_on
 echo "create.pl, 2 mounts, 8 threads, 500 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 8 threads, 500 ops, debug on"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug on"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
+
+display_elapsed_time
 
 debug_client_off
 echo "create.pl, 2 mounts, 8 threads, 2000 ops, debug off"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
 echo "create.pl --use_mcreate=0, 2 mounts, 8 threads, 2000 ops, debug off"
-perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent
+$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent
 echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug off"
-perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
+$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
+
+display_elapsed_time
index 13c142e..6b5ccd9 100644 (file)
@@ -5,7 +5,7 @@ MNT=${MNT:-/mnt/lustre}
 DIR=${DIR:-$MNT}
 SRC=${SRC:-`dirname $0`/../..}
 while date; do
-       for i in portals lustre; do
+       for i in lustre; do
                TGT=$DIR/$i
                [ -d $TGT ] || cp -av $SRC/$i/ $TGT
                make -C $TGT clean
index fefd2d6..7cdff65 100755 (executable)
@@ -29,15 +29,15 @@ OSTDEV=${OSTDEV:-/tmp/ost-`hostname`}
 OSTSIZE=${OSTSIZE:-100000}
 
 do_mds() {
-    $PDSH $MDSNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@"
+    $PDSH $MDSNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@" || exit $?
 }
 
 do_client() {
-    $PDSH $CLIENT "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@"
+    $PDSH $CLIENT "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@" || exit $?
 }
 
 do_ost() {
-    $PDSH $OSTNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@"
+    $PDSH $OSTNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@" || exit $?
 }
 
 drop_request() {
@@ -88,7 +88,7 @@ setup() {
     make_config
     start_mds ${REFORMAT:---reformat}
     start_ost ${REFORMAT:---reformat}
-    mount_client --timeout=${TIMEOUT:-5} --recovery_upcall=/bin/true
+    mount_client --timeout=${TIMEOUT:-5} --lustre_upcall=/bin/true
 }
 
 cleanup() {
@@ -107,7 +107,7 @@ wait_for_timeout() {
 try_to_cleanup() {
     kill -INT $!
     unmount_client --force --dump /tmp/client-cleanup-`date +%s`.log
-    mount_client --timeout=${TIMEOUT:-5} --recovery_upcall=/bin/true
+    mount_client --timeout=${TIMEOUT:-5} --lustre_upcall=/bin/true
 }
 
 if [ ! -z "$ONLY" ]; then