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