1*d583b39bSJohn Wren Kennedy#!/bin/ksh -p 2*d583b39bSJohn Wren Kennedy# 3*d583b39bSJohn Wren Kennedy# CDDL HEADER START 4*d583b39bSJohn Wren Kennedy# 5*d583b39bSJohn Wren Kennedy# The contents of this file are subject to the terms of the 6*d583b39bSJohn Wren Kennedy# Common Development and Distribution License (the "License"). 7*d583b39bSJohn Wren Kennedy# You may not use this file except in compliance with the License. 8*d583b39bSJohn Wren Kennedy# 9*d583b39bSJohn Wren Kennedy# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*d583b39bSJohn Wren Kennedy# or http://www.opensolaris.org/os/licensing. 11*d583b39bSJohn Wren Kennedy# See the License for the specific language governing permissions 12*d583b39bSJohn Wren Kennedy# and limitations under the License. 13*d583b39bSJohn Wren Kennedy# 14*d583b39bSJohn Wren Kennedy# When distributing Covered Code, include this CDDL HEADER in each 15*d583b39bSJohn Wren Kennedy# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*d583b39bSJohn Wren Kennedy# If applicable, add the following below this CDDL HEADER, with the 17*d583b39bSJohn Wren Kennedy# fields enclosed by brackets "[]" replaced with your own identifying 18*d583b39bSJohn Wren Kennedy# information: Portions Copyright [yyyy] [name of copyright owner] 19*d583b39bSJohn Wren Kennedy# 20*d583b39bSJohn Wren Kennedy# CDDL HEADER END 21*d583b39bSJohn Wren Kennedy# 22*d583b39bSJohn Wren Kennedy 23*d583b39bSJohn Wren Kennedy# 24*d583b39bSJohn Wren Kennedy# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 25*d583b39bSJohn Wren Kennedy# Use is subject to license terms. 26*d583b39bSJohn Wren Kennedy# 27*d583b39bSJohn Wren Kennedy 28*d583b39bSJohn Wren Kennedy. $STF_SUITE/tests/functional/acl/acl_common.kshlib 29*d583b39bSJohn Wren Kennedy 30*d583b39bSJohn Wren Kennedy# 31*d583b39bSJohn Wren Kennedy# DESCRIPTION: 32*d583b39bSJohn Wren Kennedy# Verifies that mv will include file attribute. 33*d583b39bSJohn Wren Kennedy# 34*d583b39bSJohn Wren Kennedy# STRATEGY: 35*d583b39bSJohn Wren Kennedy# 1. In directory A, create several files and add attribute files for them 36*d583b39bSJohn Wren Kennedy# 2. Save all files and their attribute files cksum value 37*d583b39bSJohn Wren Kennedy# 3. Move them to another directory B. 38*d583b39bSJohn Wren Kennedy# 4. Calculate all the files and attribute files cksum 39*d583b39bSJohn Wren Kennedy# 5. Verify all the cksum are identical 40*d583b39bSJohn Wren Kennedy# 41*d583b39bSJohn Wren Kennedy 42*d583b39bSJohn Wren Kennedyverify_runnable "both" 43*d583b39bSJohn Wren Kennedy 44*d583b39bSJohn Wren Kennedylog_assert "Verifies that mv will include file attribute." 45*d583b39bSJohn Wren Kennedylog_onexit cleanup 46*d583b39bSJohn Wren Kennedy 47*d583b39bSJohn Wren Kennedyset -A BEFORE_FCKSUM 48*d583b39bSJohn Wren Kennedyset -A BEFORE_ACKSUM 49*d583b39bSJohn Wren Kennedyset -A AFTER_FCKSUM 50*d583b39bSJohn Wren Kennedyset -A AFTER_ACKSUM 51*d583b39bSJohn Wren Kennedy 52*d583b39bSJohn Wren Kennedyfor user in root $ZFS_ACL_STAFF1; do 53*d583b39bSJohn Wren Kennedy log_must set_cur_usr $user 54*d583b39bSJohn Wren Kennedy 55*d583b39bSJohn Wren Kennedy log_must create_files $TESTDIR 56*d583b39bSJohn Wren Kennedy 57*d583b39bSJohn Wren Kennedy log_must cksum_files $INI_DIR BEFORE_FCKSUM BEFORE_ACKSUM 58*d583b39bSJohn Wren Kennedy log_must usr_exec $MV $INI_DIR/* $TST_DIR 59*d583b39bSJohn Wren Kennedy log_must cksum_files $TST_DIR AFTER_FCKSUM AFTER_ACKSUM 60*d583b39bSJohn Wren Kennedy 61*d583b39bSJohn Wren Kennedy log_must compare_cksum BEFORE_FCKSUM AFTER_FCKSUM 62*d583b39bSJohn Wren Kennedy log_must compare_cksum BEFORE_ACKSUM AFTER_ACKSUM 63*d583b39bSJohn Wren Kennedy 64*d583b39bSJohn Wren Kennedy log_must cleanup 65*d583b39bSJohn Wren Kennedydone 66*d583b39bSJohn Wren Kennedy 67*d583b39bSJohn Wren Kennedylog_pass "mv file include attribute passed." 68