btrfs: tests: use standard error message after extent buffer allocation failure
authorDavid Sterba <dsterba@suse.com>
Fri, 15 Mar 2019 16:28:46 +0000 (17:28 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:25 +0000 (19:02 +0200)
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tests/extent-buffer-tests.c
fs/btrfs/tests/extent-io-tests.c
fs/btrfs/tests/free-space-tree-tests.c
fs/btrfs/tests/inode-tests.c

index 83814b769bdeb069f605aa694134104a53569ad0..dc2582554cf05c62bb36faa1ec769bb834f0ac6d 100644 (file)
@@ -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) {
 
        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;
        }
                ret = -ENOMEM;
                goto out;
        }
index 5e92ee074bd0ab804404ae29d37e143c9d851a7a..904addec8aef96c2b7be874d781a67fdcc45696d 100644 (file)
@@ -406,7 +406,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
 
        eb = __alloc_dummy_extent_buffer(fs_info, 0, len);
        if (!eb) {
 
        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;
        }
                ret = -ENOMEM;
                goto out;
        }
@@ -419,7 +419,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) {
        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;
        }
                ret = -ENOMEM;
                goto out;
        }
index 79b5d0c97b7b2d867c1e21b659a1787941209345..58fbca92dd0de8f87cedbfa9fce4fefc6b0afeae 100644 (file)
@@ -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) {
 
        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;
        }
                ret = -ENOMEM;
                goto out;
        }
index 5803f342c47b30e6e6e15a1a64867c977449e5ea..e63c128c741c3d53e6e1ebea45518be882c7828d 100644 (file)
@@ -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) {
 
        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;
        }
 
                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) {
 
        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;
        }
 
                goto out;
        }