2 export PATH=/sbin:/usr/sbin:$PATH
29 if [ -e endrun ]; then
31 echo "exiting because endrun file was found"
35 $OBDCTL --threads $THR v '$OSCDEV' $DO $CNT $RW $V $PGS $OID || exit 1
38 if [ -z "`$OBDCTL device_list | grep osc`" ]; then
44 setup_server || exit -1
45 setup_client || exit -1
48 OID=`$OBDCTL --device '$OSCDEV' create 1 | awk '/is object id/ { print $6 }'`
49 [ -z "$OID" ] && echo "error creating object" 1>&2 && exit 1
51 # TODO: obdctl needs to check on the progress of each forked thread
52 # (IPC SHM, sockets?) to see if it hangs.
56 # We use '--threads 1 X' instead of '--device X' so that
57 # obdctl can monitor the forked thread for progress (TODO).
60 runthreads 1 test_brw_write 10000000 -30 $PG
61 runthreads 1 test_brw_read 10000000 -30 $PG
63 [ "$PGV" ] && runthreads 1 test_brw_write 1000000 -30 $PGV
64 [ "$PGV" ] && runthreads 1 test_brw_read 1000000 -30 $PGV
66 runthreads 2 test_brw_write 10000000 -30 $PG
67 runthreads 2 test_brw_read 10000000 -30 $PG
69 [ "$PGV" ] && runthreads 2 test_brw_write 1000000 -30 $PGV
70 [ "$PGV" ] && runthreads 2 test_brw_read 1000000 -30 $PGV
72 runthreads 10 test_brw_write 1000000 -30 $PG
73 runthreads 10 test_brw_read 1000000 -30 $PG
75 [ "$PGV" ] && runthreads 10 test_brw_write 100000 -60 $PGV
76 [ "$PGV" ] && runthreads 10 test_brw_read 100000 -60 $PGV
78 runthreads 32 test_brw_write 1000000 -30 $PG
79 runthreads 32 test_brw_read 1000000 -30 $PG
81 [ "$PGV" ] && runthreads 32 test_brw_write 100000 -60 $PGV
82 [ "$PGV" ] && runthreads 32 test_brw_read 100000 -60 $PGV
84 runthreads 64 test_brw_write 1000000 -30 $PG
85 runthreads 64 test_brw_read 1000000 -30 $PG
87 [ "$PGV" ] && runthreads 64 test_brw_write 100000 -60 $PGV
88 [ "$PGV" ] && runthreads 64 test_brw_read 100000 -60 $PGV
90 runthreads 100 test_brw_write 100000 -60 $PG
91 runthreads 100 test_brw_read 100000 -60 $PG
93 [ "$PGV" ] && runthreads 100 test_brw_write 100000 -60 $PGV
94 [ "$PGV" ] && runthreads 100 test_brw_read 100000 -60 $PGV
97 $OBDCTL --device '$OSCDEV' destroy $OID
99 cleanup_client || exit -1
100 cleanup_server || exit -1