6 sh llmountcleanup.sh > /dev/null
11 sh llrmount.sh > /dev/null
25 echo '== touch .../f ; rm .../f ======================== test 0'
27 [ -f /mnt/lustre/f ] || error
29 [ ! -f /mnt/lustre/f ] || error
34 echo '== mkdir .../d1; mkdir .../d1/d2 ================= test 1'
36 mkdir /mnt/lustre/d1/d2
37 [ -d /mnt/lustre/d1/d2 ] || error
42 echo '== rmdir .../d1/d2; rmdir .../d1 ================= test 1b'
43 rmdir /mnt/lustre/d1/d2
45 [ ! -d /mnt/lustre/d1 ] || error
50 echo '== mkdir .../d2; touch .../d2/f ================== test 2'
52 touch /mnt/lustre/d2/f
56 echo '== rm -r .../d2; touch .../d2/f ================== test 2b'
61 echo '== mkdir .../d3 ================================== test 3'
65 echo '== touch .../d3/f ================================ test 3b'
66 touch /mnt/lustre/d3/f
69 echo '== rm -r .../d3 ================================== test 3c'
74 echo '== mkdir .../d4 ================================== test 4'
78 echo '== mkdir .../d4/d2 =============================== test 4b'
79 mkdir /mnt/lustre/d4/d2
83 echo '== mkdir .../d5; mkdir .../d5/d2; chmod .../d5/d2 = test 5'
85 mkdir /mnt/lustre/d5/d2
86 chmod 0666 /mnt/lustre/d5/d2
90 echo '== touch .../f6; chmod .../f6 ==================== test 6'
92 chmod 0666 /mnt/lustre/f6
96 echo '== mkdir .../d7; mcreate .../d7/f; chmod .../d7/f = test 7'
98 ./mcreate /mnt/lustre/d7/f
99 chmod 0666 /mnt/lustre/d7/f
103 echo '== mkdir .../d8; touch .../d8/f; chmod .../d8/f == test 8'
105 touch /mnt/lustre/d8/f
106 chmod 0666 /mnt/lustre/d8/f
111 echo '== mkdir .../d9; mkdir .../d9/d2; mkdir .../d9/d2/d3 == test 9'
113 mkdir /mnt/lustre/d9/d2
114 mkdir /mnt/lustre/d9/d2/d3
119 echo '== mkdir .../d10; mkdir .../d10/d2; touch .../d10/d2/f = test 10'
120 mkdir /mnt/lustre/d10
121 mkdir /mnt/lustre/d10/d2
122 touch /mnt/lustre/d10/d2/f
126 echo '=================================================== test 11'
127 mkdir /mnt/lustre/d11
128 mkdir /mnt/lustre/d11/d2
129 chmod 0666 /mnt/lustre/d11/d2
130 chmod 0555 /mnt/lustre/d11/d2
134 echo '=================================================== test 12'
135 mkdir /mnt/lustre/d12
136 touch /mnt/lustre/d12/f
137 chmod 0666 /mnt/lustre/d12/f
138 chmod 0555 /mnt/lustre/d12/f
142 echo '=================================================== test 13'
143 mkdir /mnt/lustre/d13
144 cp /etc/passwd /mnt/lustre/d13/f
150 echo '=================================================== test 14'
151 mkdir /mnt/lustre/d14
152 touch /mnt/lustre/d14/f
158 echo '=================================================== test 15'
159 mkdir /mnt/lustre/d15
160 touch /mnt/lustre/d15/f
161 mv /mnt/lustre/d15/f /mnt/lustre/d15/f2
165 echo '=================================================== test 16'
166 mkdir /mnt/lustre/d16
167 touch /mnt/lustre/d16/f
168 rm -rf /mnt/lustre/d16/f
172 echo '== symlinks: create, remove (dangling and real) === test 17'
173 mkdir /mnt/lustre/d17
174 touch /mnt/lustre/d17/f
175 ln -s /mnt/lustre/d17/f /mnt/lustre/d17/l-exist
176 ln -s no-such-file /mnt/lustre/d17/l-dangle
177 ls -l /mnt/lustre/d17
178 rm -f /mnt/lustre/l-dangle
179 rm -f /mnt/lustre/l-exist
183 echo '== touch /mnt/lustre/f ; ls /mnt/lustre ========== test 18'
189 echo '== touch /mnt/lustre/f ; ls -l /mnt/lustre ======= test 19'
196 echo '== touch /mnt/lustre/f ; ls -l /mnt/lustre ======= test 20'
209 echo '== write to dangling link ======================= test 21'
210 mkdir /mnt/lustre/d21
211 ln -s dangle /mnt/lustre/d21/link
212 echo foo >> /mnt/lustre/d21/link
213 cat /mnt/lustre/d21/dangle
217 echo '== unpack tar archive as nonroot user =========== test 22'
218 mkdir /mnt/lustre/d22
219 chown 4711 /mnt/lustre/d22
220 sudo -u \#4711 tar cf - /etc/hosts /etc/sysconfig/network | sudo -u \#4711 tar xfC - /mnt/lustre/d22
221 ls -lR /mnt/lustre/d22/etc
225 echo '== O_CREAT|O_EXCL in subdir ===================== test 23'
226 mkdir /mnt/lustre/d23
227 ./toexcl /mnt/lustre/d23/f23
228 ./toexcl /mnt/lustre/d23/f23
232 echo '== rename sanity ============================= test24'
233 echo '-- same directory rename'
234 echo '-- test 24-R1: touch a ; rename a b'
236 touch /mnt/lustre/R1/f
237 mv /mnt/lustre/R1/f /mnt/lustre/R1/g
241 echo '-- test 24-R2: touch a b ; rename a b;'
243 touch /mnt/lustre/R2/{f,g}
244 mv /mnt/lustre/R2/f /mnt/lustre/R2/g
248 echo '-- test 24-R3: mkdir a ; rename a b;'
250 mkdir /mnt/lustre/R3/f
251 mv /mnt/lustre/R3/f /mnt/lustre/R3/g
255 echo '-- test 24-R4: mkdir a b ; rename a b;'
257 mkdir /mnt/lustre/R4/{f,g}
258 perl -e 'rename "/mnt/lustre/R3/f", "/mnt/lustre/R3/g";'
262 echo '-- cross directory renames --'
263 echo '-- test 24-R5: touch a ; rename a b'
264 mkdir /mnt/lustre/R5{a,b}
265 touch /mnt/lustre/R5a/f
266 mv /mnt/lustre/R5a/f /mnt/lustre/R5b/g
270 echo '-- test 24-R6: touch a ; rename a b'
271 mkdir /mnt/lustre/R6{a,b}
272 touch /mnt/lustre/R6a/f /mnt/lustre/R6b/g
273 mv /mnt/lustre/R6a/f /mnt/lustre/R6b/g
277 echo '-- test 24-R7: touch a ; rename a b'
278 mkdir /mnt/lustre/R7{a,b}
279 mkdir /mnt/lustre/R7a/f
280 mv /mnt/lustre/R7a/f /mnt/lustre/R7b/g
284 echo '-- test 24-R8: touch a ; rename a b'
285 mkdir /mnt/lustre/R8{a,b}
286 mkdir /mnt/lustre/R8a/f /mnt/lustre/R8b/g
287 perl -e 'rename "/mnt/lustre/R8a/f", "/mnt/lustre/R8b/g";'
291 echo "-- rename error cases"
292 echo "-- test 24-R9 target error: touch f ; mkdir a ; rename f a"
294 mkdir /mnt/lustre/R9/a
295 touch /mnt/lustre/R9/f
296 perl -e 'rename "/mnt/lustre/R9/f", "/mnt/lustre/R9/a";'
300 echo "--test 24-R10 source does not exist"
301 mkdir /mnt/lustre/R10
302 mv /mnt/lustre/R10/f /mnt/lustre/R10/g
306 echo '======================= finished ======================='