Undoes mod: xfs-cmds:slinx:120772a
[xfstests-dev.git] / dmapi / src / suite2 / data / main.dat
1 //
2 // Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
3 // 
4 // This program is free software; you can redistribute it and/or modify it
5 // under the terms of version 2 of the GNU General Public License as
6 // published by the Free Software Foundation.
7 // 
8 // This program is distributed in the hope that it would be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 // 
12 // Further, this software is distributed without any warranty that it is
13 // free of the rightful claim of any third person regarding infringement
14 // or the like.  Any license provided herein, whether implied or
15 // otherwise, applies only to this software file.  Patent licenses, if
16 // any, provided herein do not apply to combinations of this program with
17 // other software, or any other product whatsoever.
18 // 
19 // You should have received a copy of the GNU General Public License along
20 // with this program; if not, write the Free Software Foundation, Inc., 59
21 // Temple Place - Suite 330, Boston MA 02111-1307, USA.
22 // 
23 // Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 // Mountain View, CA  94043, or:
25 // 
26 // http://www.sgi.com 
27 // 
28 // For further information regarding this notice, see: 
29 // 
30 // http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31
32 // This test will use the following files:
33 //
34 ctf stf ls_to_copy ctest.c
35 fcntl open_test truncate rd wf 
36 read_invis write_invis
37 set_region set_return_on_destroy 
38 --------------------------------------------
39 // These setup commands are run before the daemon starts.
40 // They reset the file structure of the test directory
41 // to a known state.
42 //
43 rm $real_dir/???
44 rm $real_dir/ctest.c
45 $1/ctf $1 $real_dir
46 $1/stf $1 $real_dir/l??
47 cp $1/ctest.c $real_dir
48 chown $lname $real_dir/l??
49 chown $lname $real_dir/ctest.c
50 $1/set_return_on_destroy $real_dir test
51 --------------------------------------------
52 @@ Aborted events testing (1 of 7):
53 @@     Read ls0 successfully.
54 @@
55 $1/open_test $2/ls0 o_rdwr
56 event_count 1
57 event[0] read
58 --------------------------------------------
59 @@ Aborted events testing (2 of 7):
60 @@    Set the daemon to halt events with DM_RESP_ABORT
61 @@    and errno EEXIST. 
62 @@
63 run_as_root
64 $1/send_msg unfriendly_17
65 event_count 1
66 event[0] user
67 msg_str[0] unfriendly_17
68 --------------------------------------------
69 @@ Aborted events testing (3 of 7):
70 @@    Try to read ls0.  this should fail with EEXIST.
71 @@
72 $1/open_test $2/ls0 o_rdwr
73 event_count 1
74 event[0] read
75 failure
76 --------------------------------------------
77 @@ Aborted events testing (4 of 7):
78 @@    Try to read ls1.  This should fail with EEXIST.
79 @@
80 $1/open_test $2/ls1 o_rdwr o_trunc
81 event_count 1
82 event[0] truncate
83 failure
84 --------------------------------------------
85 @@ Aborted events testing (5 of 7):
86 @@    Reset the daemon to respond with DM_RESP_CONTINUE.
87 @@
88 run_as_root
89 $1/send_msg friendly
90 event_count 1
91 event[0] user
92 msg_str[0] friendly
93 --------------------------------------------
94 @@ Aborted events testing (6 of 7):
95 @@    Again, try to read ls0.  This should succeed.
96 @@
97 $1/open_test $2/ls0 o_rdwr
98 event_count 1
99 event[0] read
100 --------------------------------------------
101 @@ Aborted events testing (7 of 7):
102 @@    Again, try to read ls1.  This time, 
103 @@    it should succeed.
104 @@
105 $1/open_test $2/ls1 o_rdwr o_trunc
106 event_count 2
107 event[0] truncate
108 event[1] attribute
109 --------------------------------------------
110 @@ dm_send_msg test
111 @@
112 run_as_root
113 $1/send_msg dmapi-test-foo-abc123
114 event_count 1
115 event[0] user
116 msg_str[0] dmapi-test-foo-abc123
117 --------------------------------------------
118 @@ Test of invisible i/o (1 of 2):  write
119 @@
120 run_as_root
121 $1/write_invis -o 64 -l 16 $2/ls0
122 event_count 0
123 --------------------------------------------
124 @@ Test of invisible i/o (2 of 2):  read
125 @@
126 run_as_root
127 $1/read_invis -o 64 -l 16 $2/ls0
128 event_count 0
129 --------------------------------------------
130 @@ Test of direct i/o (1 of 2):  write
131 @@
132 $1/wf  -l 327680 -b 32768 -d $2/ls9
133 event_count 10
134 event[0] write
135 event[1] write
136 event[2] write
137 event[3] write
138 event[4] write
139 event[5] write
140 event[6] write
141 event[7] write
142 event[8] write
143 event[9] write
144 --------------------------------------------
145 @@ Test of direct i/o (2 of 2):  read
146 @@
147 $1/rd -b 32768 -d $2/ls9
148 event_count 11
149 event[0] read
150 event[1] read
151 event[2] read
152 event[3] read
153 event[4] read
154 event[5] read
155 event[6] read
156 event[7] read
157 event[8] read
158 event[9] read
159 event[10] read