Whamcloud - gitweb
Fix OSC_DEVNO. It was set initially in the inferior environment variable
[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 # 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
15         case $CMD in
16         test_brw_read)  CMD=test_brw; RW=r ;;
17         test_brw_write) CMD=test_brw; RW=w ;;
18         *)              RW= ;;
19         esac
20
21         setup_server || exit -1
22         setup_client || exit -1
23
24         OSC_DEVNO=`$OBDCTL name2dev OSCDEV`
25
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
30
31         #cleanup_client || exit -1
32         #cleanup_server || exit -1
33
34         #setup_server || exit -1
35         #setup_client || exit -1
36
37         debug_server_off
38         debug_client_off
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
41
42         debug_server_on
43         debug_client_on
44         $OBDCTL --threads 2 v $OSC_DEVNO $CMD 100 $RW v || exit -1
45
46         debug_server_off
47         debug_client_off
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
50
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
53
54         cleanup_client || exit -1
55         cleanup_server || exit -1
56 done
57
58 cleanup_lustre
59 cleanup_portals