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
40 // to a known state, and they ensure that the NFS
44 $1/stf $1 $real_dir/l??
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
59 ln -s $2/fail_tempdir/temp_file $2/fail_tempdir/failed_symlink
65 --------------------------------------------
66 @@ Failure checks (2 of 8): link
68 ln $2/fail_tempdir/temp_file $2/fail_tempdir/failed_link
74 --------------------------------------------
75 @@ Failure checks (3 of 8): mkdir
77 mkdir $2/fail_tempdir/failed_subdir
83 --------------------------------------------
84 @@ Failure checks (4 of 8): rmdir
86 rmdir $2/fail_tempdir/fail_subdir
92 --------------------------------------------
93 @@ Failure checks (5 of 8): open
95 $1/open_test $2/fail_tempdir/temp_file o_rdwr
98 --------------------------------------------
99 @@ Failure checks (6 of 8): open/create
101 $1/open_test $2/fail_tempdir/temp_file o_rdwr o_creat
104 --------------------------------------------
105 @@ Failure checks (7 of 8): open/truncate
107 $1/open_test $2/fail_tempdir/temp_file o_rdwr o_trunc
110 --------------------------------------------
111 @@ Failure checks (8 of 8): remove
113 rm -f $2/fail_tempdir/temp_file