btrfs-progs: tests: fix quick-test compilation and rename it
There's an old test for btree code that could be used in the testsuite. Still needs some polishing and review what tests make sense. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
54439594a6
commit
836e7ca8ff
8
Makefile
8
Makefile
|
@ -742,9 +742,9 @@ btrfs-convert.static: $(static_convert_objects) $(static_objects) $(static_libbt
|
|||
@echo " [LD] $@"
|
||||
$(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(btrfs_convert_libs) $(STATIC_LIBS)
|
||||
|
||||
quick-test: quick-test.o $(objects) libbtrfsutil.a $(libs_shared)
|
||||
@echo " [LD] $@"
|
||||
$(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
||||
btree-test: tests/btree-test.c $(objects) libbtrfsutil.a $(libs_shared)
|
||||
@echo " [CC] $@"
|
||||
$(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
|
||||
|
||||
ioctl-test.o: tests/ioctl-test.c kernel-shared/uapi/btrfs.h include/kerncompat.h kernel-shared/ctree.h
|
||||
@echo " [CC] $@"
|
||||
|
@ -895,7 +895,7 @@ clean: $(CLEANDIRS)
|
|||
@echo "Cleaning test targets"
|
||||
$(Q)$(RM) -f -- \
|
||||
array-test fsstress fsstum hash-speedtest hash-vectest ioctl-test \
|
||||
json-formatter-test library-test library-test-static quick-test
|
||||
json-formatter-test library-test library-test-static btree-test
|
||||
@echo "Cleanin other generated files"
|
||||
$(Q)$(RM) -f -- $(check_defs) \
|
||||
*.gcno *.gcda *.gcov */*.gcno */*.gcda */*/.gcov
|
||||
|
|
|
@ -90,7 +90,7 @@ int main(int ac, char **av) {
|
|||
fprintf(stderr, "search %d:%d\n", num, i);
|
||||
ret = btrfs_search_slot(NULL, root, &ins, &path, 0, 0);
|
||||
if (ret) {
|
||||
btrfs_print_tree(root->node, 1, BTRFS_PRINT_TREE_BFS);
|
||||
btrfs_print_tree(root->node, BTRFS_PRINT_TREE_BFS);
|
||||
printf("unable to find %d\n", num);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ int main(int ac, char **av) {
|
|||
fprintf(stderr, "search %d:%d\n", num, i);
|
||||
ret = btrfs_search_slot(NULL, root, &ins, &path, 0, 0);
|
||||
if (ret) {
|
||||
btrfs_print_tree(root->node, 1, BTRFS_PRINT_TREE_BFS);
|
||||
btrfs_print_tree(root->node, BTRFS_PRINT_TREE_BFS);
|
||||
printf("unable to find %d\n", num);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ int main(int ac, char **av) {
|
|||
btrfs_commit_transaction(trans, root);
|
||||
printf("tree size is now %d\n", tree_size);
|
||||
printf("root %p commit root %p\n", root->node, root->commit_root);
|
||||
btrfs_print_tree(root->node, 1, BTRFS_PRINT_TREE_BFS);
|
||||
btrfs_print_tree(root->node, BTRFS_PRINT_TREE_BFS);
|
||||
close_ctree(root);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue