Commit 9e3d9f84 authored by David Sterba's avatar David Sterba

btrfs: tests: use standard error message after extent buffer allocation failure

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 52ab7bca
...@@ -50,7 +50,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize) ...@@ -50,7 +50,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
path->nodes[0] = eb = alloc_dummy_extent_buffer(fs_info, nodesize); path->nodes[0] = eb = alloc_dummy_extent_buffer(fs_info, nodesize);
if (!eb) { if (!eb) {
test_err("could not allocate dummy buffer"); test_std_err(TEST_ALLOC_EXTENT_BUFFER);
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
......
...@@ -406,7 +406,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize) ...@@ -406,7 +406,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
eb = __alloc_dummy_extent_buffer(fs_info, 0, len); eb = __alloc_dummy_extent_buffer(fs_info, 0, len);
if (!eb) { if (!eb) {
test_err("couldn't allocate test extent buffer"); test_std_err(TEST_ALLOC_ROOT);
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
...@@ -419,7 +419,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize) ...@@ -419,7 +419,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
free_extent_buffer(eb); free_extent_buffer(eb);
eb = __alloc_dummy_extent_buffer(NULL, nodesize / 2, len); eb = __alloc_dummy_extent_buffer(NULL, nodesize / 2, len);
if (!eb) { if (!eb) {
test_err("couldn't allocate test extent buffer"); test_std_err(TEST_ALLOC_ROOT);
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
......
...@@ -463,7 +463,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize, ...@@ -463,7 +463,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
root->node = alloc_test_extent_buffer(root->fs_info, nodesize); root->node = alloc_test_extent_buffer(root->fs_info, nodesize);
if (!root->node) { if (!root->node) {
test_err("couldn't allocate dummy buffer"); test_std_err(TEST_ALLOC_EXTENT_BUFFER);
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
......
...@@ -250,7 +250,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize) ...@@ -250,7 +250,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
root->node = alloc_dummy_extent_buffer(fs_info, nodesize); root->node = alloc_dummy_extent_buffer(fs_info, nodesize);
if (!root->node) { if (!root->node) {
test_err("couldn't allocate dummy buffer"); test_std_err(TEST_ALLOC_ROOT);
goto out; goto out;
} }
...@@ -851,7 +851,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize) ...@@ -851,7 +851,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize)
root->node = alloc_dummy_extent_buffer(fs_info, nodesize); root->node = alloc_dummy_extent_buffer(fs_info, nodesize);
if (!root->node) { if (!root->node) {
test_err("couldn't allocate dummy buffer"); test_std_err(TEST_ALLOC_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