提交 37b2a7bc 编写于 作者: D David Sterba

btrfs: tests: use standard error message after fs_info allocation failure

Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 703de426
......@@ -30,7 +30,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
if (!fs_info) {
test_err("could not allocate fs_info");
test_std_err(TEST_ALLOC_FS_INFO);
return -ENOMEM;
}
......
......@@ -393,7 +393,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
fs_info = btrfs_alloc_dummy_fs_info(len, len);
if (!fs_info) {
test_err("could not allocate fs_info");
test_std_err(TEST_ALLOC_FS_INFO);
return -ENOMEM;
}
......
......@@ -349,7 +349,7 @@ int btrfs_test_extent_map(void)
*/
fs_info = btrfs_alloc_dummy_fs_info(PAGE_SIZE, PAGE_SIZE);
if (!fs_info) {
test_msg("Couldn't allocate dummy fs info");
test_std_err(TEST_ALLOC_FS_INFO);
return -ENOMEM;
}
......
......@@ -834,9 +834,10 @@ int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize)
test_msg("running btrfs free space cache tests");
fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
if (!fs_info)
if (!fs_info) {
test_std_err(TEST_ALLOC_FS_INFO);
return -ENOMEM;
}
/*
* For ppc64 (with 64k page size), bytes per bitmap might be
......
......@@ -444,7 +444,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
if (!fs_info) {
test_err("couldn't allocate dummy fs info");
test_std_err(TEST_ALLOC_FS_INFO);
ret = -ENOMEM;
goto out;
}
......
......@@ -238,7 +238,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
if (!fs_info) {
test_err("couldn't allocate dummy fs info");
test_std_err(TEST_ALLOC_FS_INFO);
goto out;
}
......@@ -839,7 +839,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize)
fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
if (!fs_info) {
test_err("couldn't allocate dummy fs info");
test_std_err(TEST_ALLOC_FS_INFO);
goto out;
}
......@@ -935,7 +935,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
if (!fs_info) {
test_err("couldn't allocate dummy fs info");
test_std_err(TEST_ALLOC_FS_INFO);
goto out;
}
......
......@@ -457,7 +457,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
if (!fs_info) {
test_err("couldn't allocate dummy fs info");
test_std_err(TEST_ALLOC_FS_INFO);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册