source: rtems/c/src/tests/psxtests/psxreaddir/psxreaddir.scn @ 0895bdb

4.104.114.84.9
Last change on this file since 0895bdb was 0895bdb, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 23, 1998 at 6:57:48 PM

Added tests in support of the file system infrastructure.

  • Property mode set to 100644
File size: 5.0 KB
Line 
1
2
3*** READDIR TEST ***
4
5chdir to the root directory
6chdir() status : 0
7
8
9Creating a series of directories under /
10Creating directory: a      0 0    Success
11Creating directory: b      0 0    Success
12Creating directory: c      0 0    Success
13Creating directory: d      0 0    Success
14Creating directory: e      0 0    Success
15Creating directory: f      0 0    Success
16Creating directory: c/y      0 0    Success
17Creating directory: c/z      0 0    Success
18Creating directory: c/x      0 0    Success
19Creating directory: c/y/a3333      0 0    Success
20Creating directory: c/y/j123      0 0    Success
21
22Performing stat of directory /
23status for stat : 0, size of directory: 196
24
25
26Opening directory /
27         name               inode   offset   reclen  type
28    dev                         1        0     28   0x001c
29    a                           1       28     28   0x001c
30    b                           1       56     28   0x001c
31    c                           1       84     28   0x001c
32    d                           1      112     28   0x001c
33    e                           1      140     28   0x001c
34    f                           1      168     28   0x001c
35
36Opening directory /c
37         name               inode   offset   reclen  type
38    y                           1        0     28   0x001c
39    z                           1       28     28   0x001c
40    x                           1       56     28   0x001c
41
42Opening directory /c/y
43         name               inode   offset   reclen  type
44    a3333                       1        0     28   0x001c
45    j123                        1       28     28   0x001c
46
47LSEEK to the start of the open directory
48         name               inode   offset   reclen  type
49    dev                         1        0     28   0x001c
50    a                           1       28     28   0x001c
51    b                           1       56     28   0x001c
52    c                           1       84     28   0x001c
53    d                           1      112     28   0x001c
54    e                           1      140     28   0x001c
55    f                           1      168     28   0x001c
56
57Rewinding directory
58         name               inode   offset   reclen  type
59    dev                         1        0     28   0x001c
60    a                           1       28     28   0x001c
61    b                           1       56     28   0x001c
62    c                           1       84     28   0x001c
63    d                           1      112     28   0x001c
64    e                           1      140     28   0x001c
65    f                           1      168     28   0x001c
66
67Seek directory
68telldir() should report only sizeof(struct dirent) increments
69in position. Sizeof(struct dirent): 28
70seeked to  0 -- currently at  0
71seeked to  7 -- currently at  0
72seeked to 14 -- currently at  0
73seeked to 21 -- currently at  0
74seeked to 28 -- currently at 28
75seeked to 35 -- currently at 28
76seeked to 42 -- currently at 28
77seeked to 49 -- currently at 28
78seeked to 56 -- currently at 56
79seeked to 63 -- currently at 56
80seeked to 70 -- currently at 56
81seeked to 77 -- currently at 56
82seeked to 84 -- currently at 84
83seeked to 91 -- currently at 84
84seeked to 98 -- currently at 84
85seeked to 105 -- currently at 84
86seeked to 112 -- currently at 112
87seeked to 119 -- currently at 112
88seeked to 126 -- currently at 112
89seeked to 133 -- currently at 112
90seeked to 140 -- currently at 140
91seeked to 147 -- currently at 140
92seeked to 154 -- currently at 140
93seeked to 161 -- currently at 140
94seeked to 168 -- currently at 168
95seeked to 175 -- currently at 168
96seeked to 182 -- currently at 168
97seeked to 189 -- currently at 168
98seeked to 196 -- currently at 196
99
100Closing directory
101
102SCANDIR TEST
103
104selection rule 1
105scanning for any entry under directory /c
106
107SCANDIR SELECT1 accepts  nodename: y
108SCANDIR SELECT1 accepts  nodename: z
109SCANDIR SELECT1 accepts  nodename: x
110
111scandir status: 3
112Selected Node Name: y
113Selected Node Name: z
114Selected Node Name: x
115
116selection rule 2
117scanning for any entry under directory /c whose name = y
118
119SCANDIR SELECT accepted nodename: y
120SCANDIR SELECT rejected nodename: z
121SCANDIR SELECT rejected nodename: x
122
123scandir status: 1
124Selected Node Name: y
125
126SCANDIR with sorting
127
128selection rule 1
129scanning for any entry under directory /c
130sort in ascending order
131
132SCANDIR SELECT1 accepts  nodename: y
133SCANDIR SELECT1 accepts  nodename: z
134SCANDIR SELECT1 accepts  nodename: x
135
136scandir status: 3
137Selected and Sorted Node Name: x
138Selected and Sorted Node Name: y
139Selected and Sorted Node Name: z
140
141SCANDIR with sorting
142
143selection rule 1
144scanning for any entry under directory /c
145sort in descending order
146
147SCANDIR SELECT1 accepts  nodename: y
148SCANDIR SELECT1 accepts  nodename: z
149SCANDIR SELECT1 accepts  nodename: x
150scandir status: 3
151Selected and Sorted Node Name: z
152Selected and Sorted Node Name: y
153Selected and Sorted Node Name: x
154
155
156*** END OF READDIR TEST ***
Note: See TracBrowser for help on using the repository browser.