a74e16ce26852955515aa1cbd61b4c9be5b3393d
[xfstests-dev.git] / dmapi / src / suite2 / data / realtime.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 stf crttf new_wf
35 fcntl open_test truncate rd wf 
36 read_invis write_invis
37 set_region set_return_on_destroy 
38 --------------------------------------------
39 // These setup commands are run before the daemon starts.
40 // They reset the file structure of the test directory
41 // to a known state.
42 //
43 rm $real_dir/realtime.?
44 $1/crttf $1 $real_dir
45 chown $lname $real_dir/* 
46 $1/stf $1 $real_dir/realtime.?
47 $1/set_return_on_destroy $real_dir test
48 --------------------------------------------
49 @@ Test of invisible i/o (1 of 2):  write
50 @@
51 run_as_root
52 $1/write_invis -o 64 -l 16 $2/realtime.0
53 event_count 0
54 --------------------------------------------
55 @@ Test of invisible i/o (2 of 2):  read
56 @@
57 run_as_root
58 $1/read_invis -o 64 -l 16 $2/realtime.0
59 event_count 0
60 --------------------------------------------
61 @@ Test of direct i/o (1 of 2):  write
62 @@
63 $1/wf  -l 327680 -b 32768 -d $2/realtime.1
64 event_count 10
65 event[0] write
66 event[1] write
67 event[2] write
68 event[3] write
69 event[4] write
70 event[5] write
71 event[6] write
72 event[7] write
73 event[8] write
74 event[9] write
75 --------------------------------------------
76 @@ Test of direct i/o (2 of 2):  read
77 @@
78 $1/rd -b 32768 -d $2/realtime.1
79 event_count 11
80 event[0] read
81 event[1] read
82 event[2] read
83 event[3] read
84 event[4] read
85 event[5] read
86 event[6] read
87 event[7] read
88 event[8] read
89 event[9] read
90 event[10] read
91 --------------------------------------------
92 @@ Standard i/o tests (1 of 7):  open
93 @@
94 $1/open_test $2/realtime.2 o_rdwr
95 event_count 1
96 event[0] read
97 --------------------------------------------
98 @@ Standard i/o tests (2 of 7):  open/trunc
99 @@
100 $1/open_test $2/realtime.3 o_rdwr o_trunc
101 event_count 2
102 event[0] truncate
103 event[1] attribute
104 --------------------------------------------
105 @@ Standard i/o tests (3 of 7):  open/trunc/create
106 @@
107 $1/open_test $2/realtime.4 o_rdwr o_trunc o_creat
108 event_count 1
109 event[0] truncate
110 --------------------------------------------
111 @@ Standard i/o tests (4 of 7):  open/create
112 @@
113 $1/open_test $2/realtime.5 o_rdwr o_creat
114 event_count 1
115 event[0] read
116 --------------------------------------------
117 @@ Standard i/o tests (5 of 7):  append #1
118 @@
119 echo j >> $2/realtime.6
120 event_count 1
121 event[0] write
122 file_handle[0] store_in ls4temp
123 --------------------------------------------
124 @@ Standard i/o tests (6 of 7):  append #2
125 @@
126 echo w >> $2/realtime.6
127 event_count 1
128 event[0] write
129 file_handle[0] matches ls4temp
130 --------------------------------------------
131 @@ Standard i/o tests (7 of 7):  remove
132 @@
133 /bin/rm $2/realtime.6
134 event_count 3
135 event[0] remove
136 event[1] destroy
137 event[2] postremove
138 name[1] test
139 contents[1] 123456789abcdefghijklmnopqrstuvwxyz