Commit d44d3d72 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by David Sterba
Browse files

btrfs: selftests: check for correct return value of failed lookup



Commit 5e72aabc ("btrfs: return ENODATA in case RST lookup fails")
changed btrfs_get_raid_extent_offset()'s return value to ENODATA in case
the RAID stripe-tree lookup failed.

Adjust the test cases which check for absence of a given range to check
for ENODATA as return value in this case.

Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
Signed-off-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent dc14ba10
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ static int test_front_delete(struct btrfs_trans_handle *trans)
	}

	ret = btrfs_get_raid_extent_offset(fs_info, logical, &len, map_type, 0, &io_stripe);
	if (!ret) {
	if (ret != -ENODATA) {
		ret = -EINVAL;
		test_err("lookup of RAID extent [%llu, %llu] succeeded, should fail",
			 logical, logical + SZ_32K);