check: allow '-e testid' to exclude a single test
[xfstests-dev.git] / dmapi / src / suite2 / data / standard.dat
1 //
2 // Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
3 //
4 // This test will use the following files:
5 //
6 ctf stf ls_to_copy ctest.c
7 fcntl open_test truncate rd wf mmap_cp
8 read_invis write_invis
9 set_region set_return_on_destroy 
10 --------------------------------------------
11 // These setup commands are run before the daemon starts.
12 // They reset the file structure of the test directory
13 // to a known state.
14 //
15 rm $real_dir/???
16 rm $real_dir/mmap_cp_testfile
17 $1/ctf $1 $real_dir
18 $1/stf $1 $real_dir/l??
19 rm $real_dir/ctest.c
20 cp $1/ctest.c $real_dir
21 chown $lname $real_dir/l??
22 chown $lname $real_dir/ctest.c
23 $1/set_return_on_destroy $real_dir test
24 --------------------------------------------
25 @@  Memory-mapped copying test: (1 of 3)
26 @@
27 $1/mmap_cp $2/ll1 $2/mmap_cp_testfile
28 event_count 3
29 event[0] create
30 event[1] postcreate
31 event[2] read
32 --------------------------------------------
33 @@  Memory-mapped copying test: (2 of 3)
34 @@
35 $1/mmap_cp $2/ll1 $2/mmap_cp_testfile
36 event_count 1
37 event[0] read
38 --------------------------------------------
39 @@  Memory-mapped copying test: (3 of 3)
40 @@
41 $1/mmap_cp $2/ll1 $2/ll2
42 event_count 2
43 event[0] read
44 event[1] write
45 --------------------------------------------
46 @@  Preunmount/unmount test 
47 @@     (note: if you abort before the next test, the 
48 @@      filesystem will remain unmounted)
49 @@
50 run_as_root
51 umount $3
52 event_count 2
53 event[0] preunmount
54 event[1] unmount
55 fs_handle[0] matches fs_handle[1]
56 fs_handle[0] store_in fsh
57 root_handle[0] store_in rh
58 unmount_mode[0] NOFORCE
59 unmount_mode[1] NOFORCE
60 --------------------------------------------
61 @@  Mount test  
62 @@     (Note: assorted settings will be restored in next tests)
63 @@
64 run_as_root
65 mount $3
66 event_count 1
67 event[0] mount
68 fs_handle[0] matches fsh
69 mountpoint_handle[0] <BAD_HANDLE_hlen_0>
70 mountpoint_path[0] /dmitest
71 mode[0] 0
72 root_handle matches rh 
73 --------------------------------------------
74 @@  (after remount: restoring event dispositions on fs)
75 @@
76 run_as_root
77 $1/send_msg reset_fs
78 event_count 1
79 event[0] user
80 msg_str[0] reset_fs
81 --------------------------------------------
82 @@  (after remount: restoring managed regions on files
83 @@   and setting destroy events to return "test" attribute)
84 @@
85 run_without_test
86 $1/stf $1 $real_dir/l??
87 $1/set_return_on_destroy $real_dir test
88 -------------------------------------------
89 @@ Standard i/o tests (1 of 26):  open
90 @@
91 $1/open_test $2/ls0 o_rdwr
92 event_count 1
93 event[0] read
94 --------------------------------------------
95 @@ Standard i/o tests (2 of 26):  open/trunc
96 @@
97 $1/open_test $2/ls1 o_rdwr o_trunc
98 event_count 2
99 event[0] truncate
100 event[1] attribute
101 --------------------------------------------
102 @@ Standard i/o tests (3 of 26):  open/trunc/create
103 @@
104 $1/open_test $2/ls2 o_rdwr o_trunc o_creat
105 event_count 1
106 event[0] truncate
107 --------------------------------------------
108 @@ Standard i/o tests (4 of 26):  open/create
109 @@
110 $1/open_test $2/ls3 o_rdwr o_creat
111 event_count 1
112 event[0] read
113 --------------------------------------------
114 @@ Standard i/o tests (5 of 26):  new file
115 @@
116 $1/open_test $2/LS3 o_rdwr o_creat
117 event_count 2
118 event[0] create
119 event[1] postcreate
120 --------------------------------------------
121 @@ Standard i/o tests (6 of 26):  append #1
122 @@
123 echo j >> $2/ls4
124 event_count 1
125 event[0] write
126 file_handle[0] store_in ls4temp
127 --------------------------------------------
128 @@ Standard i/o tests (7 of 26):  append #2
129 @@
130 echo j >> $2/ls4
131 event_count 1
132 event[0] write
133 file_handle[0] matches ls4temp
134 --------------------------------------------
135 @@ Standard i/o tests (8 of 26):  remove
136 @@
137 /bin/rm $2/ls4
138 event_count 3
139 event[0] remove
140 event[1] destroy
141 event[2] postremove
142 name[1] test
143 contents[1] 123456789abcdefghijklmnopqrstuvwxyz
144 --------------------------------------------
145 @@ Standard i/o tests (9 of 26):  link
146 @@
147 ln $2/ls5 $2/LS5
148 event_count 2
149 event[0] link
150 event[1] postlink
151 --------------------------------------------
152 @@ Standard i/o tests (10 of 26):  deleting link
153 @@
154 /bin/rm $2/LS5
155 event_count 2
156 event[0] remove
157 event[1] postremove
158 --------------------------------------------
159 @@ Standard i/o tests (11 of 26):  return_on_destroy #1
160 @@
161 run_without_test
162 $1/set_return_on_destroy $real_dir
163 --------------------------------------------
164 @@ Standard i/o tests (12 of 26):  return_on_destroy #2
165 @@
166 /bin/rm $2/ls5
167 event_count 3
168 event[0] remove
169 event[1] destroy
170 event[2] postremove
171 name[1] <NONE>
172 contents[1] <NONE>
173 --------------------------------------------
174 @@ Standard i/o tests (13 of 26)
175 @@
176 $1/fcntl f_freesp -o 99999 -l 199999 $2/ls6
177 event_count 2
178 event[0] truncate
179 event[1] attribute
180 --------------------------------------------
181 @@ Standard i/o tests (14 of 26)
182 @@
183 $1/fcntl f_freesp -o 1000 -l 10000 $2/ls6
184 event_count 2
185 event[0] truncate
186 event[1] attribute
187 --------------------------------------------
188 @@ Standard i/o tests (15 of 26) truncate #1
189 @@
190 $1/truncate $2/ls7 99999
191 event_count 2
192 event[0] truncate
193 event[1] attribute
194 --------------------------------------------
195 @@ Standard i/o tests (16 of 26) truncate #2
196 @@
197 $1/truncate $2/ls7 1000
198 event_count 2
199 event[0] truncate
200 event[1] attribute
201 --------------------------------------------
202 @@ Standard i/o tests (17 of 26) execute
203 @@
204 $2/ls8 -l $real_dir
205 event[0] read
206 event[1] read
207 event[2] read
208 event[3] read
209 event[4] read
210 offset[0] 0
211 length[0] 29604
212 file_handle[0] matches file_handle[1]
213 file_handle[0] matches file_handle[2]
214 file_handle[0] matches file_handle[3]
215 --------------------------------------------
216 @@ Standard i/o tests (18 of 26) symlink
217 @@
218 ln -s $2/junk $2/symlink
219 event_count 2
220 event[0] symlink
221 event[1] postsymlink
222 --------------------------------------------
223 @@ Standard i/o tests (19 of 26) deleting symlink
224 @@
225 /bin/rm $2/symlink
226 event_count 3
227 event[0] remove
228 event[1] destroy
229 event[2] postremove
230 --------------------------------------------
231 @@ Standard i/o tests (20 of 26) mkdir
232 @@
233 mkdir $2/unlikely-named-test-dir
234 event_count 2
235 event[0] create
236 event[1] postcreate
237 --------------------------------------------
238 @@ Standard i/o tests (21 of 26) rmdir
239 @@
240 rmdir $2/unlikely-named-test-dir
241 event_count 3
242 event[0] remove
243 event[1] destroy
244 event[2] postremove
245 --------------------------------------------
246 @@ Standard i/o tests (22 of 26) rename
247 @@
248 mv $2/ls8 $2/LS8
249 event_count 2
250 event[0] rename
251 event[1] postrename
252 --------------------------------------------
253 @@ Standard i/o tests (23 of 26) copy (new)
254 @@
255 cp $2/ls9 $2/LS9
256 event_count 9
257 event[0] create
258 event[1] postcreate
259 event[2] attribute
260 event[3] read
261 event[4] read
262 event[5] read
263 event[6] read
264 event[7] read
265 event[8] attribute
266 --------------------------------------------
267 @@ Standard i/o tests (24 of 26) copy (onto old)
268 @@
269 cp $2/LS9 $2/ls9
270 event_count 5
271 event[0] truncate
272 event[1] write
273 event[2] write
274 event[3] write
275 event[4] write
276 --------------------------------------------
277 @@ Standard i/o tests (25 of 26) memory-mapped i/o
278 @@
279 // Note to self: don't check event_count
280 //
281 cc -o $2/ll0 $2/ctest.c
282 event[0] truncate
283 event[1] write
284 event[2] attribute
285 event[3] read
286 event[4] write
287 --------------------------------------------
288 @@ Standard i/o tests (26 of 26) executing
289 @@
290 $2/ll0
291 event[0] read
292 event[1] read
293 event[2] read
294 event[3] read
295 event[4] read