Lines Matching refs:lq
30 * lq will be the lease queue for which we add or removing leases
40 #define INIT_LQ(LQ) memset(&(LQ), 0, sizeof(struct leasechain))
42 #define INIT_LQ(LQ) lq = NULL
55 LEASE_STRUCT lq;
58 INIT_LQ(lq);
65 /* Check that the lq is empty */
66 if ((LEASE_NOT_EMPTY(lq)) || (LEASE_NOT_EMPTYP(&lq)))
67 atf_tc_fail("lq not empty at start.");
70 if ((LEASE_GET_FIRST(lq) != NULL) || (LEASE_GET_FIRSTP(&lq) != NULL))
74 LEASE_INSERTP(&lq, &test_lease1);
76 /* lq shouldn't be empty anymore */
77 if (!(LEASE_NOT_EMPTY(lq)) || !(LEASE_NOT_EMPTYP(&lq)))
78 atf_tc_fail("lq empty after insertion.");
81 check_lease = LEASE_GET_FIRST(lq);
86 check_lease = LEASE_GET_FIRSTP(&lq);
91 if ((LEASE_GET_NEXT(lq, check_lease) != NULL) ||
92 (LEASE_GET_NEXTP(&lq, check_lease) != NULL)) {
97 LEASE_REMOVEP(&lq, &test_lease1);
100 if ((LEASE_NOT_EMPTY(lq)) || (LEASE_NOT_EMPTYP(&lq)))
101 atf_tc_fail("lq not empty afer removal");
104 if ((LEASE_GET_FIRST(lq) != NULL) || (LEASE_GET_FIRSTP(&lq) != NULL))
118 LEASE_STRUCT lq;
122 INIT_LQ(lq);
130 LEASE_INSERTP(&lq, &test_lease[i]);
134 check_lease = LEASE_GET_FIRST(lq);
138 check_lease = LEASE_GET_NEXT(lq, check_lease);
144 LEASE_REMOVEP(&lq, &test_lease[2]);
145 check_lease = LEASE_GET_FIRST(lq);
148 check_lease = LEASE_GET_NEXT(lq, check_lease);
152 LEASE_REMOVEP(&lq, &test_lease[1]);
153 check_lease = LEASE_GET_FIRST(lq);
157 LEASE_REMOVEP(&lq, check_lease);
160 if (LEASE_NOT_EMPTY(lq))
161 atf_tc_fail("lq not empty afer removal");
174 LEASE_STRUCT lq;
178 INIT_LQ(lq);
189 LEASE_INSERTP(&lq, &test_lease[2]);
190 LEASE_INSERTP(&lq, &test_lease[1]);
191 LEASE_INSERTP(&lq, &test_lease[0]);
194 check_lease = LEASE_GET_FIRST(lq);
198 check_lease = LEASE_GET_NEXT(lq, check_lease);
204 check_lease = LEASE_GET_FIRST(lq);
205 LEASE_REMOVEP(&lq, check_lease);
206 check_lease = LEASE_GET_FIRST(lq);
209 check_lease = LEASE_GET_NEXT(lq, check_lease);
213 check_lease = LEASE_GET_FIRST(lq);
214 LEASE_REMOVEP(&lq, check_lease);
215 check_lease = LEASE_GET_FIRST(lq);
219 LEASE_REMOVEP(&lq, check_lease);
222 if (LEASE_NOT_EMPTY(lq))
223 atf_tc_fail("lq not empty afer removal");
236 LEASE_STRUCT lq;
240 INIT_LQ(lq);
251 LEASE_INSERTP(&lq, &test_lease[0]);
252 LEASE_INSERTP(&lq, &test_lease[2]);
253 LEASE_INSERTP(&lq, &test_lease[1]);
256 check_lease = LEASE_GET_FIRST(lq);
260 check_lease = LEASE_GET_NEXT(lq, check_lease);
266 LEASE_REMOVEP(&lq, &test_lease[1]);
267 check_lease = LEASE_GET_FIRST(lq);
270 check_lease = LEASE_GET_NEXT(lq, check_lease);
274 LEASE_REMOVEP(&lq, &test_lease[0]);
275 check_lease = LEASE_GET_FIRST(lq);
279 LEASE_REMOVEP(&lq, check_lease);
282 if (LEASE_NOT_EMPTY(lq))
283 atf_tc_fail("lq not empty afer removal");
296 LEASE_STRUCT lq;
300 INIT_LQ(lq);
308 LEASE_INSERTP(&lq, &test_lease[i]);
312 LEASE_REMOVEP(&lq, &test_lease[0]);
314 LEASE_INSERTP(&lq, &test_lease[0]);
317 check_lease = LEASE_GET_FIRST(lq);
320 check_lease = LEASE_GET_NEXT(lq, check_lease);
323 check_lease = LEASE_GET_NEXT(lq, check_lease);
328 LEASE_REMOVEP(&lq, &test_lease[1]);
330 LEASE_INSERTP(&lq, &test_lease[1]);
333 check_lease = LEASE_GET_FIRST(lq);
336 check_lease = LEASE_GET_NEXT(lq, check_lease);
339 check_lease = LEASE_GET_NEXT(lq, check_lease);
344 LEASE_REMOVEP(&lq, &test_lease[2]);
346 LEASE_INSERTP(&lq, &test_lease[2]);
349 check_lease = LEASE_GET_FIRST(lq);
352 check_lease = LEASE_GET_NEXT(lq, check_lease);
355 check_lease = LEASE_GET_NEXT(lq, check_lease);
374 LEASE_STRUCT lq;
378 INIT_LQ(lq);
380 lc_init_growth(&lq, 5);
390 LEASE_INSERTP(&lq, &test_lease[i]);
394 check_lease = LEASE_GET_FIRST(lq);
398 check_lease = LEASE_GET_NEXT(lq, check_lease);
403 LEASE_REMOVEP(&lq, &test_lease[i]);
413 LEASE_INSERTP(&lq, &test_lease[i]);
418 LEASE_INSERTP(&lq, &test_lease[i]);
422 check_lease = LEASE_GET_FIRST(lq);
426 check_lease = LEASE_GET_NEXT(lq, check_lease);
440 LEASE_STRUCT lq;
444 INIT_LQ(lq);
455 LEASE_INSERTP(&lq, &test_lease[i]);
465 check_lease = LEASE_GET_FIRST(lq);
469 check_lease = LEASE_GET_NEXT(lq, check_lease);
478 LEASE_REMOVEP(&lq, &test_lease[i]);
480 LEASE_INSERTP(&lq, &test_lease[i]);
488 LEASE_REMOVEP(&lq, &test_lease[i]);
490 if (LEASE_NOT_EMPTY(lq))