Lines Matching refs:refbuf

44 test_empty_array (struct alloc_buffer refbuf)  in test_empty_array()  argument
46 bool refbuf_failed = alloc_buffer_has_failed (&refbuf); in test_empty_array()
49 __func__, (unsigned long long) refbuf.__alloc_buffer_current, in test_empty_array()
50 (unsigned long long) refbuf.__alloc_buffer_end, refbuf_failed); in test_empty_array()
52 struct alloc_buffer buf = refbuf; in test_empty_array()
58 struct alloc_buffer buf = refbuf; in test_empty_array()
66 struct alloc_buffer buf = refbuf; in test_empty_array()
75 struct alloc_buffer buf = refbuf; in test_empty_array()
87 test_impossible_array (struct alloc_buffer refbuf) in test_impossible_array() argument
91 __func__, (unsigned long long) refbuf.__alloc_buffer_current, in test_impossible_array()
92 (unsigned long long) refbuf.__alloc_buffer_end); in test_impossible_array()
103 struct alloc_buffer buf = refbuf; in test_impossible_array()
108 struct alloc_buffer buf = refbuf; in test_impossible_array()
113 struct alloc_buffer buf = refbuf; in test_impossible_array()
118 struct alloc_buffer buf = refbuf; in test_impossible_array()
123 struct alloc_buffer buf = refbuf; in test_impossible_array()
133 test_after_failure (struct alloc_buffer refbuf) in test_after_failure() argument
137 __func__, (unsigned long long) refbuf.__alloc_buffer_current, in test_after_failure()
138 (unsigned long long) refbuf.__alloc_buffer_end); in test_after_failure()
139 TEST_VERIFY (alloc_buffer_has_failed (&refbuf)); in test_after_failure()
141 struct alloc_buffer buf = refbuf; in test_after_failure()
146 struct alloc_buffer buf = refbuf; in test_after_failure()
151 struct alloc_buffer buf = refbuf; in test_after_failure()
156 struct alloc_buffer buf = refbuf; in test_after_failure()
161 test_impossible_array (refbuf); in test_after_failure()
165 struct alloc_buffer buf = refbuf; in test_after_failure()
170 struct alloc_buffer buf = refbuf; in test_after_failure()
175 struct alloc_buffer buf = refbuf; in test_after_failure()
180 struct alloc_buffer buf = refbuf; in test_after_failure()
189 test_empty (struct alloc_buffer refbuf) in test_empty() argument
191 TEST_VERIFY (alloc_buffer_size (&refbuf) == 0); in test_empty()
192 if (alloc_buffer_next (&refbuf, void) != NULL) in test_empty()
193 TEST_VERIFY (!alloc_buffer_has_failed (&refbuf)); in test_empty()
194 test_empty_array (refbuf); in test_empty()
195 test_impossible_array (refbuf); in test_empty()
199 struct alloc_buffer buf = refbuf; in test_empty()
204 struct alloc_buffer buf = refbuf; in test_empty()
209 struct alloc_buffer buf = refbuf; in test_empty()
214 struct alloc_buffer buf = refbuf; in test_empty()
219 struct alloc_buffer buf = refbuf; in test_empty()
224 struct alloc_buffer buf = refbuf; in test_empty()
229 struct alloc_buffer buf = refbuf; in test_empty()
236 test_size_1 (struct alloc_buffer refbuf) in test_size_1() argument
238 TEST_VERIFY (!alloc_buffer_has_failed (&refbuf)); in test_size_1()
239 TEST_VERIFY (alloc_buffer_size (&refbuf) == 1); in test_size_1()
240 test_empty_array (refbuf); in test_size_1()
241 test_impossible_array (refbuf); in test_size_1()
245 struct alloc_buffer buf = refbuf; in test_size_1()
250 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "\x11", 1) == 0); in test_size_1()
252 struct alloc_buffer buf = refbuf; in test_size_1()
259 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "\176", 1) == 0); in test_size_1()
261 struct alloc_buffer buf = refbuf; in test_size_1()
268 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "\xfd", 1) == 0); in test_size_1()
272 struct alloc_buffer buf = refbuf; in test_size_1()
277 struct alloc_buffer buf = refbuf; in test_size_1()
282 struct alloc_buffer buf = refbuf; in test_size_1()
287 struct alloc_buffer buf = refbuf; in test_size_1()
292 struct alloc_buffer buf = refbuf; in test_size_1()
297 struct alloc_buffer buf = refbuf; in test_size_1()
304 test_size_2 (struct alloc_buffer refbuf) in test_size_2() argument
306 TEST_VERIFY (!alloc_buffer_has_failed (&refbuf)); in test_size_2()
307 TEST_VERIFY (alloc_buffer_size (&refbuf) == 2); in test_size_2()
308 TEST_VERIFY (IS_ALIGNED (alloc_buffer_next (&refbuf, void), short)); in test_size_2()
309 test_empty_array (refbuf); in test_size_2()
310 test_impossible_array (refbuf); in test_size_2()
314 struct alloc_buffer buf = refbuf; in test_size_2()
319 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "@\xfd", 2) == 0); in test_size_2()
321 struct alloc_buffer buf = refbuf; in test_size_2()
328 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "A\xfd", 2) == 0); in test_size_2()
330 struct alloc_buffer buf = refbuf; in test_size_2()
337 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "B\xfd", 2) == 0); in test_size_2()
339 struct alloc_buffer buf = refbuf; in test_size_2()
347 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "\x12\xf4", 2) == 0); in test_size_2()
349 struct alloc_buffer buf = refbuf; in test_size_2()
357 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "\x13\xf5", 2) == 0); in test_size_2()
359 struct alloc_buffer buf = refbuf; in test_size_2()
366 TEST_VERIFY (memcmp (alloc_buffer_next (&refbuf, void), "12", 2) == 0); in test_size_2()
376 struct alloc_buffer refbuf = alloc_buffer_create (backing + 1, SIZE); in test_misaligned() local
379 struct alloc_buffer buf = refbuf; in test_misaligned()
392 struct alloc_buffer buf = refbuf; in test_misaligned()
406 struct alloc_buffer buf = refbuf; in test_misaligned()
421 struct alloc_buffer buf = refbuf; in test_misaligned()
443 struct alloc_buffer refbuf = alloc_buffer_create ((void *) start, 16); in test_large_misaligned() local
444 TEST_VERIFY (!alloc_buffer_has_failed (&refbuf)); in test_large_misaligned()
452 struct alloc_buffer buf = refbuf; in test_large_misaligned()
458 struct alloc_buffer buf = refbuf; in test_large_misaligned()