2 export PATH=/sbin:/usr/sbin:$PATH
34 if [ -e endrun ]; then
36 echo "exiting because of endrun"
40 $OBDCTL --threads $THR v '$OSCDEV' $DO $CNT $RW $V $PGS $OID || exit 1
43 # TODO: obdctl needs to check on the progress of each forked thread
44 # (IPC SHM, sockets?) to see if it hangs.
45 for CMD in test_getattr test_brw_write test_brw_read; do
46 setup_server || exit -1
47 setup_client || exit -1
53 OID=`$OBDCTL --device '$OSCDEV' create 1 | \
54 awk '/is object id/ { print $6 }'`
67 # We use '--threads 1 X' instead of '--device X' so that
68 # obdctl can monitor the forked thread for progress (TODO).
69 runthreads 1 $CMD 1 1 $PG
70 runthreads 1 $CMD 100 1 $PG
72 #cleanup_client || exit -1
73 #cleanup_server || exit -1
75 #setup_server || exit -1
76 #setup_client || exit -1
80 runthreads 1 $CMD 10000 100 $PG
81 [ "$PGV" ] && runthreads 1 $CMD 1000 100 $PGV
83 runthreads 1 $CMD 1000000 -30 $PG
84 [ "$PGV" ] && runthreads 1 $CMD 100000 -30 $PGV
88 runthreads 1 $CMD 100 1 $PG
92 runthreads 2 $CMD 10000 100 $PG
93 [ "$PGV" ] && runthreads 2 $CMD 1000 100 $PGV
95 runthreads 2 $CMD 1000000 -30 $PG
96 [ "$PGV" ] && runthreads 2 $CMD 100000 -30 $PGV
98 runthreads 10 $CMD 10000 1000 $PG
99 [ "$PGV" ] && runthreads 10 $CMD 1000 1000 $PGV
101 runthreads 100 $CMD 10000 -30 $PG
103 [ "$CMD" = "test_brw_read" ] && $OBDCTL --device '$OSCDEV' destroy $OID
105 cleanup_client || exit -1
106 cleanup_server || exit -1