4 * Copyright (c) Intel Corporation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name of Intel Corporation nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #include "spdk/stdinc.h"
36 #include "CUnit/Basic.h"
38 #include "common/lib/ut_multithread.c"
40 #include "spdk_cunit.h"
41 #include "blobfs/blobfs.c"
42 #include "blobfs/tree.c"
43 #include "blob/blobstore.h"
45 #include "spdk_internal/thread.h"
47 #include "unit/lib/blob/bs_dev_common.c"
49 struct spdk_filesystem
*g_fs
;
50 struct spdk_file
*g_file
;
52 struct spdk_trace_histories
*g_trace_histories
;
53 DEFINE_STUB_V(spdk_trace_add_register_fn
, (struct spdk_trace_register_fn
*reg_fn
));
54 DEFINE_STUB_V(spdk_trace_register_description
, (const char *name
,
55 uint16_t tpoint_id
, uint8_t owner_type
,
56 uint8_t object_type
, uint8_t new_object
,
57 uint8_t arg1_is_ptr
, const char *arg1_name
));
58 DEFINE_STUB_V(_spdk_trace_record
, (uint64_t tsc
, uint16_t tpoint_id
, uint16_t poller_id
,
59 uint32_t size
, uint64_t object_id
, uint64_t arg1
));
61 /* Return NULL to test hardcoded defaults. */
62 struct spdk_conf_section
*
63 spdk_conf_find_section(struct spdk_conf
*cp
, const char *name
)
68 /* Return -1 to test hardcoded defaults. */
70 spdk_conf_section_get_intval(struct spdk_conf_section
*sp
, const char *key
)
76 fs_op_complete(void *ctx
, int fserrno
)
82 fs_op_with_handle_complete(void *ctx
, struct spdk_filesystem
*fs
, int fserrno
)
92 while (spdk_thread_poll(g_cache_pool_thread
, 0, 0) > 0) {}
98 struct spdk_filesystem
*fs
;
99 struct spdk_bs_dev
*dev
;
103 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
105 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
106 CU_ASSERT(g_fserrno
== 0);
108 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
111 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
113 CU_ASSERT(g_fserrno
== 0);
117 create_cb(void *ctx
, int fserrno
)
123 open_cb(void *ctx
, struct spdk_file
*f
, int fserrno
)
130 delete_cb(void *ctx
, int fserrno
)
138 struct spdk_filesystem
*fs
;
140 struct spdk_bs_dev
*dev
;
141 struct spdk_file
*file
;
142 char name
[257] = {'\0'};
145 memset(name
, 'a', sizeof(name
) - 1);
147 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
149 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
150 CU_ASSERT(g_fserrno
== 0);
152 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
155 /* Open should fail, because the file name is too long. */
156 spdk_fs_open_file_async(fs
, name
, SPDK_BLOBFS_OPEN_CREATE
, open_cb
, NULL
);
158 CU_ASSERT(g_fserrno
== -ENAMETOOLONG
);
161 spdk_fs_open_file_async(fs
, "file1", 0, open_cb
, NULL
);
163 CU_ASSERT(g_fserrno
== -ENOENT
);
167 spdk_fs_open_file_async(fs
, "file1", SPDK_BLOBFS_OPEN_CREATE
, open_cb
, NULL
);
169 CU_ASSERT(g_fserrno
== 0);
170 SPDK_CU_ASSERT_FATAL(g_file
!= NULL
);
171 CU_ASSERT(!strcmp("file1", g_file
->name
));
172 CU_ASSERT(g_file
->ref_count
== 1);
174 iter
= spdk_fs_iter_first(fs
);
175 CU_ASSERT(iter
!= NULL
);
176 file
= spdk_fs_iter_get_file(iter
);
177 SPDK_CU_ASSERT_FATAL(file
!= NULL
);
178 CU_ASSERT(!strcmp("file1", file
->name
));
179 iter
= spdk_fs_iter_next(iter
);
180 CU_ASSERT(iter
== NULL
);
183 /* Delete should successful, we will mark the file as deleted. */
184 spdk_fs_delete_file_async(fs
, "file1", delete_cb
, NULL
);
186 CU_ASSERT(g_fserrno
== 0);
187 CU_ASSERT(!TAILQ_EMPTY(&fs
->files
));
190 spdk_file_close_async(g_file
, fs_op_complete
, NULL
);
192 CU_ASSERT(g_fserrno
== 0);
193 CU_ASSERT(TAILQ_EMPTY(&fs
->files
));
196 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
198 CU_ASSERT(g_fserrno
== 0);
204 struct spdk_filesystem
*fs
;
205 struct spdk_bs_dev
*dev
;
206 char name
[257] = {'\0'};
209 memset(name
, 'a', sizeof(name
) - 1);
211 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
213 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
214 CU_ASSERT(g_fserrno
== 0);
216 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
219 /* Create should fail, because the file name is too long. */
220 spdk_fs_create_file_async(fs
, name
, create_cb
, NULL
);
222 CU_ASSERT(g_fserrno
== -ENAMETOOLONG
);
225 spdk_fs_create_file_async(fs
, "file1", create_cb
, NULL
);
227 CU_ASSERT(g_fserrno
== 0);
230 spdk_fs_create_file_async(fs
, "file1", create_cb
, NULL
);
232 CU_ASSERT(g_fserrno
== -EEXIST
);
235 spdk_fs_delete_file_async(fs
, "file1", delete_cb
, NULL
);
237 CU_ASSERT(g_fserrno
== 0);
238 CU_ASSERT(TAILQ_EMPTY(&fs
->files
));
241 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
243 CU_ASSERT(g_fserrno
== 0);
249 struct spdk_filesystem
*fs
;
250 struct spdk_bs_dev
*dev
;
254 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
256 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
257 CU_ASSERT(g_fserrno
== 0);
259 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
263 spdk_fs_open_file_async(fs
, "file1", SPDK_BLOBFS_OPEN_CREATE
, open_cb
, NULL
);
265 CU_ASSERT(g_fserrno
== 0);
266 SPDK_CU_ASSERT_FATAL(g_file
!= NULL
);
269 spdk_file_truncate_async(g_file
, 18 * 1024 * 1024 + 1, fs_op_complete
, NULL
);
271 CU_ASSERT(g_fserrno
== 0);
272 CU_ASSERT(g_file
->length
== 18 * 1024 * 1024 + 1);
275 spdk_file_truncate_async(g_file
, 1, fs_op_complete
, NULL
);
277 CU_ASSERT(g_fserrno
== 0);
278 CU_ASSERT(g_file
->length
== 1);
281 spdk_file_truncate_async(g_file
, 18 * 1024 * 1024 + 1, fs_op_complete
, NULL
);
283 CU_ASSERT(g_fserrno
== 0);
284 CU_ASSERT(g_file
->length
== 18 * 1024 * 1024 + 1);
287 spdk_file_close_async(g_file
, fs_op_complete
, NULL
);
289 CU_ASSERT(g_fserrno
== 0);
290 CU_ASSERT(g_file
->ref_count
== 0);
293 spdk_fs_delete_file_async(fs
, "file1", delete_cb
, NULL
);
295 CU_ASSERT(g_fserrno
== 0);
296 CU_ASSERT(TAILQ_EMPTY(&fs
->files
));
299 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
301 CU_ASSERT(g_fserrno
== 0);
307 struct spdk_filesystem
*fs
;
308 struct spdk_file
*file
, *file2
, *file_iter
;
309 struct spdk_bs_dev
*dev
;
313 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
315 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
316 CU_ASSERT(g_fserrno
== 0);
318 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
321 spdk_fs_create_file_async(fs
, "file1", create_cb
, NULL
);
323 CU_ASSERT(g_fserrno
== 0);
327 spdk_fs_open_file_async(fs
, "file1", 0, open_cb
, NULL
);
329 CU_ASSERT(g_fserrno
== 0);
330 SPDK_CU_ASSERT_FATAL(g_file
!= NULL
);
331 CU_ASSERT(g_file
->ref_count
== 1);
336 spdk_file_close_async(file
, fs_op_complete
, NULL
);
338 CU_ASSERT(g_fserrno
== 0);
339 SPDK_CU_ASSERT_FATAL(file
->ref_count
== 0);
343 spdk_fs_open_file_async(fs
, "file2", SPDK_BLOBFS_OPEN_CREATE
, open_cb
, NULL
);
345 CU_ASSERT(g_fserrno
== 0);
346 SPDK_CU_ASSERT_FATAL(g_file
!= NULL
);
347 CU_ASSERT(g_file
->ref_count
== 1);
352 spdk_file_close_async(file2
, fs_op_complete
, NULL
);
354 CU_ASSERT(g_fserrno
== 0);
355 SPDK_CU_ASSERT_FATAL(file2
->ref_count
== 0);
358 * Do a 3-way rename. This should delete the old "file2", then rename
359 * "file1" to "file2".
362 spdk_fs_rename_file_async(fs
, "file1", "file2", fs_op_complete
, NULL
);
364 CU_ASSERT(g_fserrno
== 0);
365 CU_ASSERT(file
->ref_count
== 0);
366 CU_ASSERT(!strcmp(file
->name
, "file2"));
367 CU_ASSERT(TAILQ_FIRST(&fs
->files
) == file
);
368 CU_ASSERT(TAILQ_NEXT(file
, tailq
) == NULL
);
371 spdk_fs_delete_file_async(fs
, "file1", delete_cb
, NULL
);
373 CU_ASSERT(g_fserrno
== -ENOENT
);
374 CU_ASSERT(!TAILQ_EMPTY(&fs
->files
));
375 TAILQ_FOREACH(file_iter
, &fs
->files
, tailq
) {
376 if (file_iter
== NULL
) {
377 SPDK_CU_ASSERT_FATAL(false);
382 spdk_fs_delete_file_async(fs
, "file2", delete_cb
, NULL
);
384 CU_ASSERT(g_fserrno
== 0);
385 CU_ASSERT(TAILQ_EMPTY(&fs
->files
));
388 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
390 CU_ASSERT(g_fserrno
== 0);
396 struct spdk_filesystem
*fs
;
397 struct spdk_bs_dev
*dev
;
403 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
405 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
406 CU_ASSERT(g_fserrno
== 0);
408 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
412 spdk_fs_open_file_async(fs
, "file1", SPDK_BLOBFS_OPEN_CREATE
, open_cb
, NULL
);
414 CU_ASSERT(g_fserrno
== 0);
415 SPDK_CU_ASSERT_FATAL(g_file
!= NULL
);
418 CU_ASSERT(g_file
->length
== 0);
420 memset(w_buf
, 0x5a, sizeof(w_buf
));
421 spdk_file_write_async(g_file
, fs
->sync_target
.sync_io_channel
, w_buf
, 0, 4096,
422 fs_op_complete
, NULL
);
424 CU_ASSERT(g_fserrno
== 0);
425 CU_ASSERT(g_file
->length
== 4096);
429 memset(r_buf
, 0x0, sizeof(r_buf
));
430 spdk_file_read_async(g_file
, fs
->sync_target
.sync_io_channel
, r_buf
, 0, 4096,
431 fs_op_complete
, NULL
);
433 CU_ASSERT(g_fserrno
== 0);
434 CU_ASSERT(memcmp(r_buf
, w_buf
, sizeof(r_buf
)) == 0);
437 spdk_file_close_async(g_file
, fs_op_complete
, NULL
);
439 CU_ASSERT(g_fserrno
== 0);
442 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
444 CU_ASSERT(g_fserrno
== 0);
448 fs_writev_readv_async(void)
450 struct spdk_filesystem
*fs
;
451 struct spdk_bs_dev
*dev
;
452 struct iovec w_iov
[2];
453 struct iovec r_iov
[2];
459 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
461 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
462 CU_ASSERT(g_fserrno
== 0);
464 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
468 spdk_fs_open_file_async(fs
, "file1", SPDK_BLOBFS_OPEN_CREATE
, open_cb
, NULL
);
470 CU_ASSERT(g_fserrno
== 0);
471 SPDK_CU_ASSERT_FATAL(g_file
!= NULL
);
474 CU_ASSERT(g_file
->length
== 0);
476 memset(w_buf
, 0x5a, sizeof(w_buf
));
477 w_iov
[0].iov_base
= w_buf
;
478 w_iov
[0].iov_len
= 2048;
479 w_iov
[1].iov_base
= w_buf
+ 2048;
480 w_iov
[1].iov_len
= 2048;
481 spdk_file_writev_async(g_file
, fs
->sync_target
.sync_io_channel
,
482 w_iov
, 2, 0, 4096, fs_op_complete
, NULL
);
484 CU_ASSERT(g_fserrno
== 0);
485 CU_ASSERT(g_file
->length
== 4096);
489 memset(r_buf
, 0x0, sizeof(r_buf
));
490 r_iov
[0].iov_base
= r_buf
;
491 r_iov
[0].iov_len
= 2048;
492 r_iov
[1].iov_base
= r_buf
+ 2048;
493 r_iov
[1].iov_len
= 2048;
494 spdk_file_readv_async(g_file
, fs
->sync_target
.sync_io_channel
,
495 r_iov
, 2, 0, 4096, fs_op_complete
, NULL
);
497 CU_ASSERT(g_fserrno
== 0);
498 CU_ASSERT(memcmp(r_buf
, w_buf
, sizeof(r_buf
)) == 0);
500 /* Overwrite file with block aligned */
502 memset(w_buf
, 0x6a, sizeof(w_buf
));
503 w_iov
[0].iov_base
= w_buf
;
504 w_iov
[0].iov_len
= 2048;
505 w_iov
[1].iov_base
= w_buf
+ 2048;
506 w_iov
[1].iov_len
= 2048;
507 spdk_file_writev_async(g_file
, fs
->sync_target
.sync_io_channel
,
508 w_iov
, 2, 0, 4096, fs_op_complete
, NULL
);
510 CU_ASSERT(g_fserrno
== 0);
511 CU_ASSERT(g_file
->length
== 4096);
513 /* Read file to verify the overwritten data */
515 memset(r_buf
, 0x0, sizeof(r_buf
));
516 r_iov
[0].iov_base
= r_buf
;
517 r_iov
[0].iov_len
= 2048;
518 r_iov
[1].iov_base
= r_buf
+ 2048;
519 r_iov
[1].iov_len
= 2048;
520 spdk_file_readv_async(g_file
, fs
->sync_target
.sync_io_channel
,
521 r_iov
, 2, 0, 4096, fs_op_complete
, NULL
);
523 CU_ASSERT(g_fserrno
== 0);
524 CU_ASSERT(memcmp(r_buf
, w_buf
, sizeof(r_buf
)) == 0);
527 spdk_file_close_async(g_file
, fs_op_complete
, NULL
);
529 CU_ASSERT(g_fserrno
== 0);
532 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
534 CU_ASSERT(g_fserrno
== 0);
538 tree_find_buffer_ut(void)
540 struct cache_tree
*root
;
541 struct cache_tree
*level1_0
;
542 struct cache_tree
*level0_0_0
;
543 struct cache_tree
*level0_0_12
;
544 struct cache_buffer
*leaf_0_0_4
;
545 struct cache_buffer
*leaf_0_12_8
;
546 struct cache_buffer
*leaf_9_23_15
;
547 struct cache_buffer
*buffer
;
549 level1_0
= calloc(1, sizeof(struct cache_tree
));
550 SPDK_CU_ASSERT_FATAL(level1_0
!= NULL
);
551 level0_0_0
= calloc(1, sizeof(struct cache_tree
));
552 SPDK_CU_ASSERT_FATAL(level0_0_0
!= NULL
);
553 level0_0_12
= calloc(1, sizeof(struct cache_tree
));
554 SPDK_CU_ASSERT_FATAL(level0_0_12
!= NULL
);
555 leaf_0_0_4
= calloc(1, sizeof(struct cache_buffer
));
556 SPDK_CU_ASSERT_FATAL(leaf_0_0_4
!= NULL
);
557 leaf_0_12_8
= calloc(1, sizeof(struct cache_buffer
));
558 SPDK_CU_ASSERT_FATAL(leaf_0_12_8
!= NULL
);
559 leaf_9_23_15
= calloc(1, sizeof(struct cache_buffer
));
560 SPDK_CU_ASSERT_FATAL(leaf_9_23_15
!= NULL
);
563 level0_0_0
->level
= 0;
564 level0_0_12
->level
= 0;
566 leaf_0_0_4
->offset
= CACHE_BUFFER_SIZE
* 4;
567 level0_0_0
->u
.buffer
[4] = leaf_0_0_4
;
568 level0_0_0
->present_mask
|= (1ULL << 4);
570 leaf_0_12_8
->offset
= CACHE_TREE_LEVEL_SIZE(1) * 12 + CACHE_BUFFER_SIZE
* 8;
571 level0_0_12
->u
.buffer
[8] = leaf_0_12_8
;
572 level0_0_12
->present_mask
|= (1ULL << 8);
574 level1_0
->u
.tree
[0] = level0_0_0
;
575 level1_0
->present_mask
|= (1ULL << 0);
576 level1_0
->u
.tree
[12] = level0_0_12
;
577 level1_0
->present_mask
|= (1ULL << 12);
579 buffer
= tree_find_buffer(NULL
, 0);
580 CU_ASSERT(buffer
== NULL
);
582 buffer
= tree_find_buffer(level0_0_0
, 0);
583 CU_ASSERT(buffer
== NULL
);
585 buffer
= tree_find_buffer(level0_0_0
, CACHE_TREE_LEVEL_SIZE(0) + 1);
586 CU_ASSERT(buffer
== NULL
);
588 buffer
= tree_find_buffer(level0_0_0
, leaf_0_0_4
->offset
);
589 CU_ASSERT(buffer
== leaf_0_0_4
);
591 buffer
= tree_find_buffer(level1_0
, leaf_0_0_4
->offset
);
592 CU_ASSERT(buffer
== leaf_0_0_4
);
594 buffer
= tree_find_buffer(level1_0
, leaf_0_12_8
->offset
);
595 CU_ASSERT(buffer
== leaf_0_12_8
);
597 buffer
= tree_find_buffer(level1_0
, leaf_0_12_8
->offset
+ CACHE_BUFFER_SIZE
- 1);
598 CU_ASSERT(buffer
== leaf_0_12_8
);
600 buffer
= tree_find_buffer(level1_0
, leaf_0_12_8
->offset
- 1);
601 CU_ASSERT(buffer
== NULL
);
603 leaf_9_23_15
->offset
= CACHE_TREE_LEVEL_SIZE(2) * 9 +
604 CACHE_TREE_LEVEL_SIZE(1) * 23 +
605 CACHE_BUFFER_SIZE
* 15;
606 root
= tree_insert_buffer(level1_0
, leaf_9_23_15
);
607 CU_ASSERT(root
!= level1_0
);
608 buffer
= tree_find_buffer(root
, leaf_9_23_15
->offset
);
609 CU_ASSERT(buffer
== leaf_9_23_15
);
610 tree_free_buffers(root
);
617 struct spdk_filesystem
*fs
;
618 struct spdk_bs_dev
*dev
;
619 struct spdk_io_channel
*channel
;
623 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
625 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
626 CU_ASSERT(g_fserrno
== 0);
628 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
630 channel
= spdk_fs_alloc_io_channel(fs
);
631 CU_ASSERT(channel
!= NULL
);
633 spdk_fs_free_io_channel(channel
);
636 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
638 CU_ASSERT(g_fserrno
== 0);
643 channel_ops_sync(void)
645 struct spdk_filesystem
*fs
;
646 struct spdk_bs_dev
*dev
;
647 struct spdk_fs_thread_ctx
*channel
;
651 spdk_fs_init(dev
, NULL
, NULL
, fs_op_with_handle_complete
, NULL
);
653 SPDK_CU_ASSERT_FATAL(g_fs
!= NULL
);
654 CU_ASSERT(g_fserrno
== 0);
656 SPDK_CU_ASSERT_FATAL(fs
->bs
->dev
== dev
);
658 channel
= spdk_fs_alloc_thread_ctx(fs
);
659 CU_ASSERT(channel
!= NULL
);
661 spdk_fs_free_thread_ctx(channel
);
664 spdk_fs_unload(fs
, fs_op_complete
, NULL
);
666 CU_ASSERT(g_fserrno
== 0);
670 int main(int argc
, char **argv
)
672 CU_pSuite suite
= NULL
;
673 unsigned int num_failures
;
675 CU_set_error_action(CUEA_ABORT
);
676 CU_initialize_registry();
678 suite
= CU_add_suite("blobfs_async_ut", NULL
, NULL
);
680 CU_ADD_TEST(suite
, fs_init
);
681 CU_ADD_TEST(suite
, fs_open
);
682 CU_ADD_TEST(suite
, fs_create
);
683 CU_ADD_TEST(suite
, fs_truncate
);
684 CU_ADD_TEST(suite
, fs_rename
);
685 CU_ADD_TEST(suite
, fs_rw_async
);
686 CU_ADD_TEST(suite
, fs_writev_readv_async
);
687 CU_ADD_TEST(suite
, tree_find_buffer_ut
);
688 CU_ADD_TEST(suite
, channel_ops
);
689 CU_ADD_TEST(suite
, channel_ops_sync
);
694 g_dev_buffer
= calloc(1, DEV_BUFFER_SIZE
);
695 CU_basic_set_mode(CU_BRM_VERBOSE
);
696 CU_basic_run_tests();
697 num_failures
= CU_get_number_of_failures();
698 CU_cleanup_registry();