svn commit: r329652 - in projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root: zfs_get zfs_mount
Alan Somers
asomers at FreeBSD.org
Tue Feb 20 18:42:10 UTC 2018
Author: asomers
Date: Tue Feb 20 18:42:08 2018
New Revision: 329652
URL: https://svnweb.freebsd.org/changeset/base/329652
Log:
Update ZFS tests now that PR 221985 is fixed
tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_003_pos.ksh
tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_007_pos.ksh
Convert Illumos syntax => FreeBSD syntax
tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh
Clear expected failure for zfs_get_003_pos
tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_007_pos.ksh
Remove the "devices" property. Unlike on Illumos, on FreeBSD it
can't be changed temporarily (or at all).
tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh
Remove the expected failure for zfs_mount_007_pos due to 221985, but
add a new expected failure due to PR 115361.
PR: 221985
PR: 115361
Sponsored by: Spectra Logic Corp
Modified:
projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_003_pos.ksh
projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh
projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_007_pos.ksh
projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh
Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_003_pos.ksh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_003_pos.ksh Tue Feb 20 18:33:45 2018 (r329651)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_003_pos.ksh Tue Feb 20 18:42:08 2018 (r329652)
@@ -40,7 +40,7 @@
#
# STRATEGY:
# 1. Create pool and filesystem.
-# 2. 'zfs mount -o remount,noatime <fs>.'
+# 2. 'zfs mount -o update,noatime <fs>.'
# 3. Verify the value of 'zfs get atime' and 'zfs get all | grep atime'
# are identical.
#
@@ -58,14 +58,14 @@ verify_runnable "both"
function cleanup
{
- log_must $ZFS mount -o remount,atime $TESTPOOL/$TESTFS
+ log_must $ZFS mount -o update,atime $TESTPOOL/$TESTFS
}
log_assert "'zfs get' should get consistent report with different option."
log_onexit cleanup
log_must $ZFS set atime=on $TESTPOOL/$TESTFS
-log_must $ZFS mount -o remount,noatime $TESTPOOL/$TESTFS
+log_must $ZFS mount -o update,noatime $TESTPOOL/$TESTFS
value1=$($ZFS get -H atime $TESTPOOL/$TESTFS | $AWK '{print $3}')
value2=$($ZFS get -H all $TESTPOOL/$TESTFS | $AWK '{print $2 " " $3}' | \
Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh Tue Feb 20 18:33:45 2018 (r329651)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh Tue Feb 20 18:42:08 2018 (r329652)
@@ -88,7 +88,6 @@ zfs_get_003_pos_head()
}
zfs_get_003_pos_body()
{
- atf_expect_fail "kern/221985 - zfs mount -o remount is broken"
. $(atf_get_srcdir)/../../../include/default.cfg
. $(atf_get_srcdir)/zfs_get_list_d.kshlib
. $(atf_get_srcdir)/zfs_get_common.kshlib
Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_007_pos.ksh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_007_pos.ksh Tue Feb 20 18:33:45 2018 (r329651)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_007_pos.ksh Tue Feb 20 18:42:08 2018 (r329652)
@@ -42,7 +42,6 @@
#
# PROPERTY MOUNT OPTION
# atime atime/noatime
-# devices devices/nodevices
# exec exec/noexec
# readonly ro/rw
# setuid setuid/nosetuid
@@ -74,7 +73,7 @@ log_assert "Verify '-o' will set filesystem property t
"without affecting the property that is stored on disk."
log_onexit cleanup
-set -A properties "atime" "devices" "exec" "readonly" "setuid"
+set -A properties "atime" "exec" "readonly" "setuid"
#
# Get the specified filesystem property reverse mount option.
@@ -89,7 +88,6 @@ function get_reverse_option
# Define property value: "reverse if value=on" "reverse if value=off"
set -A values "noatime" "atime" \
- "nodevices" "devices" \
"noexec" "exec" \
"rw" "ro" \
"nosetuid" "setuid"
@@ -127,19 +125,13 @@ for property in ${properties[@]}; do
# Set filesystem property temporarily
reverse_opt=$(get_reverse_option $fs $property)
- log_must $ZFS mount -o remount,$reverse_opt $fs
+ log_must $ZFS mount -o update,$reverse_opt $fs
cur_val=$(get_prop $property $fs)
(($? != 0)) && log_fail "get_prop $property $fs"
- # In LZ, a user with all zone privileges can never with "devices"
- if ! is_global_zone && [[ $property == devices ]] ; then
- if [[ $cur_val != off || $orig_val != off ]]; then
- log_fail "'devices' property shouldn't " \
- "be enabled in LZ"
- fi
- elif [[ $orig_val == $cur_val ]]; then
- log_fail "zfs mount -o remount,$reverse_opt " \
+ if [[ $orig_val == $cur_val ]]; then
+ log_fail "zfs mount -o update,$reverse_opt " \
"doesn't change property."
fi
@@ -150,7 +142,7 @@ for property in ${properties[@]}; do
cur_val=$(get_prop $property $fs)
(($? != 0)) && log_fail "get_prop $property $fs"
if [[ $orig_val != $cur_val ]]; then
- log_fail "zfs mount -o remount,$reverse_opt " \
+ log_fail "zfs mount -o update,$reverse_opt " \
"change the property that is stored on disks"
fi
done
Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh Tue Feb 20 18:33:45 2018 (r329651)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh Tue Feb 20 18:42:08 2018 (r329652)
@@ -194,12 +194,12 @@ zfs_mount_007_pos_head()
}
zfs_mount_007_pos_body()
{
- atf_expect_fail "kern/221985 - zfs mount -o remount is broken"
. $(atf_get_srcdir)/../../../include/default.cfg
. $(atf_get_srcdir)/zfs_mount.kshlib
. $(atf_get_srcdir)/zfs_mount.cfg
verify_disk_count "$DISKS" 1
+ atf_expect_fail "PR 115361 zfs get setuid doesn't reflect setuid state as set by zfs mount"
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
ksh93 $(atf_get_srcdir)/zfs_mount_007_pos.ksh || atf_fail "Testcase failed"
}
More information about the svn-src-projects
mailing list