Print this page
7290 ZFS test suite needs to control what utilities it can run
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>

*** 22,32 **** # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ! # Copyright (c) 2013 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib . $STF_SUITE/tests/functional/xattr/xattr_common.kshlib --- 22,32 ---- # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ! # Copyright (c) 2013, 2016 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib . $STF_SUITE/tests/functional/xattr/xattr_common.kshlib
*** 42,67 **** # 4. Verify we can create new xattrs on new files created on the clone # function cleanup { ! log_must $ZFS destroy $TESTPOOL/$TESTFS/clone ! log_must $ZFS destroy $TESTPOOL/$TESTFS@snapshot1 ! log_must $RM $TESTDIR/myfile.$$ } log_assert "read/write/create/delete xattr on a clone filesystem" log_onexit cleanup # create a file, and an xattr on it ! log_must $TOUCH $TESTDIR/myfile.$$ create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd # snapshot & clone the filesystem ! log_must $ZFS snapshot $TESTPOOL/$TESTFS@snapshot1 ! log_must $ZFS clone $TESTPOOL/$TESTFS@snapshot1 $TESTPOOL/$TESTFS/clone ! log_must $ZFS set mountpoint=$TESTDIR/clone $TESTPOOL/$TESTFS/clone # check for the xattrs on the clone verify_xattr $TESTDIR/clone/myfile.$$ passwd /etc/passwd # check we can create xattrs on the clone --- 42,67 ---- # 4. Verify we can create new xattrs on new files created on the clone # function cleanup { ! log_must zfs destroy $TESTPOOL/$TESTFS/clone ! log_must zfs destroy $TESTPOOL/$TESTFS@snapshot1 ! log_must rm $TESTDIR/myfile.$$ } log_assert "read/write/create/delete xattr on a clone filesystem" log_onexit cleanup # create a file, and an xattr on it ! log_must touch $TESTDIR/myfile.$$ create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd # snapshot & clone the filesystem ! log_must zfs snapshot $TESTPOOL/$TESTFS@snapshot1 ! log_must zfs clone $TESTPOOL/$TESTFS@snapshot1 $TESTPOOL/$TESTFS/clone ! log_must zfs set mountpoint=$TESTDIR/clone $TESTPOOL/$TESTFS/clone # check for the xattrs on the clone verify_xattr $TESTDIR/clone/myfile.$$ passwd /etc/passwd # check we can create xattrs on the clone