2f825d92f9fa8cd7e703ab5ffd0f584a8b30118b
[xfstests-dev.git] / dmapi / src / suite2 / data / pending.dat
1 //
2 // Copyright (c) 2000-2001 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 set_region
35 --------------------------------------------
36 // These setup commands are run before the daemon starts.
37 // They reset the file structure of the test directory
38 // to a known state.
39 //
40 rm $real_dir/???
41 $1/ctf $1 $real_dir
42 $1/stf $1 $real_dir/l??
43 chown $lname $real_dir/l??
44 --------------------------------------------
45 @@ Pending test (1 of 5):
46 @@
47 // Run "pending" for the next 3 events,
48 // so that a non-blocking open_test
49 // will see EAGAIN three times before
50 // it can finish.
51 //
52 run_as_root
53 $1/send_msg pending_3
54 event_count 1
55 event[0] user
56 msg_str[0] pending_3
57 --------------------------------------------
58 @@ Pending test (2 of 5):
59 @@    (should fail)
60 @@
61 $1/open_test $2/ls1 o_rdwr o_nonblock
62 event_count 1
63 event[0] pending
64 tries_left[0] 2
65 failure
66 --------------------------------------------
67 @@ Pending test (3 of 5):
68 @@    (should fail)
69 @@
70 $1/open_test $2/ls1 o_rdwr o_ndelay
71 event_count 1
72 event[0] pending
73 tries_left[0] 1
74 failure
75 --------------------------------------------
76 @@ Pending test (4 of 5):
77 @@    (should fail)
78 @@
79 $1/open_test $2/ls1 o_rdwr o_nonblock o_ndelay
80 event_count 1
81 event[0] pending
82 tries_left[0] 0
83 failure
84 --------------------------------------------
85 @@ Pending test (5 of 5):
86 @@    (should succeed)
87 @@
88 $1/open_test $2/ls1 o_rdwr o_nonblock
89 event_count 1
90 event[0] read