Whamcloud - gitweb
a434dae3260a55b2997984745f21a8d408d2638b
[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         # We use '--threads 1 X' instead of '--device X' so that
25         # obdctl can modnitor the forked thread for progress (TODO).
26         $OBDCTL --threads 1 v $OSC_DEVNO $CMD 1 $RW v || exit -1
27         $OBDCTL --threads 1 v $OSC_DEVNO $CMD 100 $RW v || exit -1
28
29         #cleanup_client || exit -1
30         #cleanup_server || exit -1
31
32         #setup_server || exit -1
33         #setup_client || exit -1
34
35         debug_server_off
36         debug_client_off
37         $OBDCTL --threads 1 v $OSC_DEVNO $CMD 10000 $RW 100 || exit -1
38         $OBDCTL --threads 1 v $OSC_DEVNO $CMD 1000000 $RW -10 || exit -1
39
40         debug_server_on
41         debug_client_on
42         $OBDCTL --threads 2 v $OSC_DEVNO $CMD 100 $RW v || exit -1
43
44         debug_server_off
45         debug_client_off
46         $OBDCTL --threads 2 v $OSC_DEVNO $CMD 10000 $RW 100 || exit -1
47         $OBDCTL --threads 2 v $OSC_DEVNO $CMD 1000000 $RW -30 || exit -1
48
49         $OBDCTL --threads 10 v $OSC_DEVNO $CMD 10000 $RW 1000 || exit -1
50         $OBDCTL --threads 100 v $OSC_DEVNO $CMD 10000 $RW -30 || exit -1
51
52         cleanup_client || exit -1
53         cleanup_server || exit -1
54 done
55
56 cleanup_lustre
57 cleanup_portals