source: rtems/testsuites/psxtests/psxfile01/psxfile01.scn @ a450a93d

4.104.114.84.95
Last change on this file since a450a93d was b2a1ea3, checked in by Joel Sherrill <joel.sherrill@…>, on 04/24/01 at 23:04:59

2001-04-24 Joel Sherrill <joel@…>

  • psxfile01/test.c, psxfile01/psxfile01.scn : Added test case for

open, write, reopen, append twice from Andrew Bythell
<abythell@…> that tripped an initialization
problem in the IMFS.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1NOTE: If you get the following assertion, then your target does not
2have enough memory in the heap used by malloc to allocate all the
3files used during this test:
4
5assertion "memory" failed: file "...../c/src/lib/libc/memfile.c", line 340
6
7*** FILE TEST 1 ***
8*************** Dump of Entire IMFS ***************
9/
10....dev/
11........console (device 0, 0)
12***************       End of Dump        ***************
13stat of /dev/console
14....st_dev     (0x0:0x0)
15....st_ino     3  may vary by small amount
16....mode  = 00020771
17....nlink = 1
18....uid = 0
19....gid = 0
20....atime = Fri Jan  1 00:00:00 1988
21....mtime = Fri Jan  1 00:00:00 1988
22....ctime = Fri Jan  1 00:00:00 1988
23
24mkdir /dev/tty
25
26mkdir /usr
27mkdir /etc
28mkdir /tmp
29mkdir /tmp/..
30mkdir /tmp/
31mkdir /j/j1
32mkdir tmp
33
34rmdir /usr
35rmdir /dev
36rmdir /fred
37mknod /dev/test_console
38mknod /dev/tty/S3
39mknod /etc/passwd
40mkdir /tmp/my_dir
41mkfifo /c/my_dir
42mkdir /etc/passwd/j
43open /tmp/joel - should fail with ENOENT
44open /tmp/j
45open returned file descriptor 3
46close /tmp/j
47close /tmp/j again
48unlink /tmp/j
49unlink /tmp
50create and close /tmp/tom
51Attempt to recreate /tmp/tom
52create /tmp/john
53tcdrain /tmp/john
54mknod /tmp/joel
55(0)the first write!!!
56
57(10)the first write!!!
58
59stat( /tmp/joel ) returned
60....st_dev     (0x0:0x0)
61....st_ino     10  may vary by small amount
62....mode  = 00100700
63....nlink = 1
64....uid = 0
65....gid = 0
66....atime = Sat Dec 31 09:00:00 1988
67....mtime = Sat Dec 31 09:00:00 1988
68....ctime = Sat Dec 31 09:00:00 1988
69unlink /tmp/joel
70unlink /tmp/joel
71mknod /tmp/joel
72(514)the first write!!!
73
74(513)the first write!!!
75
76(24)the first write!!!
77
78(2)the first write!!!
79
80(1)the first write!!!
81
82(0)the first write!!!
83
84(0)rst write!!!
85
86(513)the first write!!!
87
88(139743)
89stat( /tmp/joel ) returned
90....st_dev     (0x0:0x0)
91....st_ino     11  may vary by small amount
92....mode  = 00100700
93....nlink = 1
94....uid = 0
95....gid = 0
96....atime = Sat Dec 31 09:00:00 1988
97....mtime = Sat Dec 31 09:00:00 1988
98....ctime = Sat Dec 31 09:00:00 1988
99stat of /tmp/j
100stat(/tmp/j) returned -1 (errno=2)
101....st_dev     (0x0:0x0)
102....st_ino     3  may vary by small amount
103....mode  = 00020771
104....nlink = 1
105....uid = 0
106....gid = 0
107....atime = Fri Jan  1 00:00:00 1988
108....mtime = Fri Jan  1 00:00:00 1988
109....ctime = Fri Jan  1 00:00:00 1988
110fopen of /tmp/j
111fprintf to /tmp/j
112(1) 26 characters written to the file
113(2) 26 characters written to the file
114(3) 26 characters written to the file
115(4) 26 characters written to the file
116(5) 26 characters written to the file
117....st_dev     (0x0:0x0)
118....st_ino     12  may vary by small amount
119....mode  = 00100660
120....nlink = 1
121....uid = 0
122....gid = 0
123....atime = Sat Dec 31 09:00:00 1988
124....mtime = Sat Dec 31 09:00:00 1988
125....ctime = Sat Dec 31 09:00:00 1988
126This is call 1 to fprintf
127This is call 2 to fprintf
128This is call 3 to fprintf
129This is call 4 to fprintf
130This is call 5 to fprintf
131....st_dev     (0x0:0x0)
132....st_ino     12  may vary by small amount
133....mode  = 00100660
134....nlink = 1
135....uid = 0
136....gid = 0
137....atime = Sat Dec 31 09:00:01 1988
138....mtime = Sat Dec 31 09:00:00 1988
139....ctime = Sat Dec 31 09:00:00 1988
140*************** Dump of Entire IMFS ***************
141/
142....dev/
143........console (device 0, 0)
144........tty/
145............S3 (device 255, 128)
146........test_console (device 0, 0)
147....etc/
148........passwd (file 0)
149....tmp/
150........my_dir/
151........tom (file 0)
152........john (file 0)
153........joel (file 279487)
154........j (file 130)
155***************       End of Dump        ***************
156truncate /tmp/j to length of 40
157....st_dev     (0x0:0x0)
158....st_ino     12  may vary by small amount
159....mode  = 00100660
160....nlink = 1
161....uid = 0
162....gid = 0
163....atime = Sat Dec 31 09:00:02 1988
164....mtime = Sat Dec 31 09:00:00 1988
165....ctime = Sat Dec 31 09:00:00 1988
166*************** Dump of Entire IMFS ***************
167/
168....dev/
169........console (device 0, 0)
170........tty/
171............S3 (device 255, 128)
172........test_console (device 0, 0)
173....etc/
174........passwd (file 0)
175....tmp/
176........my_dir/
177........tom (file 0)
178........john (file 0)
179........j (file 40)
180***************       End of Dump        ***************
181truncate /tmp/j to length of 0
182truncate /tmp to length of 0 should fail with EISDIR
183
18421: Is a directory
185*************** Dump of Entire IMFS ***************
186/
187....dev/
188........console (device 0, 0)
189........tty/
190............S3 (device 255, 128)
191........test_console (device 0, 0)
192....etc/
193........passwd (file 0)
194....tmp/
195........my_dir/
196........tom (file 0)
197........john (file 0)
198........j (file 0)
199***************       End of Dump        ***************
200Writing First File
201Writing Second File
202(0)this is a test line
203this is a test line
204
205(0)this is a test line
206this is a test line
207*** END OF FILE TEST 1 ***
208
Note: See TracBrowser for help on using the repository browser.