2 export PATH=/sbin:/usr/sbin:$PATH
12 # TODO: obdctl needs to check on the progress of each forked thread
13 # (IPC SHM, sockets?) to see if it hangs.
14 for CMD in test_getattr test_brw_read test_brw_write; do
16 test_brw_read) CMD=test_brw; RW=r ;;
17 test_brw_write) CMD=test_brw; RW=w ;;
21 setup_server || exit -1
22 setup_client || exit -1
24 OSC_DEVNO=`$OBDCTL name2dev OSCDEV`
26 # We use '--threads 1 X' instead of '--device X' so that
27 # obdctl can modnitor the forked thread for progress (TODO).
28 $OBDCTL --threads 1 v $OSC_DEVNO $CMD 1 $RW v || exit -1
29 $OBDCTL --threads 1 v $OSC_DEVNO $CMD 100 $RW v || exit -1
31 #cleanup_client || exit -1
32 #cleanup_server || exit -1
34 #setup_server || exit -1
35 #setup_client || exit -1
39 $OBDCTL --threads 1 v $OSC_DEVNO $CMD 10000 $RW 100 || exit -1
40 $OBDCTL --threads 1 v $OSC_DEVNO $CMD 1000000 $RW -10 || exit -1
44 $OBDCTL --threads 2 v $OSC_DEVNO $CMD 100 $RW v || exit -1
48 $OBDCTL --threads 2 v $OSC_DEVNO $CMD 10000 $RW 100 || exit -1
49 $OBDCTL --threads 2 v $OSC_DEVNO $CMD 1000000 $RW -30 || exit -1
51 $OBDCTL --threads 10 v $OSC_DEVNO $CMD 10000 $RW 1000 || exit -1
52 $OBDCTL --threads 100 v $OSC_DEVNO $CMD 10000 $RW -30 || exit -1
54 cleanup_client || exit -1
55 cleanup_server || exit -1