generic/60[78]: ensure the initial DAX file flag state before test
[xfstests-dev.git] / dmapi / src / suite2 / data / 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 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
12 // to a known state.
13 //
14 rm $real_dir/???
15 $1/ctf $1 $real_dir
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.
22 @@
23 $1/open_test $2/ls0 o_rdwr
24 event_count 1
25 event[0] read
26 --------------------------------------------
27 @@ Aborted events testing (2 of 7):
28 @@    Set the daemon to halt events with DM_RESP_ABORT
29 @@    and errno EEXIST. 
30 @@
31 run_as_root
32 $1/send_msg unfriendly_17
33 event_count 1
34 event[0] user
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.
40 @@
41 $1/open_test $2/ls0 o_rdwr
42 event_count 0
43 --------------------------------------------
44 @@ Aborted events testing (4 of 7):
45 @@    Try to read ls1.  This should fail with EEXIST.
46 @@
47 $1/open_test $2/ls1 o_rdwr o_trunc
48 event_count 1
49 event[0] truncate
50 failure
51 --------------------------------------------
52 @@ Aborted events testing (5 of 7):
53 @@    Reset the daemon to respond with DM_RESP_CONTINUE.
54 @@
55 run_as_root
56 $1/send_msg friendly
57 event_count 1
58 event[0] user
59 msg_str[0] friendly
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.
64 @@
65 $1/open_test $2/ls0 o_rdwr
66 event_count 0
67 --------------------------------------------
68 @@ Aborted events testing (7 of 7):
69 @@    Again, try to read ls1.  This time, 
70 @@    it should succeed.
71 @@
72 $1/open_test $2/ls1 o_rdwr o_trunc
73 event_count 2
74 event[0] truncate
75 event[1] attribute
76 --------------------------------------------
77 @@ dm_send_msg test
78 @@
79 run_as_root
80 $1/send_msg dmapi-test-foo-abc123
81 event_count 1
82 event[0] user
83 msg_str[0] dmapi-test-foo-abc123
84 --------------------------------------------
85 @@ NFS test:  DM_RESP_ABORT (1 of 3)
86 @@
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.
91 //
92 run_as_root
93 $1/send_msg countdown_2_4
94 event_count 1
95 event[0] user
96 msg_str[0] countdown_2_4
97 --------------------------------------------
98 @@ NFS test:  DM_RESP_ABORT (2 of 3)
99 @@
100 $1/open_test $2/ls2 o_rdwr
101 event_count 1
102 event[0] read
103 failure
104 --------------------------------------------
105 @@ NFS test:  DM_RESP_ABORT (3 of 3)
106 @@
107 $1/open_test $2/ls2 o_rdwr
108 event_count 1
109 event[0] read
110 --------------------------------------------
111 @@ NFS test:  EAGAIN (1 of 4)
112 @@
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.
117 //
118 run_as_root
119 $1/send_msg countdown_2_11
120 event_count 1
121 event[0] user
122 msg_str[0] countdown_2_11
123 --------------------------------------------
124 @@ NFS test:  EAGAIN (2 of 4)
125 @@
126 $1/open_test $2/ls3 o_rdwr
127 event_count 2
128 event[0] read
129 event[1] read
130 --------------------------------------------
131 @@ NFS test:  EAGAIN (3 of 4)
132 @@
133 run_as_root
134 $1/send_msg countdown_4_11
135 event_count 1
136 event[0] user
137 msg_str[0] countdown_4_11
138 --------------------------------------------
139 @@ NFS test:  EAGAIN (4 of 4)
140 @@
141 $1/open_test $2/ls4 o_rdwr
142 event_count 4
143 event[0] read
144 event[1] read
145 event[2] read
146 event[3] read