zfs_receive_013_pos.ksh revision 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f
#
# CDDL HEADER START
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
#
# CDDL HEADER END
#
#
# Copyright (c) 2015, 2016 by Delphix. All rights reserved.
#
#
# DESCRIPTION:
# Verifying 'zfs receive' works correctly on deduplicated streams
#
# STRATEGY:
# 1. Create some snapshots with duplicated data
# 2. Send a deduplicated stream of the last snapshot
# 3. Attempt to receive the deduplicated stream
#
function cleanup
{
done
[[ -f $streamfile ]] && log_must rm -f $streamfile
[[ -f $tpoolfile ]] && log_must rm -f $tpoolfile
}
log_assert "Verifying 'zfs receive' works correctly on deduplicated streams"
log_must eval "zfs send -D -R $src_fs@snap3 > $streamfile"
log_must eval "zfs receive -v $dst_fs < $streamfile"
log_pass "Verifying 'zfs receive' works correctly on deduplicated streams"