[Ocfs2-tools-devel] [PATCH 2/2] Ocfs2-tests: Enhance truncate and tunefs-test test to solve the compilation error.

Tristan Ye tristan.ye at oracle.com
Mon Oct 6 00:18:25 PDT 2008


Oringal test_truncate.c and remove_slot.c use old version of ocfs2_expand_dir() function,
which accept 3 args. Currently libocfs2 only need 2 agrs for this func.therefore,the corresponding
testcases should be adjusted.

Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
 programs/truncate/ocfs2-tools/test_truncate.c  |    3 +--
 programs/tunefs-test/remove-slot/remove_slot.c |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/programs/truncate/ocfs2-tools/test_truncate.c b/programs/truncate/ocfs2-tools/test_truncate.c
index 5593b5e..80b8df6 100644
--- a/programs/truncate/ocfs2-tools/test_truncate.c
+++ b/programs/truncate/ocfs2-tools/test_truncate.c
@@ -146,8 +146,7 @@ static errcode_t open_test_inode(ocfs2_filesys *fs, char *name, uint64_t *ino)
 	ret = ocfs2_link(fs, fs->fs_root_blkno, name,
 			 tmp_blkno, OCFS2_FT_REG_FILE);
 	if (ret == OCFS2_ET_DIR_NO_SPACE) {
-		ret = ocfs2_expand_dir(fs, fs->fs_root_blkno,
-				       fs->fs_root_blkno);
+		ret = ocfs2_expand_dir(fs, fs->fs_root_blkno);
 		if (ret)
 			return ret;
 
diff --git a/programs/tunefs-test/remove-slot/remove_slot.c b/programs/tunefs-test/remove-slot/remove_slot.c
index 34847be..12be0b1 100644
--- a/programs/tunefs-test/remove-slot/remove_slot.c
+++ b/programs/tunefs-test/remove-slot/remove_slot.c
@@ -277,7 +277,7 @@ static errcode_t create_orphan_file(ocfs2_filesys *fs, uint16_t slot)
 	ret = ocfs2_link(fs, dir, name,
 			 tmp_blkno, OCFS2_FT_REG_FILE);
 	if (ret == OCFS2_ET_DIR_NO_SPACE) {
-		ret = ocfs2_expand_dir(fs, dir, fs->fs_root_blkno);
+		ret = ocfs2_expand_dir(fs, dir);
 		if (ret)
 			return ret;
 
-- 
1.5.5




More information about the Ocfs2-tools-devel mailing list