btrfs: tests: use standard error message after root allocation failure

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2019-03-15 17:28:46 +01:00
parent 37b2a7bc1e
commit 52ab7bca35
5 changed files with 9 additions and 8 deletions

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

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

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

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

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