Undoes mod: xfs-cmds:slinx:120772a
[xfstests-dev.git] / dmapi / src / suite2 / data / fail.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 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
40 // to a known state, and they ensure that the NFS
41 //
42 rm $real_dir/???
43 $1/ctf $1 $real_dir
44 $1/stf $1 $real_dir/l??
45 rm $real_dir/ctest.c
46 cp $1/ctest.c $real_dir
47 chown $lname $real_dir/*
48 $1/set_return_on_destroy $real_dir test
49 rmdir $real_dir/fail_tempdir/fail_subdir
50 rm $real_dir/fail_tempdir/*
51 rmdir $real_dir/fail_tempdir
52 mkdir $real_dir/fail_tempdir
53 mkdir $real_dir/fail_tempdir/fail_subdir
54 echo "Temporary file" > $real_dir/fail_tempdir/temp_file
55 chown root $real_dir/fail_tempdir
56 --------------------------------------------
57 @@ Failure checks (1 of 8):  symlink
58 @@
59 ln -s $2/fail_tempdir/temp_file $2/fail_tempdir/failed_symlink
60 event_count 2
61 event[0] symlink
62 event[1] postsymlink
63 ret_code[1] 13
64 failure
65 --------------------------------------------
66 @@ Failure checks (2 of 8):  link
67 @@
68 ln $2/fail_tempdir/temp_file $2/fail_tempdir/failed_link
69 event_count 2
70 event[0] link
71 event[1] postlink
72 ret_code[1] 13
73 failure
74 --------------------------------------------
75 @@ Failure checks (3 of 8):  mkdir
76 @@
77 mkdir $2/fail_tempdir/failed_subdir
78 event_count 2
79 event[0] create
80 event[1] postcreate
81 ret_code[1] 13
82 failure
83 --------------------------------------------
84 @@ Failure checks (4 of 8):  rmdir
85 @@
86 rmdir $2/fail_tempdir/fail_subdir
87 event_count 2
88 event[0] remove
89 event[1] postremove
90 ret_code[1] 13
91 failure
92 --------------------------------------------
93 @@ Failure checks (5 of 8):  open
94 @@
95 $1/open_test $2/fail_tempdir/temp_file o_rdwr
96 event_count 0
97 failure
98 --------------------------------------------
99 @@ Failure checks (6 of 8):  open/create
100 @@
101 $1/open_test $2/fail_tempdir/temp_file o_rdwr o_creat
102 event_count 0
103 failure
104 --------------------------------------------
105 @@ Failure checks (7 of 8):  open/truncate
106 @@
107 $1/open_test $2/fail_tempdir/temp_file o_rdwr o_trunc
108 event_count 0
109 failure
110 --------------------------------------------
111 @@ Failure checks (8 of 8):  remove
112 @@
113 rm -f $2/fail_tempdir/temp_file
114 event_count 2
115 event[0] remove
116 event[1] postremove
117 ret_code[1] 13
118 failure