zfs_acl_tar_001_pos.ksh revision 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# CDDL HEADER START
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# The contents of this file are subject to the terms of the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Common Development and Distribution License (the "License").
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# You may not use this file except in compliance with the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# or http://www.opensolaris.org/os/licensing.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# See the License for the specific language governing permissions
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# and limitations under the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# When distributing Covered Code, include this CDDL HEADER in each
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# If applicable, add the following below this CDDL HEADER, with the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# fields enclosed by brackets "[]" replaced with your own identifying
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# information: Portions Copyright [yyyy] [name of copyright owner]
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# CDDL HEADER END
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Use is subject to license terms.
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy# Copyright (c) 2016 by Delphix. All rights reserved.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy. $STF_SUITE/tests/functional/acl/acl_common.kshlib
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Verifies that tar will include file attribute when @ flag is present.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# 1. Use mktree create a set of directories in directory A.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# 2. Enter into directory A and record all directory information.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# 3. tar all the files to directory B.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# 4. Then tar the tar file to directory C.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# 5. Record all the directories informat in derectory C.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# 6. Verify the two records should be identical.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedylog_assert "Verifies that tar will include file attribute when @ flag is " \
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy [[ ! -d $INI_DIR ]] && mkdir -m 777 -p $INI_DIR
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy log_must usr_exec mktree -b $INI_DIR -l 5 -d 2 -f 2
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy # Enter into initial directory and record all directory information,
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy # then tar all the files to $TMP_DIR/files.tar.
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy [[ ! -d $TMP_DIR ]] && usr_exec mkdir $TMP_DIR
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy # Enter into test directory and tar $TMP_DIR/files.tar to current
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy # directory. Record all directory information and compare with initial
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy # directory record.
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy [[ ! -d $TST_DIR ]] && mkdir -m 777 $TST_DIR