Whamcloud - gitweb
Simple script to test all of the network packet loss scenarios.
[fs/lustre-release.git] / lustre / tests / runfailure-net
1 #!/bin/sh
2
3 set -vx
4
5 run() {
6         echo $1 > /proc/sys/lustre/fail_loc
7         shift
8         $* &
9         sleep 1
10         kill $!
11 }
12
13 # GETATTR_NET - ls will hang on the getattr
14 run 0x102 ls /mnt/obd/lost+found
15
16 # READPAGE_NET - ls will hang reading in new pages (lost+found is not in cache)
17 run 0x104 ls /mnt/obd/lost+found
18
19 # REINT_NET - touch will hang on setattr
20 run 0x107 touch /mnt/obd
21
22 # REINT_NET - touch will hang on create
23 run 0x107 touch /mnt/obd/tt
24
25 # REINT_NET - mv will hang on rename
26 run 0x107 mv /mnt/obd/lost+found /mnt/obd/lost
27
28 # REINT_NET - rm will hang on unlink
29 run 0x107 rmdir /mnt/obd/lost+found
30
31 # OPEN_NET - ls will hang on open
32 run 0x107 ls /mnt/obd/lost+found
33
34 # CLOSE_NET - ls will hang on close
35 run 0x107 ls /mnt/obd/lost+found
36
37 run 0 ls -a /mnt/obd/lost+found