]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
btrfs: tests: use standard error message after fs_info 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/extent-map-tests.c
fs/btrfs/tests/free-space-tests.c
fs/btrfs/tests/free-space-tree-tests.c
fs/btrfs/tests/inode-tests.c
fs/btrfs/tests/qgroup-tests.c

index 7d72eab6d32c2687967d3b0d992749b80c9e65d7..74c7975882d17c30f1bd1cae40b7c5c12fe062d4 100644 (file)
@@ -30,7 +30,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
 
        fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
        if (!fs_info) {
-               test_err("could not allocate fs_info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                return -ENOMEM;
        }
 
index 24003e97e7977bb6c73618fa8c82cb0f2fce3c80..5e92ee074bd0ab804404ae29d37e143c9d851a7a 100644 (file)
@@ -393,7 +393,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
 
        fs_info = btrfs_alloc_dummy_fs_info(len, len);
        if (!fs_info) {
-               test_err("could not allocate fs_info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                return -ENOMEM;
        }
 
index bf15d3a7f20ee54a9a953411b662c4d09a4ea6d5..662b718506b975fb3abe489921e0bc754a3bdcf6 100644 (file)
@@ -349,7 +349,7 @@ int btrfs_test_extent_map(void)
         */
        fs_info = btrfs_alloc_dummy_fs_info(PAGE_SIZE, PAGE_SIZE);
        if (!fs_info) {
-               test_msg("Couldn't allocate dummy fs info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                return -ENOMEM;
        }
 
index 5c2f77e9439bee97c384c6c7ab0981656c327dea..2051e1a191042fece07ffd48e2db352a7c217da1 100644 (file)
@@ -834,9 +834,10 @@ int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize)
 
        test_msg("running btrfs free space cache tests");
        fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
-       if (!fs_info)
+       if (!fs_info) {
+               test_std_err(TEST_ALLOC_FS_INFO);
                return -ENOMEM;
-
+       }
 
        /*
         * For ppc64 (with 64k page size), bytes per bitmap might be
index 89346da890cf7188db3720d9b1c42cb76adfcdbe..49fbf73c7f2b8e75ed62796d907514ae92d9caba 100644 (file)
@@ -444,7 +444,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
 
        fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
        if (!fs_info) {
-               test_err("couldn't allocate dummy fs info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                ret = -ENOMEM;
                goto out;
        }
index af0c8e30d9e219a13d36e5e8263baee8617f2f47..510365370d81200be688502f8f44b53978d30076 100644 (file)
@@ -238,7 +238,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
 
        fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
        if (!fs_info) {
-               test_err("couldn't allocate dummy fs info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                goto out;
        }
 
@@ -839,7 +839,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize)
 
        fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
        if (!fs_info) {
-               test_err("couldn't allocate dummy fs info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                goto out;
        }
 
@@ -935,7 +935,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
 
        fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
        if (!fs_info) {
-               test_err("couldn't allocate dummy fs info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                goto out;
        }
 
index 412b910b04cc0712fa64cf6d1ea00b30d7e9a2e6..c620f68462be8934ff241a628fc4c322f4027d16 100644 (file)
@@ -457,7 +457,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
 
        fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize);
        if (!fs_info) {
-               test_err("couldn't allocate dummy fs info");
+               test_std_err(TEST_ALLOC_FS_INFO);
                return -ENOMEM;
        }