Rev 2635 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2635 | Rev 2637 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (c) 2007 Josef Cejka |
2 | * Copyright (c) 2007 Josef Cejka |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
8 | * |
8 | * |
9 | * - Redistributions of source code must retain the above copyright |
9 | * - Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
10 | * notice, this list of conditions and the following disclaimer. |
11 | * - Redistributions in binary form must reproduce the above copyright |
11 | * - Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the |
12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. |
13 | * documentation and/or other materials provided with the distribution. |
14 | * - The name of the author may not be used to endorse or promote products |
14 | * - The name of the author may not be used to endorse or promote products |
15 | * derived from this software without specific prior written permission. |
15 | * derived from this software without specific prior written permission. |
16 | * |
16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | #include <stdio.h> |
29 | #include <stdio.h> |
30 | #include <unistd.h> |
30 | #include <unistd.h> |
31 | #include <ipc/ipc.h> |
31 | #include <ipc/ipc.h> |
32 | #include <ipc/services.h> |
32 | #include <ipc/services.h> |
33 | #include <async.h> |
33 | #include <async.h> |
34 | #include <errno.h> |
34 | #include <errno.h> |
35 | #include <../../../srv/devmap/devmap.h> |
35 | #include <../../../srv/devmap/devmap.h> |
36 | #include "../tester.h" |
36 | #include "../tester.h" |
37 | 37 | ||
38 | #include <time.h> |
38 | #include <time.h> |
39 | 39 | ||
40 | #define TEST_DEVICE1 "TestDevice1" |
40 | #define TEST_DEVICE1 "TestDevice1" |
41 | #define TEST_DEVICE2 "TestDevice2" |
41 | #define TEST_DEVICE2 "TestDevice2" |
42 | 42 | ||
43 | /** Handle requests from clients |
43 | /** Handle requests from clients |
44 | * |
44 | * |
45 | */ |
45 | */ |
46 | static void driver_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
46 | static void driver_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
47 | { |
47 | { |
48 | ipc_callid_t callid; |
48 | ipc_callid_t callid; |
49 | ipc_call_t call; |
49 | ipc_call_t call; |
50 | int retval; |
50 | int retval; |
51 | 51 | ||
52 | printf("connected: method=%u arg1=%u, arg2=%u arg3=%u.\n", IPC_GET_METHOD(*icall), |
52 | printf("connected: method=%u arg1=%u, arg2=%u arg3=%u.\n", IPC_GET_METHOD(*icall), |
53 | IPC_GET_ARG1(*icall), IPC_GET_ARG2(*icall), IPC_GET_ARG3(*icall)); |
53 | IPC_GET_ARG1(*icall), IPC_GET_ARG2(*icall), IPC_GET_ARG3(*icall)); |
54 | 54 | ||
55 | printf("driver_client_connection.\n"); |
55 | printf("driver_client_connection.\n"); |
56 | ipc_answer_0(iid, EOK); |
56 | ipc_answer_0(iid, EOK); |
57 | 57 | ||
58 | /* Ignore parameters, the connection is already opened */ |
58 | /* Ignore parameters, the connection is already opened */ |
59 | while (1) { |
59 | while (1) { |
60 | callid = async_get_call(&call); |
60 | callid = async_get_call(&call); |
61 | retval = EOK; |
61 | retval = EOK; |
62 | printf("method=%u arg1=%u, arg2=%u arg3=%u.\n", IPC_GET_METHOD(call), |
62 | printf("method=%u arg1=%u, arg2=%u arg3=%u.\n", IPC_GET_METHOD(call), |
63 | IPC_GET_ARG1(call), IPC_GET_ARG2(call), IPC_GET_ARG3(call)); |
63 | IPC_GET_ARG1(call), IPC_GET_ARG2(call), IPC_GET_ARG3(call)); |
64 | switch (IPC_GET_METHOD(call)) { |
64 | switch (IPC_GET_METHOD(call)) { |
65 | case IPC_M_PHONE_HUNGUP: |
65 | case IPC_M_PHONE_HUNGUP: |
66 | /* TODO: Handle hangup */ |
66 | /* TODO: Handle hangup */ |
67 | return; |
67 | return; |
68 | default: |
68 | default: |
69 | printf("Unknown device method %u.\n", IPC_GET_METHOD(call)); |
69 | printf("Unknown device method %u.\n", IPC_GET_METHOD(call)); |
70 | retval = ENOENT; |
70 | retval = ENOENT; |
71 | } |
71 | } |
72 | ipc_answer_0(callid, retval); |
72 | ipc_answer_0(callid, retval); |
73 | } |
73 | } |
74 | return; |
74 | return; |
75 | } |
75 | } |
76 | 76 | ||
77 | static int device_client_fibril(void *arg) |
77 | static int device_client_fibril(void *arg) |
78 | { |
78 | { |
79 | int handle; |
79 | int handle; |
80 | int device_phone; |
80 | int device_phone; |
81 | 81 | ||
82 | handle = (int)arg; |
82 | handle = (int)arg; |
83 | 83 | ||
84 | device_phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, \ |
84 | device_phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, \ |
85 | DEVMAP_CONNECT_TO_DEVICE, handle); |
85 | DEVMAP_CONNECT_TO_DEVICE, handle); |
86 | 86 | ||
87 | if (device_phone < 0) { |
87 | if (device_phone < 0) { |
88 | printf("Failed to connect to devmap as client (handle = %u).\n", |
88 | printf("Failed to connect to devmap as client (handle = %u).\n", |
89 | handle); |
89 | handle); |
90 | return -1; |
90 | return -1; |
91 | } |
91 | } |
92 | /* |
92 | /* |
93 | * device_phone = (int) IPC_GET_ARG3(answer); |
93 | * device_phone = (int) IPC_GET_ARG5(answer); |
94 | */ |
94 | */ |
95 | printf("Connected to device.\n"); |
95 | printf("Connected to device.\n"); |
96 | ipc_call_sync_1_0(device_phone, 1024, 1025); |
96 | ipc_call_sync_1_0(device_phone, 1024, 1025); |
97 | /* |
97 | /* |
98 | * ipc_hangup(device_phone); |
98 | * ipc_hangup(device_phone); |
99 | */ |
99 | */ |
100 | ipc_hangup(device_phone); |
100 | ipc_hangup(device_phone); |
101 | 101 | ||
102 | return EOK; |
102 | return EOK; |
103 | } |
103 | } |
104 | 104 | ||
105 | /** Communication test with device. |
105 | /** Communication test with device. |
106 | * @param handle handle to tested instance. |
106 | * @param handle handle to tested instance. |
107 | */ |
107 | */ |
108 | static int device_client(int handle) |
108 | static int device_client(int handle) |
109 | { |
109 | { |
110 | /* fid_t fid; |
110 | /* fid_t fid; |
111 | ipc_call_t call; |
111 | ipc_call_t call; |
112 | ipc_callid_t callid; |
112 | ipc_callid_t callid; |
113 | 113 | ||
114 | fid = fibril_create(device_client_fibril, (void *)handle); |
114 | fid = fibril_create(device_client_fibril, (void *)handle); |
115 | fibril_add_ready(fid); |
115 | fibril_add_ready(fid); |
116 | 116 | ||
117 | */ |
117 | */ |
118 | return EOK; |
118 | return EOK; |
119 | } |
119 | } |
120 | 120 | ||
121 | /** |
121 | /** |
122 | * |
122 | * |
123 | */ |
123 | */ |
124 | static int driver_register(char *name) |
124 | static int driver_register(char *name) |
125 | { |
125 | { |
126 | ipcarg_t retval; |
126 | ipcarg_t retval; |
127 | aid_t req; |
127 | aid_t req; |
128 | ipc_call_t answer; |
128 | ipc_call_t answer; |
129 | int phone; |
129 | int phone; |
130 | ipcarg_t callback_phonehash; |
130 | ipcarg_t callback_phonehash; |
131 | 131 | ||
132 | phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
132 | phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
133 | DEVMAP_DRIVER, 0); |
133 | DEVMAP_DRIVER, 0); |
134 | 134 | ||
135 | while (phone < 0) { |
135 | while (phone < 0) { |
136 | usleep(100000); |
136 | usleep(100000); |
137 | phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
137 | phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
138 | DEVMAP_DRIVER, 0); |
138 | DEVMAP_DRIVER, 0); |
139 | } |
139 | } |
140 | 140 | ||
141 | req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); |
141 | req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); |
142 | 142 | ||
143 | retval = ipc_data_send(phone, (char *)name, strlen(name) + 1); |
143 | retval = ipc_data_send(phone, (char *)name, strlen(name) + 1); |
144 | 144 | ||
145 | if (retval != EOK) { |
145 | if (retval != EOK) { |
146 | async_wait_for(req, NULL); |
146 | async_wait_for(req, NULL); |
147 | return -1; |
147 | return -1; |
148 | } |
148 | } |
149 | 149 | ||
150 | async_set_client_connection(driver_client_connection); |
150 | async_set_client_connection(driver_client_connection); |
151 | 151 | ||
152 | ipc_connect_to_me(phone, 0, 0, &callback_phonehash); |
152 | ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash); |
153 | /* |
153 | /* |
154 | if (NULL == async_new_connection(callback_phonehash, 0, NULL, |
154 | if (NULL == async_new_connection(callback_phonehash, 0, NULL, |
155 | driver_client_connection)) { |
155 | driver_client_connection)) { |
156 | printf("Failed to create new fibril.\n"); |
156 | printf("Failed to create new fibril.\n"); |
157 | async_wait_for(req, NULL); |
157 | async_wait_for(req, NULL); |
158 | return -1; |
158 | return -1; |
159 | } |
159 | } |
160 | */ |
160 | */ |
161 | async_wait_for(req, &retval); |
161 | async_wait_for(req, &retval); |
162 | printf("Driver '%s' registered.\n", name); |
162 | printf("Driver '%s' registered.\n", name); |
163 | 163 | ||
164 | return phone; |
164 | return phone; |
165 | } |
165 | } |
166 | 166 | ||
167 | static int device_get_handle(int driver_phone, char *name, int *handle) |
167 | static int device_get_handle(int driver_phone, char *name, int *handle) |
168 | { |
168 | { |
169 | ipcarg_t retval; |
169 | ipcarg_t retval; |
170 | aid_t req; |
170 | aid_t req; |
171 | ipc_call_t answer; |
171 | ipc_call_t answer; |
172 | 172 | ||
173 | req = async_send_2(driver_phone, DEVMAP_DEVICE_GET_HANDLE, 0, 0, &answer); |
173 | req = async_send_2(driver_phone, DEVMAP_DEVICE_GET_HANDLE, 0, 0, &answer); |
174 | 174 | ||
175 | retval = ipc_data_send(driver_phone, name, strlen(name) + 1); |
175 | retval = ipc_data_send(driver_phone, name, strlen(name) + 1); |
176 | 176 | ||
177 | if (retval != EOK) { |
177 | if (retval != EOK) { |
178 | printf("Failed to send device name '%s'.\n", name); |
178 | printf("Failed to send device name '%s'.\n", name); |
179 | async_wait_for(req, NULL); |
179 | async_wait_for(req, NULL); |
180 | return retval; |
180 | return retval; |
181 | } |
181 | } |
182 | 182 | ||
183 | async_wait_for(req, &retval); |
183 | async_wait_for(req, &retval); |
184 | 184 | ||
185 | if (NULL != handle) { |
185 | if (NULL != handle) { |
186 | *handle = -1; |
186 | *handle = -1; |
187 | } |
187 | } |
188 | 188 | ||
189 | if (EOK == retval) { |
189 | if (EOK == retval) { |
190 | 190 | ||
191 | if (NULL != handle) { |
191 | if (NULL != handle) { |
192 | *handle = (int) IPC_GET_ARG1(answer); |
192 | *handle = (int) IPC_GET_ARG1(answer); |
193 | } |
193 | } |
194 | printf("Device '%s' has handle %u.\n", name, (int) IPC_GET_ARG1(answer)); |
194 | printf("Device '%s' has handle %u.\n", name, (int) IPC_GET_ARG1(answer)); |
195 | } else { |
195 | } else { |
196 | printf("Failed to get handle for device '%s'.\n", name); |
196 | printf("Failed to get handle for device '%s'.\n", name); |
197 | } |
197 | } |
198 | 198 | ||
199 | return retval; |
199 | return retval; |
200 | } |
200 | } |
201 | 201 | ||
202 | /** Register new device. |
202 | /** Register new device. |
203 | * @param driver_phone |
203 | * @param driver_phone |
204 | * @param name Device name. |
204 | * @param name Device name. |
205 | * @param handle Output variable. Handle to the created instance of device. |
205 | * @param handle Output variable. Handle to the created instance of device. |
206 | */ |
206 | */ |
207 | static int device_register(int driver_phone, char *name, int *handle) |
207 | static int device_register(int driver_phone, char *name, int *handle) |
208 | { |
208 | { |
209 | ipcarg_t retval; |
209 | ipcarg_t retval; |
210 | aid_t req; |
210 | aid_t req; |
211 | ipc_call_t answer; |
211 | ipc_call_t answer; |
212 | 212 | ||
213 | req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer); |
213 | req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer); |
214 | 214 | ||
215 | retval = ipc_data_send(driver_phone, (char *)name, strlen(name) + 1); |
215 | retval = ipc_data_send(driver_phone, (char *)name, strlen(name) + 1); |
216 | 216 | ||
217 | if (retval != EOK) { |
217 | if (retval != EOK) { |
218 | printf("Failed to send device name '%s'.\n", name); |
218 | printf("Failed to send device name '%s'.\n", name); |
219 | async_wait_for(req, NULL); |
219 | async_wait_for(req, NULL); |
220 | return retval; |
220 | return retval; |
221 | } |
221 | } |
222 | 222 | ||
223 | async_wait_for(req, &retval); |
223 | async_wait_for(req, &retval); |
224 | 224 | ||
225 | if (NULL != handle) { |
225 | if (NULL != handle) { |
226 | *handle = -1; |
226 | *handle = -1; |
227 | } |
227 | } |
228 | 228 | ||
229 | if (EOK == retval) { |
229 | if (EOK == retval) { |
230 | 230 | ||
231 | if (NULL != handle) { |
231 | if (NULL != handle) { |
232 | *handle = (int) IPC_GET_ARG1(answer); |
232 | *handle = (int) IPC_GET_ARG1(answer); |
233 | } |
233 | } |
234 | printf("Device registered with handle %u.\n", (int) IPC_GET_ARG1(answer)); |
234 | printf("Device registered with handle %u.\n", (int) IPC_GET_ARG1(answer)); |
235 | } |
235 | } |
236 | 236 | ||
237 | return retval; |
237 | return retval; |
238 | } |
238 | } |
239 | 239 | ||
240 | /** Test DevMap from the driver's point of view. |
240 | /** Test DevMap from the driver's point of view. |
241 | * |
241 | * |
242 | * |
242 | * |
243 | */ |
243 | */ |
244 | char * test_devmap1(bool quiet) |
244 | char * test_devmap1(bool quiet) |
245 | { |
245 | { |
246 | int driver_phone; |
246 | int driver_phone; |
247 | int dev1_handle; |
247 | int dev1_handle; |
248 | int dev2_handle; |
248 | int dev2_handle; |
249 | int dev3_handle; |
249 | int dev3_handle; |
250 | int handle; |
250 | int handle; |
251 | 251 | ||
252 | /* Register new driver */ |
252 | /* Register new driver */ |
253 | driver_phone = driver_register("TestDriver"); |
253 | driver_phone = driver_register("TestDriver"); |
254 | 254 | ||
255 | if (driver_phone < 0) { |
255 | if (driver_phone < 0) { |
256 | return "Error: Cannot register driver.\n"; |
256 | return "Error: Cannot register driver.\n"; |
257 | } |
257 | } |
258 | 258 | ||
259 | /* Register new device dev1*/ |
259 | /* Register new device dev1*/ |
260 | if (EOK != device_register(driver_phone, TEST_DEVICE1, &dev1_handle)) { |
260 | if (EOK != device_register(driver_phone, TEST_DEVICE1, &dev1_handle)) { |
261 | ipc_hangup(driver_phone); |
261 | ipc_hangup(driver_phone); |
262 | return "Error: cannot register device.\n"; |
262 | return "Error: cannot register device.\n"; |
263 | } |
263 | } |
264 | 264 | ||
265 | /* Get handle for dev2 (Should fail unless device is already |
265 | /* Get handle for dev2 (Should fail unless device is already |
266 | * registered by someone else) |
266 | * registered by someone else) |
267 | */ |
267 | */ |
268 | if (EOK == device_get_handle(driver_phone, TEST_DEVICE2, &handle)) { |
268 | if (EOK == device_get_handle(driver_phone, TEST_DEVICE2, &handle)) { |
269 | ipc_hangup(driver_phone); |
269 | ipc_hangup(driver_phone); |
270 | return "Error: got handle for dev2 before it was registered.\n"; |
270 | return "Error: got handle for dev2 before it was registered.\n"; |
271 | } |
271 | } |
272 | 272 | ||
273 | /* Register new device dev2*/ |
273 | /* Register new device dev2*/ |
274 | if (EOK != device_register(driver_phone, TEST_DEVICE2, &dev2_handle)) { |
274 | if (EOK != device_register(driver_phone, TEST_DEVICE2, &dev2_handle)) { |
275 | ipc_hangup(driver_phone); |
275 | ipc_hangup(driver_phone); |
276 | return "Error: cannot register device dev2.\n"; |
276 | return "Error: cannot register device dev2.\n"; |
277 | } |
277 | } |
278 | 278 | ||
279 | /* Register again device dev1 */ |
279 | /* Register again device dev1 */ |
280 | if (EOK == device_register(driver_phone, TEST_DEVICE1, &dev3_handle)) { |
280 | if (EOK == device_register(driver_phone, TEST_DEVICE1, &dev3_handle)) { |
281 | return "Error: dev1 registered twice.\n"; |
281 | return "Error: dev1 registered twice.\n"; |
282 | } |
282 | } |
283 | 283 | ||
284 | /* Get handle for dev1*/ |
284 | /* Get handle for dev1*/ |
285 | if (EOK != device_get_handle(driver_phone, TEST_DEVICE1, &handle)) { |
285 | if (EOK != device_get_handle(driver_phone, TEST_DEVICE1, &handle)) { |
286 | ipc_hangup(driver_phone); |
286 | ipc_hangup(driver_phone); |
287 | return "Error: cannot get handle for 'DEVMAP_DEVICE1'.\n"; |
287 | return "Error: cannot get handle for 'DEVMAP_DEVICE1'.\n"; |
288 | } |
288 | } |
289 | 289 | ||
290 | if (handle != dev1_handle) { |
290 | if (handle != dev1_handle) { |
291 | ipc_hangup(driver_phone); |
291 | ipc_hangup(driver_phone); |
292 | return "Error: cannot get handle for 'DEVMAP_DEVICE1'.\n"; |
292 | return "Error: cannot get handle for 'DEVMAP_DEVICE1'.\n"; |
293 | } |
293 | } |
294 | 294 | ||
295 | if (EOK != device_client(dev1_handle)) { |
295 | if (EOK != device_client(dev1_handle)) { |
296 | ipc_hangup(driver_phone); |
296 | ipc_hangup(driver_phone); |
297 | return "Error: failed client test for 'DEVMAP_DEVICE1'.\n"; |
297 | return "Error: failed client test for 'DEVMAP_DEVICE1'.\n"; |
298 | } |
298 | } |
299 | 299 | ||
300 | /* TODO: */ |
300 | /* TODO: */ |
301 | 301 | ||
302 | ipc_hangup(driver_phone); |
302 | ipc_hangup(driver_phone); |
303 | 303 | ||
304 | return NULL; |
304 | return NULL; |
305 | } |
305 | } |
306 | 306 | ||
307 | char *test_devmap2(bool quiet) |
307 | char *test_devmap2(bool quiet) |
308 | { |
308 | { |
309 | /*TODO: Full automatic test */ |
309 | /*TODO: Full automatic test */ |
310 | return NULL; |
310 | return NULL; |
311 | } |
311 | } |
312 | 312 | ||
313 | char *test_devmap3(bool quiet) |
313 | char *test_devmap3(bool quiet) |
314 | { |
314 | { |
315 | /* TODO: allow user to call test functions in random order */ |
315 | /* TODO: allow user to call test functions in random order */ |
316 | return NULL; |
316 | return NULL; |
317 | } |
317 | } |
318 | 318 | ||
319 | 319 |