Commit 52ab7bca authored by David Sterba's avatar David Sterba

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

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 37b2a7bc
...@@ -36,7 +36,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize) ...@@ -36,7 +36,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
root = btrfs_alloc_dummy_root(fs_info); root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(root)) { if (IS_ERR(root)) {
test_err("could not allocate root"); test_std_err(TEST_ALLOC_ROOT);
ret = PTR_ERR(root); ret = PTR_ERR(root);
goto out; goto out;
} }
......
...@@ -854,6 +854,7 @@ int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize) ...@@ -854,6 +854,7 @@ int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize)
root = btrfs_alloc_dummy_root(fs_info); root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(root)) { if (IS_ERR(root)) {
test_std_err(TEST_ALLOC_ROOT);
ret = PTR_ERR(root); ret = PTR_ERR(root);
goto out; goto out;
} }
......
...@@ -451,7 +451,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize, ...@@ -451,7 +451,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
root = btrfs_alloc_dummy_root(fs_info); root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(root)) { if (IS_ERR(root)) {
test_err("couldn't allocate dummy root"); test_std_err(TEST_ALLOC_ROOT);
ret = PTR_ERR(root); ret = PTR_ERR(root);
goto out; goto out;
} }
......
...@@ -244,7 +244,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize) ...@@ -244,7 +244,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
root = btrfs_alloc_dummy_root(fs_info); root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(root)) { if (IS_ERR(root)) {
test_err("couldn't allocate root"); test_std_err(TEST_ALLOC_ROOT);
goto out; goto out;
} }
...@@ -845,7 +845,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize) ...@@ -845,7 +845,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize)
root = btrfs_alloc_dummy_root(fs_info); root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(root)) { if (IS_ERR(root)) {
test_err("couldn't allocate root"); test_std_err(TEST_ALLOC_ROOT);
goto out; goto out;
} }
...@@ -941,7 +941,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize) ...@@ -941,7 +941,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
root = btrfs_alloc_dummy_root(fs_info); root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(root)) { if (IS_ERR(root)) {
test_err("couldn't allocate root"); test_std_err(TEST_ALLOC_ROOT);
goto out; goto out;
} }
......
...@@ -463,7 +463,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize) ...@@ -463,7 +463,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
root = btrfs_alloc_dummy_root(fs_info); root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(root)) { if (IS_ERR(root)) {
test_err("couldn't allocate root"); test_std_err(TEST_ALLOC_ROOT);
ret = PTR_ERR(root); ret = PTR_ERR(root);
goto out; goto out;
} }
...@@ -495,7 +495,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize) ...@@ -495,7 +495,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
tmp_root = btrfs_alloc_dummy_root(fs_info); tmp_root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(tmp_root)) { if (IS_ERR(tmp_root)) {
test_err("couldn't allocate a fs root"); test_std_err(TEST_ALLOC_ROOT);
ret = PTR_ERR(tmp_root); ret = PTR_ERR(tmp_root);
goto out; goto out;
} }
...@@ -510,7 +510,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize) ...@@ -510,7 +510,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
tmp_root = btrfs_alloc_dummy_root(fs_info); tmp_root = btrfs_alloc_dummy_root(fs_info);
if (IS_ERR(tmp_root)) { if (IS_ERR(tmp_root)) {
test_err("couldn't allocate a fs root"); test_std_err(TEST_ALLOC_ROOT);
ret = PTR_ERR(tmp_root); ret = PTR_ERR(tmp_root);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment