zfs_send_001_pos.ksh revision d583b39bfb4e2571d3e41097c5c357ffe353ad45
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# Copyright (c) 2012 by Delphix. All rights reserved.
#
#
# DESCRIPTION:
# Verify 'zfs send' can create valid send streams as expected.
#
# STRATEGY:
# 1. Fill in fs with some data
# 2. Create a full send streams with the fs
# 3. Receive the send stream and verify the data integrity
# 4. Fill in fs with some new data
# 5. Create an incremental send stream with the fs
# 6. Receive the incremental send stream and verify the data integrity.
#
verify_runnable "both"
function cleanup
{
for snap in $init_snap $inc_snap $rst_snap $rst_inc_snap; do
snapexists $snap && \
done
datasetexists $rst_root && \
for file in $full_bkup $inc_bkup \
do
[[ -e $file ]] && \
done
[[ -d $TESTDIR1 ]] && \
}
log_assert "Verify 'zfs send' can create valid send streams as expected."
orig_sum=""
rst_sum=""
log_note "Verify 'zfs send' can create full send stream."
#Pre-paration
[[ ! -d $TESTDIR1 ]] && \
(( $? != 0 )) && \
log_note "Verify the send stream is valid to receive."
log_note "Verify 'zfs send -i' can create incremental send stream."
(( $? != 0 )) && \
log_note "Verify the incremental send stream is valid to receive."
log_pass "Verifying 'zfs receive' succeed."