Commit 770e0cc0 authored by David Sterba's avatar David Sterba
Browse files

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



Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9e3d9f84
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -43,7 +43,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)


	path = btrfs_alloc_path();
	path = btrfs_alloc_path();
	if (!path) {
	if (!path) {
		test_err("could not allocate path");
		test_std_err(TEST_ALLOC_PATH);
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto out;
		goto out;
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -486,7 +486,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,


	path = btrfs_alloc_path();
	path = btrfs_alloc_path();
	if (!path) {
	if (!path) {
		test_err("couldn't allocate path");
		test_std_err(TEST_ALLOC_ROOT);
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto out;
		goto out;
	}
	}
+4 −4
Original line number Original line Diff line number Diff line
@@ -32,7 +32,7 @@ static int insert_normal_tree_ref(struct btrfs_root *root, u64 bytenr,


	path = btrfs_alloc_path();
	path = btrfs_alloc_path();
	if (!path) {
	if (!path) {
		test_err("couldn't allocate path");
		test_std_err(TEST_ALLOC_ROOT);
		return -ENOMEM;
		return -ENOMEM;
	}
	}


@@ -82,7 +82,7 @@ static int add_tree_ref(struct btrfs_root *root, u64 bytenr, u64 num_bytes,


	path = btrfs_alloc_path();
	path = btrfs_alloc_path();
	if (!path) {
	if (!path) {
		test_err("couldn't allocate path");
		test_std_err(TEST_ALLOC_ROOT);
		return -ENOMEM;
		return -ENOMEM;
	}
	}


@@ -132,7 +132,7 @@ static int remove_extent_item(struct btrfs_root *root, u64 bytenr,


	path = btrfs_alloc_path();
	path = btrfs_alloc_path();
	if (!path) {
	if (!path) {
		test_err("couldn't allocate path");
		test_std_err(TEST_ALLOC_ROOT);
		return -ENOMEM;
		return -ENOMEM;
	}
	}
	path->leave_spinning = 1;
	path->leave_spinning = 1;
@@ -166,7 +166,7 @@ static int remove_extent_ref(struct btrfs_root *root, u64 bytenr,


	path = btrfs_alloc_path();
	path = btrfs_alloc_path();
	if (!path) {
	if (!path) {
		test_err("couldn't allocate path");
		test_std_err(TEST_ALLOC_ROOT);
		return -ENOMEM;
		return -ENOMEM;
	}
	}