]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
btrfs: tests: use standard error message after root 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/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 74c7975882d17c30f1bd1cae40b7c5c12fe062d4..83814b769bdeb069f605aa694134104a53569ad0 100644 (file)
@@ -36,7 +36,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
 
        root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(root)) {
-               test_err("could not allocate root");
+               test_std_err(TEST_ALLOC_ROOT);
                ret = PTR_ERR(root);
                goto out;
        }
index 2051e1a191042fece07ffd48e2db352a7c217da1..8dcdefab1280ea8859581cc92711c8b5c253fc6d 100644 (file)
@@ -854,6 +854,7 @@ int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize)
 
        root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(root)) {
+               test_std_err(TEST_ALLOC_ROOT);
                ret = PTR_ERR(root);
                goto out;
        }
index 49fbf73c7f2b8e75ed62796d907514ae92d9caba..79b5d0c97b7b2d867c1e21b659a1787941209345 100644 (file)
@@ -451,7 +451,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
 
        root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(root)) {
-               test_err("couldn't allocate dummy root");
+               test_std_err(TEST_ALLOC_ROOT);
                ret = PTR_ERR(root);
                goto out;
        }
index 510365370d81200be688502f8f44b53978d30076..5803f342c47b30e6e6e15a1a64867c977449e5ea 100644 (file)
@@ -244,7 +244,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
 
        root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(root)) {
-               test_err("couldn't allocate root");
+               test_std_err(TEST_ALLOC_ROOT);
                goto out;
        }
 
@@ -845,7 +845,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize)
 
        root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(root)) {
-               test_err("couldn't allocate root");
+               test_std_err(TEST_ALLOC_ROOT);
                goto out;
        }
 
@@ -941,7 +941,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
 
        root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(root)) {
-               test_err("couldn't allocate root");
+               test_std_err(TEST_ALLOC_ROOT);
                goto out;
        }
 
index c620f68462be8934ff241a628fc4c322f4027d16..7e25a3a9f9799377109b52a9dfe0b900e29d9072 100644 (file)
@@ -463,7 +463,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
 
        root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(root)) {
-               test_err("couldn't allocate root");
+               test_std_err(TEST_ALLOC_ROOT);
                ret = PTR_ERR(root);
                goto out;
        }
@@ -495,7 +495,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
 
        tmp_root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(tmp_root)) {
-               test_err("couldn't allocate a fs root");
+               test_std_err(TEST_ALLOC_ROOT);
                ret = PTR_ERR(tmp_root);
                goto out;
        }
@@ -510,7 +510,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
 
        tmp_root = btrfs_alloc_dummy_root(fs_info);
        if (IS_ERR(tmp_root)) {
-               test_err("couldn't allocate a fs root");
+               test_std_err(TEST_ALLOC_ROOT);
                ret = PTR_ERR(tmp_root);
                goto out;
        }