2 // Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
4 // This test will use the following files:
6 ctf stf ls_to_copy ctest.c
7 fcntl open_test truncate rd wf
8 set_region set_return_on_destroy
9 --------------------------------------------
10 // These setup commands are run before the daemon starts.
11 // They reset the file structure of the test directory
16 $1/stf $1 $real_dir/l??
17 chown $lname $real_dir/l??
18 $1/set_return_on_destroy $real_dir test
19 --------------------------------------------
20 @@ Aborted events testing (1 of 7):
21 @@ Bring ls0 across NFS, causing it to be cached.
23 $1/open_test $2/ls0 o_rdwr
26 --------------------------------------------
27 @@ Aborted events testing (2 of 7):
28 @@ Set the daemon to halt events with DM_RESP_ABORT
32 $1/send_msg unfriendly_17
35 msg_str[0] unfriendly_17
36 --------------------------------------------
37 @@ Aborted events testing (3 of 7):
38 @@ Try to read ls0. Since it is cached, this should succeed.
39 @@ and should not generate any events.
41 $1/open_test $2/ls0 o_rdwr
43 --------------------------------------------
44 @@ Aborted events testing (4 of 7):
45 @@ Try to read ls1. This should fail with EEXIST.
47 $1/open_test $2/ls1 o_rdwr o_trunc
51 --------------------------------------------
52 @@ Aborted events testing (5 of 7):
53 @@ Reset the daemon to respond with DM_RESP_CONTINUE.
60 --------------------------------------------
61 @@ Aborted events testing (6 of 7):
62 @@ Again, try to read ls0. It will be in the cache,
63 @@ so no events should occur.
65 $1/open_test $2/ls0 o_rdwr
67 --------------------------------------------
68 @@ Aborted events testing (7 of 7):
69 @@ Again, try to read ls1. This time,
72 $1/open_test $2/ls1 o_rdwr o_trunc
76 --------------------------------------------
80 $1/send_msg dmapi-test-foo-abc123
83 msg_str[0] dmapi-test-foo-abc123
84 --------------------------------------------
85 @@ NFS test: DM_RESP_ABORT (1 of 3)
87 // For the next two events, respond with
88 // DM_RESP_ABORT and errno 4 The first
89 // open test of ls1 should fail; the
90 // second should succeed.
93 $1/send_msg countdown_2_4
96 msg_str[0] countdown_2_4
97 --------------------------------------------
98 @@ NFS test: DM_RESP_ABORT (2 of 3)
100 $1/open_test $2/ls2 o_rdwr
104 --------------------------------------------
105 @@ NFS test: DM_RESP_ABORT (3 of 3)
107 $1/open_test $2/ls2 o_rdwr
110 --------------------------------------------
111 @@ NFS test: EAGAIN (1 of 4)
113 // For the next two events, respond with
114 // DM_RESP_ABORT and errno 11 -- EAGAIN.
115 // NFS should retry sending the event as
116 // long as EAGAIN is returned.
119 $1/send_msg countdown_2_11
122 msg_str[0] countdown_2_11
123 --------------------------------------------
124 @@ NFS test: EAGAIN (2 of 4)
126 $1/open_test $2/ls3 o_rdwr
130 --------------------------------------------
131 @@ NFS test: EAGAIN (3 of 4)
134 $1/send_msg countdown_4_11
137 msg_str[0] countdown_4_11
138 --------------------------------------------
139 @@ NFS test: EAGAIN (4 of 4)
141 $1/open_test $2/ls4 o_rdwr