common/rc: factor out _scratch_xfs_[get|set]_sb_field
[xfstests-dev.git] / dmapi / src / suite2 / data / standard_nfs.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 
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 $1/ctf $1 $real_dir
17 $1/stf $1 $real_dir/l??
18 rm $real_dir/ctest.c
19 cp $1/ctest.c $real_dir
20 chown $lname $real_dir/l??
21 chown $lname $real_dir/ctest.c
22 $1/set_return_on_destroy $real_dir test
23 --------------------------------------------
24 @@ Standard i/o tests (1 of 26):  open
25 @@
26 $1/open_test $2/ls0 o_rdwr
27 event_count 1
28 event[0] read
29 --------------------------------------------
30 @@ Standard i/o tests (2 of 26):  open/trunc
31 @@
32 $1/open_test $2/ls1 o_rdwr o_trunc
33 event_count 2
34 event[0] truncate
35 event[1] attribute
36 --------------------------------------------
37 @@ Standard i/o tests (3 of 26):  open/trunc/create
38 @@
39 $1/open_test $2/ls2 o_rdwr o_trunc o_creat
40 event_count 1
41 event[0] truncate
42 --------------------------------------------
43 @@ Standard i/o tests (4 of 26):  open/create
44 @@
45 $1/open_test $2/ls3 o_rdwr o_creat
46 event_count 1
47 event[0] read
48 --------------------------------------------
49 @@ Standard i/o tests (5 of 26):  new file
50 @@
51 $1/open_test $2/LS3 o_rdwr o_creat
52 event_count 2
53 event[0] create
54 event[1] postcreate
55 --------------------------------------------
56 @@ Standard i/o tests (6 of 26):  append #1
57 @@
58 echo j >> $2/ls4
59 event_count 2
60 event[0] read
61 event[1] write
62 file_handle[0] store_in ls4temp
63 --------------------------------------------
64 @@ Standard i/o tests (7 of 26):  append #2
65 @@
66 echo j >> $2/ls4
67 event_count 1
68 event[0] write
69 file_handle[0] matches ls4temp
70 --------------------------------------------
71 @@ Standard i/o tests (8 of 26):  remove
72 @@
73 /bin/rm $2/ls4
74 event_count 3
75 event[0] remove
76 event[1] destroy
77 event[2] postremove
78 name[1] test
79 contents[1] 123456789abcdefghijklmnopqrstuvwxyz
80 --------------------------------------------
81 @@ Standard i/o tests (9 of 26):  link
82 @@
83 ln $2/ls5 $2/LS5
84 event_count 2
85 event[0] link
86 event[1] postlink
87 --------------------------------------------
88 @@ Standard i/o tests (10 of 26):  deleting link
89 @@
90 /bin/rm $2/LS5
91 event_count 2
92 event[0] remove
93 event[1] postremove
94 --------------------------------------------
95 @@ Standard i/o tests (11 of 26):  return_on_destroy #1
96 @@
97 run_without_test
98 $1/set_return_on_destroy $real_dir
99 --------------------------------------------
100 @@ Standard i/o tests (12 of 26):  return_on_destroy #2
101 @@
102 /bin/rm $2/ls5
103 event_count 3
104 event[0] remove
105 event[1] destroy
106 event[2] postremove
107 name[1] <NONE>
108 contents[1] <NONE>
109 --------------------------------------------
110 @@ Standard i/o tests (13 of 26)
111 @@
112 $1/fcntl f_freesp -o 99999 -l 199999 $2/ls6
113 event_count 2
114 event[0] truncate
115 event[1] attribute
116 --------------------------------------------
117 @@ Standard i/o tests (14 of 26)
118 @@
119 $1/fcntl f_freesp -o 1000 -l 10000 $2/ls6
120 event_count 2
121 event[0] truncate
122 event[1] attribute
123 --------------------------------------------
124 @@ Standard i/o tests (15 of 26) truncate #1
125 @@
126 $1/truncate $2/ls7 99999
127 event_count 2
128 event[0] truncate
129 event[1] attribute
130 --------------------------------------------
131 @@ Standard i/o tests (16 of 26) truncate #2
132 @@
133 $1/truncate $2/ls7 1000
134 event_count 2
135 event[0] truncate
136 event[1] attribute
137 --------------------------------------------
138 @@ Standard i/o tests (17 of 26) execute
139 @@
140 $2/ls8 -l $real_dir
141 event_count 4
142 event[0] read
143 event[1] read
144 event[2] read
145 event[3] read
146 --------------------------------------------
147 @@ Standard i/o tests (18 of 26) symlink
148 @@
149 ln -s $2/junk $2/symlink
150 event_count 2
151 event[0] symlink
152 event[1] postsymlink
153 --------------------------------------------
154 @@ Standard i/o tests (19 of 26) deleting symlink
155 @@
156 /bin/rm $2/symlink
157 event_count 3
158 event[0] remove
159 event[1] destroy
160 event[2] postremove
161 --------------------------------------------
162 @@ Standard i/o tests (20 of 26) mkdir
163 @@
164 mkdir $2/unlikely-named-test-dir
165 event_count 2
166 event[0] create
167 event[1] postcreate
168 --------------------------------------------
169 @@ Standard i/o tests (21 of 26) rmdir
170 @@
171 rmdir $2/unlikely-named-test-dir
172 event_count 3
173 event[0] remove
174 event[1] destroy
175 event[2] postremove
176 --------------------------------------------
177 @@ Standard i/o tests (22 of 26) rename
178 @@
179 mv $2/ls8 $2/LS8
180 event_count 2
181 event[0] rename
182 event[1] postrename
183 --------------------------------------------
184 @@ Standard i/o tests (23 of 26) copy (new)
185 @@
186 cp $2/ls9 $2/LS9
187 event_count 8
188 event[0] create
189 event[1] postcreate
190 event[2] attribute
191 event[3] read
192 event[4] read
193 event[5] read
194 event[6] read
195 event[7] attribute
196 --------------------------------------------
197 @@ Standard i/o tests (24 of 26) copy (onto old)
198 @@
199 cp $2/LS9 $2/ls9
200 event_count 5
201 event[0] truncate
202 event[1] write
203 event[2] write
204 event[3] write
205 event[4] write
206 --------------------------------------------
207 @@ Standard i/o tests (25 of 26) memory-mapped i/o
208 @@
209 // Note to self: don't check event_count
210 //
211 cc -o $2/ll0 $2/ctest.c
212 event[0] truncate
213 event[1] attribute
214 event[2] write
215 --------------------------------------------
216 @@ Standard i/o tests (26 of 26) executing
217 @@
218 $2/ll0
219 event_count 0