4 # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of version 2 of the GNU General Public License as
8 # published by the Free Software Foundation.
10 # This program is distributed in the hope that it would be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 # Further, this software is distributed without any warranty that it is
15 # free of the rightful claim of any third person regarding infringement
16 # or the like. Any license provided herein, whether implied or
17 # otherwise, applies only to this software file. Patent licenses, if
18 # any, provided herein do not apply to combinations of this program with
19 # other software, or any other product whatsoever.
21 # You should have received a copy of the GNU General Public License along
22 # with this program; if not, write the Free Software Foundation, Inc., 59
23 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
25 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
26 # Mountain View, CA 94043, or:
30 # For further information regarding this notice, see:
32 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
34 #---------------------------------------------------------------------------
35 # CONFIGURATION SECTION:
36 # Configure this script by changing the variables in this section.
37 # Please change ONLY this section!
38 #---------------------------------------------------------------------------
41 base_dir="/home/poplar45/kfr/dmapi/test/laguna/jaytest"
46 # Path to the mountpoint of the test filesystem:
49 # m_main concatenated with d_name == the full test directory path
51 # EXAMPLE: If m_main is "/dmitest", and the test directory
52 # is "/dmitest/test", set this to "/test"
54 d_name="/kfr/test_dir"
56 # Path to the mountpoint of the nfs2 test filesystem:
57 m_nfs2="/dmapi/kfr/nfs2"
59 # Path to the mountpoint of the nfs3 test filesystem:
60 m_nfs3="/dmapi/kfr/nfs3"
62 # Path to the mountpoint of the realtime test filesystem:
64 # Path to the realtime test directory:
67 #--------------------------------------------------------------------
68 # END OF CONFIGURATION SECTION:
69 # No changes should be made past this point! Please change only
70 # the above shell variables to configure this script.
71 #--------------------------------------------------------------------
73 # Path to the "bindir" directory:
74 bin="$base_dir/bindir"
76 # Path to the "generic file" (a copy of ls):
77 ls_path="$bin/ls_to_copy"
79 # Path to the main test directory:
80 d_main="$m_main$d_name"
82 # Path to the nfs2 test directory:
83 d_nfs2="$m_nfs2$d_name"
85 # Path to the nfs3 test directory:
86 d_nfs3="$m_nfs2$d_name"
95 print "+-------------------------+"
96 print "| DMAPI tests: main menu |"
97 print "+-------------------------+\n"
98 select menu1 in 'DMAPI function tests, which run without a daemon' \
99 'DMAPI event tests, which invoke and monitor a daemon' \
100 'Basic DMAPI existence/version test' \
103 'DMAPI function tests, which run without a daemon')
107 then Vstr='turn off verbose mode'
108 else Vstr='turn on verbose mode'
111 print "+----------------------+"
112 print "| DMAPI function tests |"
113 print "+----------------------+\n"
114 select menu2 in 'ALL of the following function tests:' \
116 ' get/set_eventlist' \
117 ' get/set_fileattr, get_bulkattr, get_dirattrs' \
118 ' probe/punch_hole' \
119 ' read/write_invis' \
121 ' get_allocinfo vs. xfs_bmap' \
122 ' get_allocinfo with various buffer sizes' \
124 ' EACCES errno and access rights' \
129 'ALL of the following function tests:')
131 "$bin/test_dmattr $Vflag $ls_path $d_main" \
132 "$bin/test_eventlist $Vflag $ls_path $d_main" \
133 "$bin/test_fileattr $Vflag $ls_path $d_main" \
134 "$bin/test_hole $Vflag $ls_path $d_main" \
135 "$bin/test_invis $Vflag $ls_path $d_main" \
136 "$bin/test_region $Vflag $ls_path $d_main" \
137 "$bin/test_efault $Vflag $ls_path $d_main" \
138 "$bin/test_rights $Vflag $ls_path $d_main" \
139 "$bin/test_allocinfo_1 $bin $d_main" \
140 "$bin/test_allocinfo_2 $bin $d_main"
143 print "Press enter to continue..."; read go
147 eval "$bin/test_dmattr $Vflag $ls_path $d_main"
148 print "Press enter to continue..."; read go
150 ' get/set_eventlist')
151 eval "$bin/test_eventlist $Vflag $ls_path $d_main"
152 print "Press enter to continue..."; read go
154 ' get/set_fileattr, get_bulkattr, get_dirattrs')
155 eval "$bin/test_fileattr $Vflag $ls_path $d_main"
156 print "Press enter to continue..."; read go
159 eval "$bin/test_hole $Vflag $ls_path $d_main"
160 print "Press enter to continue..."; read go
163 eval "$bin/test_invis $Vflag $ls_path $d_main"
164 print "Press enter to continue..."; read go
167 eval "$bin/test_region $Vflag $ls_path $d_main"
168 print "Press enter to continue..."; read go
171 eval "$bin/test_efault $Vflag $ls_path $d_main"
172 print "Press enter to continue..."; read go
174 ' EACCES errno and access rights')
175 eval "$bin/test_rights $Vflag $ls_path $d_main"
177 ' get_allocinfo vs. xfs_bmap')
178 eval "$bin/test_allocinfo_1 $bin $d_main"
179 print "Press enter to continue..."; read go
181 ' get_allocinfo with various buffer sizes')
182 eval "$bin/test_allocinfo_2 $bin $d_main"
183 print "Press enter to continue..."; read go
201 'DMAPI event tests, which invoke and monitor a daemon' )
205 then Pstr='turn off pausing after each command'
206 else Pstr='turn on pausing after each command'
209 print "+--------------------------+"
210 print "| DMAPI daemon/event tests |"
211 print "+--------------------------+\n"
212 select menu2 in 'ALL of the following four:' \
214 ' abort responses to events, and other i/o' \
215 ' unsuccessful commands (bad file permissions)' \
217 'realtime filesystem' \
218 'small event queue' \
225 'ALL of the following four:')
227 "$bin/run_test $Pflag -u $p_user -f standard.dat $bin $d_main $m_main" \
228 "$bin/run_test $Pflag -u $p_user $bin $d_main $m_main" \
229 "$bin/run_test $Pflag -u $p_user -f fail.dat $bin $d_main $m_main" \
230 "$bin/run_test $Pflag -u $p_user -f pending.dat $bin $d_main $m_main"
236 eval "$bin/run_test $Pflag -u $p_user -f standard.dat $bin $d_main $m_main"
238 ' abort responses to events, and other i/o')
239 eval "$bin/run_test $Pflag -u $p_user $bin $d_main $m_main"
241 ' unsuccessful commands (bad file permissions)')
242 eval "$bin/run_test $Pflag -u $p_user -f fail.dat $bin $d_main $m_main"
245 eval "$bin/run_test $Pflag -u $p_user -f pending.dat $bin $d_main $m_main"
251 print "+--------------------------------+"
252 print "| DMAPI daemon/event tests: nfs2 |"
253 print "+--------------------------------+\n"
254 select menu3 in 'ALL of the following four:' \
255 ' nfs2: standard i/o' \
256 ' nfs2: abort responses to events, and other i/o' \
257 ' nfs2: unsuccessful commands (bad file permissions)' \
258 ' nfs2: dm_pending' \
262 'ALL of the following four:')
263 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f standard_nfs.dat $bin $d_nfs2 $m_main"
264 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f nfs.dat $bin $d_nfs2 $m_main"
265 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f fail.dat $bin $d_nfs2 $m_main"
266 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f pending_nfs.dat $bin $d_nfs2 $m_main"
268 ' nfs2: standard i/o')
269 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f standard_nfs.dat $bin $d_nfs2 $m_main"
271 ' nfs2: abort responses to events, and other i/o')
272 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f nfs.dat $bin $d_nfs2 $m_main"
274 ' nfs2: unsuccessful commands (bad file permissions)')
275 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f fail.dat $bin $d_nfs2 $m_main"
278 eval "$bin/run_test $Pflag -u $p_user -F nfs2 -M $m_nfs2 -R $d_main -f pending_nfs.dat $bin $d_nfs2 $m_main"
292 print "+--------------------------------+"
293 print "| DMAPI daemon/event tests: nfs3 |"
294 print "+--------------------------------+"
295 select menu3 in 'ALL of the following four:' \
296 ' nfs3: standard i/o' \
297 ' nfs3: abort responses to events, and other i/o' \
298 ' nfs3: unsuccessful commands (bad file permissions)' \
299 ' nfs3: dm_pending' \
303 'ALL of the following four:')
304 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f standard_nfs.dat $bin $d_nfs3 $m_main"
305 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f nfs.dat $bin $d_nfs3 $m_main"
306 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f fail.dat $bin $d_nfs3 $m_main"
307 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f pending_nfs.dat $bin $d_nfs3 $m_main"
309 ' nfs3: standard i/o')
310 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f standard_nfs.dat $bin $d_nfs3 $m_main"
312 ' nfs3: abort responses to events, and other i/o')
313 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f nfs.dat $bin $d_nfs3 $m_main"
315 ' nfs3: unsuccessful commands (bad file permissions)')
316 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f fail.dat $bin $d_nfs3 $m_main"
319 eval "$bin/run_test $Pflag -u $p_user -F nfs3 -M $m_nfs3 -R $d_main -f pending_nfs.dat $bin $d_nfs3 $m_main"
329 'realtime filesystem')
330 eval "$bin/run_test $Pflag -u $p_user -f realtime.dat $bin $d_rt $m_rt"
333 # Set dm_max_queued to about 5 or so before running!
334 eval "$bin/run_test $Pflag -u $p_user -s 2 -f smallq.dat $bin $d_main $m_main"
350 'Basic DMAPI existence/version test')
351 eval "$bin/check_dmapi $Vflag"
352 print "Press enter to continue..."; read go