2 // Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
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.
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.
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.
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.
23 // Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 // Mountain View, CA 94043, or:
28 // For further information regarding this notice, see:
30 // http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
32 // This test will use the following files:
34 ctf stf ls_to_copy ctest.c
35 fcntl open_test truncate rd wf
36 set_region set_return_on_destroy
37 --------------------------------------------
38 // These setup commands are run before the daemon starts.
39 // They reset the file structure of the test directory
44 $1/stf $1 $real_dir/l??
45 chown $lname $real_dir/l??
46 $1/set_return_on_destroy $real_dir test
47 --------------------------------------------
48 @@ Aborted events testing (1 of 7):
49 @@ Bring ls0 across NFS, causing it to be cached.
51 $1/open_test $2/ls0 o_rdwr
54 --------------------------------------------
55 @@ Aborted events testing (2 of 7):
56 @@ Set the daemon to halt events with DM_RESP_ABORT
60 $1/send_msg unfriendly_17
63 msg_str[0] unfriendly_17
64 --------------------------------------------
65 @@ Aborted events testing (3 of 7):
66 @@ Try to read ls0. Since it is cached, this should succeed.
67 @@ and should not generate any events.
69 $1/open_test $2/ls0 o_rdwr
71 --------------------------------------------
72 @@ Aborted events testing (4 of 7):
73 @@ Try to read ls1. This should fail with EEXIST.
75 $1/open_test $2/ls1 o_rdwr o_trunc
79 --------------------------------------------
80 @@ Aborted events testing (5 of 7):
81 @@ Reset the daemon to respond with DM_RESP_CONTINUE.
88 --------------------------------------------
89 @@ Aborted events testing (6 of 7):
90 @@ Again, try to read ls0. It will be in the cache,
91 @@ so no events should occur.
93 $1/open_test $2/ls0 o_rdwr
95 --------------------------------------------
96 @@ Aborted events testing (7 of 7):
97 @@ Again, try to read ls1. This time,
100 $1/open_test $2/ls1 o_rdwr o_trunc
104 --------------------------------------------
108 $1/send_msg dmapi-test-foo-abc123
111 msg_str[0] dmapi-test-foo-abc123
112 --------------------------------------------
113 @@ NFS test: DM_RESP_ABORT (1 of 3)
115 // For the next two events, respond with
116 // DM_RESP_ABORT and errno 4 The first
117 // open test of ls1 should fail; the
118 // second should succeed.
121 $1/send_msg countdown_2_4
124 msg_str[0] countdown_2_4
125 --------------------------------------------
126 @@ NFS test: DM_RESP_ABORT (2 of 3)
128 $1/open_test $2/ls2 o_rdwr
132 --------------------------------------------
133 @@ NFS test: DM_RESP_ABORT (3 of 3)
135 $1/open_test $2/ls2 o_rdwr
138 --------------------------------------------
139 @@ NFS test: EAGAIN (1 of 4)
141 // For the next two events, respond with
142 // DM_RESP_ABORT and errno 11 -- EAGAIN.
143 // NFS should retry sending the event as
144 // long as EAGAIN is returned.
147 $1/send_msg countdown_2_11
150 msg_str[0] countdown_2_11
151 --------------------------------------------
152 @@ NFS test: EAGAIN (2 of 4)
154 $1/open_test $2/ls3 o_rdwr
158 --------------------------------------------
159 @@ NFS test: EAGAIN (3 of 4)
162 $1/send_msg countdown_4_11
165 msg_str[0] countdown_4_11
166 --------------------------------------------
167 @@ NFS test: EAGAIN (4 of 4)
169 $1/open_test $2/ls4 o_rdwr