Whamcloud - gitweb
Update scripts to not do vector reads on BA OSTs.
[fs/lustre-release.git] / lustre / tests / runregression-net.sh
1 #!/bin/sh
2 export PATH=/sbin:/usr/sbin:$PATH
3
4 SRCDIR="`dirname $0`/"
5 . $SRCDIR/common.sh
6
7 setup_opts $@
8
9 setup_portals
10 setup_lustre
11
12 runthreads() {
13         THR=$1
14         DO=$2
15         CNT=$3
16         V=$4
17         PGS=$5
18
19         case $DO in
20         test_getattr)
21                 RW=
22                 ;;
23         test_brw_write)
24                 DO=test_brw
25                 RW=w
26                 ;;
27
28         test_brw_read)
29                 DO=test_brw
30                 RW=r
31                 ;;
32         esac
33
34         $OBDCTL --threads $THR v '$OSCDEV' $DO $CNT $RW $V $PGS $OID || exit 1
35
36         if [ -e endrun ]; then
37                 rm endrun
38                 echo "exiting because endrun file was found"
39                 exit 0
40         fi
41 }
42
43 setup_server || exit -1
44 setup_client || exit -1
45
46 OID=`$OBDCTL --device '$OSCDEV' create 1 | awk '/is object id/ { print $6 }'`
47
48 # TODO: obdctl needs to check on the progress of each forked thread
49 #       (IPC SHM, sockets?) to see if it hangs.
50 for CMD in test_getattr test_brw_write test_brw_read; do
51         case $CMD in
52         test_getattr)
53                 PG=
54                 PGV=
55                 ;;
56         test_brw_write)
57                 PG=1
58                 PGV=16
59                 ;;
60
61         test_brw_read)
62                 PG=1
63                 case $OSTNODE in
64                 ba*) PGV= ;; # disabled until the BA OST code is updated
65                 *) PGV=16 ;;
66                 esac
67                 ;;
68         esac
69
70         # We use '--threads 1 X' instead of '--device X' so that
71         # obdctl can monitor the forked thread for progress (TODO).
72         runthreads 1 $CMD 1 1 $PG
73         runthreads 1 $CMD 100 1 $PG
74
75         debug_server_off
76         debug_client_off
77         runthreads 1 $CMD 10000 100 $PG
78         [ "$PGV" ] && runthreads 1 $CMD 1000 100 $PGV
79
80         runthreads 1 $CMD 1000000 -30 $PG
81         [ "$PGV" ] && runthreads 1 $CMD 100000 -30 $PGV
82
83         debug_server_on
84         debug_client_on
85         runthreads 1 $CMD 100 1 $PG
86
87         debug_server_off
88         debug_client_off
89         runthreads 2 $CMD 10000 100 $PG
90         [ "$PGV" ] && runthreads 2 $CMD 1000 100 $PGV
91
92         runthreads 2 $CMD 1000000 -30 $PG
93         [ "$PGV" ] && runthreads 2 $CMD 100000 -30 $PGV
94
95         runthreads 10 $CMD 10000 1000 $PG
96         [ "$PGV" ] && runthreads 10 $CMD 1000 1000 $PGV
97
98         runthreads 100 $CMD 10000 -30 $PG
99 done
100
101 $OBDCTL --device '$OSCDEV' destroy $OID
102
103 cleanup_client || exit -1
104 cleanup_server || exit -1
105 cleanup_lustre
106 cleanup_portals