Whamcloud - gitweb
merge b_md into HEAD:
[fs/lustre-release.git] / lustre / tests / sanityN.sh
1 #!/bin/bash
2
3 export NAME=$NAME
4 clean() {
5         echo -n "cleanup..."
6         sh llmount2-hackcleanup.sh > /dev/null
7 }
8
9 CLEAN=clean
10 start() {
11         echo -n "mounting..."
12         sh llmount2-hack.sh > /dev/null
13         echo -n "mounted"
14 }
15 START=start
16
17 error () { 
18     echo $1
19     exit 1
20 }
21
22 echo -n "test 1: check create on 2 mtpt's..."
23 touch /mnt/lustre1/f1
24 [ -f /mnt/lustre2/f1 ] || error "test 1 failure" 
25 echo "pass"
26
27 echo -n "test 2: check attribute updates on 2 mtpt's..."
28 chmod a+x /mnt/lustre2/f1
29 [ -x /mnt/lustre1/f1 ] || error "test 2 failure"
30 echo "pass"
31
32 echo -n "test 3: check after remount attribute updates on 2 mtpt's..."
33 chmod a-x /mnt/lustre2/f1
34 $CLEAN
35 $START
36
37 [ ! -x /mnt/lustre1/f1 ] || error "test 3 failure"
38 echo "pass"
39
40 echo -n "test 4: symlink on one mtpt, readlink on another..."
41 ( cd /mnt/lustre1 ; ln -s this/is/good lnk )
42
43 [ "Xthis/is/good" = X`perl -e 'print readlink("/mnt/lustre2/lnk");'` ] || error  "test 4 fails"
44 echo "pass"
45
46 echo -n "test 5: fstat validation on multiple mount points..."
47 ./multifstat /mnt/lustre1/fstatfile /mnt/lustre2/fstatfile || error "test 5 fails"
48 echo "pass"
49
50 echo -n "test 9: remove of open file on other node..."
51 touch /mnt/lustre1/f9
52 tail -f /mnt/lustre/f9 &
53 rm /mnt/lustre2/f9
54 kill %1
55 cat /mnt/lustre1/f9 && error "test 9 fails"
56 echo "pass"
57
58 $CLEAN
59 $START
60
61
62
63 exit