From ff9c19c3d8d2774746827b65242e3fe78943e613 Mon Sep 17 00:00:00 2001 From: gkostka Date: Sat, 25 Oct 2014 01:05:45 +0000 Subject: [PATCH] Add more test cases --- fs_test.mk | 47 ++++++++++++++++++++++++++++++++++++++++++++++- lwext4/ext4.c | 2 +- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/fs_test.mk b/fs_test.mk index b0ed23d..1224a33 100644 --- a/fs_test.mk +++ b/fs_test.mk @@ -581,6 +581,51 @@ t26: $(LWEXT4_CLIENT) -c "dir_rm $(TEST_DIR)" $(LWEXT4_CLIENT) -c "stats_check /" $(LWEXT4_CLIENT) -c "umount /" + +t27: + @echo "T27: 10000 entries (dir) dir recursive remove:" + $(LWEXT4_CLIENT) -c "device_register 0 0 bdev" + $(LWEXT4_CLIENT) -c "mount bdev /" + $(LWEXT4_CLIENT) -c "stats_save /" + $(LWEXT4_CLIENT) -c "dir_mk $(TEST_DIR)" + + $(LWEXT4_CLIENT) -c "multi_dcreate $(TEST_DIR) /d 10000" + $(LWEXT4_CLIENT) -c "dir_open 0 $(TEST_DIR)" + $(LWEXT4_CLIENT) -c "dir_close 0" + + $(LWEXT4_CLIENT) -c "dir_rm $(TEST_DIR)" + $(LWEXT4_CLIENT) -c "stats_check /" + $(LWEXT4_CLIENT) -c "umount /" + +t28: + @echo "T28: 50000 entries (dir) dir recursive remove:" + $(LWEXT4_CLIENT) -c "device_register 0 0 bdev" + $(LWEXT4_CLIENT) -c "mount bdev /" + $(LWEXT4_CLIENT) -c "stats_save /" + $(LWEXT4_CLIENT) -c "dir_mk $(TEST_DIR)" + + $(LWEXT4_CLIENT) -c "multi_dcreate $(TEST_DIR) /d 50000" + $(LWEXT4_CLIENT) -c "dir_open 0 $(TEST_DIR)" + $(LWEXT4_CLIENT) -c "dir_close 0" + + $(LWEXT4_CLIENT) -c "dir_rm $(TEST_DIR)" + $(LWEXT4_CLIENT) -c "stats_check /" + $(LWEXT4_CLIENT) -c "umount /" + +t29: + @echo "T29: 250000 entries (dir) dir recursive remove:" + $(LWEXT4_CLIENT) -c "device_register 0 0 bdev" + $(LWEXT4_CLIENT) -c "mount bdev /" + $(LWEXT4_CLIENT) -c "stats_save /" + $(LWEXT4_CLIENT) -c "dir_mk $(TEST_DIR)" + + $(LWEXT4_CLIENT) -c "multi_dcreate $(TEST_DIR) /d 250000" + $(LWEXT4_CLIENT) -c "dir_open 0 $(TEST_DIR)" + $(LWEXT4_CLIENT) -c "dir_close 0" + + $(LWEXT4_CLIENT) -c "dir_rm $(TEST_DIR)" + $(LWEXT4_CLIENT) -c "stats_check /" + $(LWEXT4_CLIENT) -c "umount /" ct: @echo "Clean test directory" @@ -605,4 +650,4 @@ fsck_images: test: t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 -test_more: t21 t22 t23 t24 t25 t26 \ No newline at end of file +test_more: t21 t22 t23 t24 t25 t26 t27 t28 t29 \ No newline at end of file diff --git a/lwext4/ext4.c b/lwext4/ext4.c index 8c5a6b3..bc036e5 100644 --- a/lwext4/ext4.c +++ b/lwext4/ext4.c @@ -258,7 +258,7 @@ static int ext4_unlink(struct ext4_mountpoint *mp, /* If directory - handle links from parent */ if (is_dir) { - ext4_assert(ext4_inode_get_links_count(child_inode_ref->inode) == 1); + //ext4_assert(ext4_inode_get_links_count(child_inode_ref->inode) == 1); ext4_fs_inode_links_count_dec(parent); parent->dirty = true; }