zfs_list_003_pos.ksh revision 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# CDDL HEADER START
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# The contents of this file are subject to the terms of the
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# Common Development and Distribution License (the "License").
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# You may not use this file except in compliance with the License.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# or http://www.opensolaris.org/os/licensing.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# See the License for the specific language governing permissions
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# and limitations under the License.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# When distributing Covered Code, include this CDDL HEADER in each
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# If applicable, add the following below this CDDL HEADER, with the
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# fields enclosed by brackets "[]" replaced with your own identifying
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# information: Portions Copyright [yyyy] [name of copyright owner]
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# CDDL HEADER END
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# Use is subject to license terms.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# Verify 'zfs list -r' could recursively display any children
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# of the dataset.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# 1. Prepare a set of datasets by hierarchy.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# 2. Execute 'zfs list -r' at the top of these datasets.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai# 3. Verify all child datasets are all be shown.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai if [[ -f $tmpfile ]]; then
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavailog_assert "Verify 'zfs list -r' could display any children recursively."
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai children="$children $TESTPOOL/$TESTFS/$fs"
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavaifor path in $TESTPOOL/$TESTFS $TESTDIR ./../$TESTDIR ; do
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai log_fail "$fs not shown in the output list."
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavailog_pass "'zfs list -r' could display any children recursively."