All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 07/22] btrfs: tests: use standard error message after extent buffer allocation failure
Date: Mon, 18 Mar 2019 17:50:21 +0100	[thread overview]
Message-ID: <8b5fc82286b81442cebfa18afa0bfb85fe7de44d.1552927639.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1552927639.git.dsterba@suse.com>

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(-)

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;
 	}
 
-- 
2.21.0


  parent reply	other threads:[~2019-03-18 16:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 16:50 [PATCH 00/22] Self test cleanups, error handling fixes David Sterba
2019-03-18 16:50 ` [PATCH 01/22] btrfs: tests: handle fs_info allocation failure in extent_io tests David Sterba
2019-03-18 16:50 ` [PATCH 02/22] btrfs: tests: don't leak fs_info in extent_io bitmap tests David Sterba
2019-03-18 16:50 ` [PATCH 03/22] btrfs: tests: print file:line for error messages David Sterba
2019-03-18 16:50 ` [PATCH 04/22] btrfs: tests: add table of most common errors David Sterba
2019-03-18 16:50 ` [PATCH 05/22] btrfs: tests: use standard error message after fs_info allocation failure David Sterba
2019-03-18 16:50 ` [PATCH 06/22] btrfs: tests: use standard error message after root " David Sterba
2019-03-18 16:50 ` David Sterba [this message]
2019-03-18 16:50 ` [PATCH 08/22] btrfs: tests: use standard error message after path " David Sterba
2019-03-18 16:50 ` [PATCH 09/22] btrfs: tests: use standard error message after inode " David Sterba
2019-03-18 16:50 ` [PATCH 10/22] btrfs: tests: use standard error message after block group " David Sterba
2019-03-18 16:50 ` [PATCH 11/22] btrfs: tests: properly initialize fs_info of extent buffer David Sterba
2019-03-18 16:50 ` [PATCH 12/22] btrfs: tests: return errors from extent map tests David Sterba
2019-03-18 16:50 ` [PATCH 13/22] btrfs: tests: return errors from extent map test case 1 David Sterba
2019-03-18 16:50 ` [PATCH 14/22] btrfs: tests: return errors from extent map test case 2 David Sterba
2019-03-18 16:50 ` [PATCH 15/22] btrfs: tests: return errors from extent map test case 3 David Sterba
2019-03-18 16:50 ` [PATCH 16/22] btrfs: tests: return errors from extent map test case 4 David Sterba
2019-03-18 16:50 ` [PATCH 17/22] btrfs: tests: return error from all extent map test cases David Sterba
2019-03-18 16:50 ` [PATCH 18/22] btrfs: tests: use standard error message after extent map allocation failure David Sterba
2019-03-18 16:50 ` [PATCH 19/22] btrfs: tests: use SZ_ constants everywhere David Sterba
2019-03-18 16:50 ` [PATCH 20/22] btrfs: tests: fix comments about tested extent map ranges David Sterba
2019-03-18 16:50 ` [PATCH 21/22] btrfs: tests: drop messages when some tests finish David Sterba
2019-03-18 16:50 ` [PATCH 22/22] btrfs: tests: unify messages when tests start David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b5fc82286b81442cebfa18afa0bfb85fe7de44d.1552927639.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.