[07/22] btrfs: tests: use standard error message after extent buffer allocation failure
diff mbox series

Message ID 8b5fc82286b81442cebfa18afa0bfb85fe7de44d.1552927639.git.dsterba@suse.com
State New
Headers show
Series
  • Self test cleanups, error handling fixes
Related show

Commit Message

David Sterba March 18, 2019, 4:50 p.m. UTC
Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/tests/extent-buffer-tests.c   | 2 +-
 fs/btrfs/tests/extent-io-tests.c       | 4 ++--
 fs/btrfs/tests/free-space-tree-tests.c | 2 +-
 fs/btrfs/tests/inode-tests.c           | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/fs/btrfs/tests/extent-buffer-tests.c b/fs/btrfs/tests/extent-buffer-tests.c
index 83814b769bde..dc2582554cf0 100644
--- a/fs/btrfs/tests/extent-buffer-tests.c
+++ b/fs/btrfs/tests/extent-buffer-tests.c
@@ -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);
 	if (!eb) {
-		test_err("could not allocate dummy buffer");
+		test_std_err(TEST_ALLOC_EXTENT_BUFFER);
 		ret = -ENOMEM;
 		goto out;
 	}
diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
index 52f30c8738e5..cc9e6c88bcc1 100644
--- a/fs/btrfs/tests/extent-io-tests.c
+++ b/fs/btrfs/tests/extent-io-tests.c
@@ -402,7 +402,7 @@  static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
 
 	eb = __alloc_dummy_extent_buffer(fs_info, 0, len);
 	if (!eb) {
-		test_err("couldn't allocate test extent buffer");
+		test_std_err(TEST_ALLOC_ROOT);
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -415,7 +415,7 @@  static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
 	free_extent_buffer(eb);
 	eb = __alloc_dummy_extent_buffer(NULL, nodesize / 2, len);
 	if (!eb) {
-		test_err("couldn't allocate test extent buffer");
+		test_std_err(TEST_ALLOC_ROOT);
 		ret = -ENOMEM;
 		goto out;
 	}
diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c
index 79b5d0c97b7b..58fbca92dd0d 100644
--- a/fs/btrfs/tests/free-space-tree-tests.c
+++ b/fs/btrfs/tests/free-space-tree-tests.c
@@ -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);
 	if (!root->node) {
-		test_err("couldn't allocate dummy buffer");
+		test_std_err(TEST_ALLOC_EXTENT_BUFFER);
 		ret = -ENOMEM;
 		goto out;
 	}
diff --git a/fs/btrfs/tests/inode-tests.c b/fs/btrfs/tests/inode-tests.c
index 5803f342c47b..e63c128c741c 100644
--- a/fs/btrfs/tests/inode-tests.c
+++ b/fs/btrfs/tests/inode-tests.c
@@ -250,7 +250,7 @@  static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
 
 	root->node = alloc_dummy_extent_buffer(fs_info, nodesize);
 	if (!root->node) {
-		test_err("couldn't allocate dummy buffer");
+		test_std_err(TEST_ALLOC_ROOT);
 		goto out;
 	}
 
@@ -851,7 +851,7 @@  static int test_hole_first(u32 sectorsize, u32 nodesize)
 
 	root->node = alloc_dummy_extent_buffer(fs_info, nodesize);
 	if (!root->node) {
-		test_err("couldn't allocate dummy buffer");
+		test_std_err(TEST_ALLOC_ROOT);
 		goto out;
 	}