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
*** 40,63 **** # 3. Verify that we can take a snapshot of it. # function cleanup { ! log_must $ZFS destroy $TESTPOOL/$TESTFS@snap ! log_must $RM $TESTDIR/myfile.$$ } log_assert "read xattr on a snapshot" log_onexit cleanup # create a file, and an xattr on it ! log_must $TOUCH $TESTDIR/myfile.$$ create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd # snapshot the filesystem ! log_must $ZFS snapshot $TESTPOOL/$TESTFS@snap # check for the xattr on the snapshot verify_xattr $TESTDIR/.zfs/snapshot/snap/myfile.$$ passwd /etc/passwd log_pass "read xattr on a snapshot" --- 40,63 ---- # 3. Verify that we can take a snapshot of it. # function cleanup { ! log_must zfs destroy $TESTPOOL/$TESTFS@snap ! log_must rm $TESTDIR/myfile.$$ } log_assert "read xattr on a snapshot" log_onexit cleanup # create a file, and an xattr on it ! log_must touch $TESTDIR/myfile.$$ create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd # snapshot the filesystem ! log_must zfs snapshot $TESTPOOL/$TESTFS@snap # check for the xattr on the snapshot verify_xattr $TESTDIR/.zfs/snapshot/snap/myfile.$$ passwd /etc/passwd log_pass "read xattr on a snapshot"