ZTS: Check the right mount options on FreeBSD

FreeBSD does not support the "devices" and "nodevices" mount options.

Do not check these options on FreeBSD.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10028
This commit is contained in:
Ryan Moeller 2020-02-20 11:12:24 -05:00 committed by GitHub
parent 325a551232
commit b11375d74a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,10 @@ log_assert "Verify '-o' will set filesystem property temporarily, " \
"without affecting the property that is stored on disk." "without affecting the property that is stored on disk."
log_onexit cleanup log_onexit cleanup
set -A properties "atime" "devices" "exec" "readonly" "setuid" set -A properties "atime" "exec" "readonly" "setuid"
if ! is_freebsd; then
properties+=("devices")
fi
# #
# Get the specified filesystem property reverse mount option. # Get the specified filesystem property reverse mount option.
@ -78,16 +81,21 @@ function get_reverse_option
# Define property value: "reverse if value=on" "reverse if value=off" # Define property value: "reverse if value=on" "reverse if value=off"
if is_linux; then if is_linux; then
set -A values "noatime" "atime" \ set -A values "noatime" "atime" \
"nodev" "dev" \
"noexec" "exec" \ "noexec" "exec" \
"rw" "ro" \ "rw" "ro" \
"nosuid" "suid" "nosuid" "suid" \
else "nodev" "dev"
elif is_freebsd; then
set -A values "noatime" "atime" \ set -A values "noatime" "atime" \
"nodevices" "devices" \
"noexec" "exec" \ "noexec" "exec" \
"rw" "ro" \ "rw" "ro" \
"nosetuid" "setuid" "nosetuid" "setuid"
else
set -A values "noatime" "atime" \
"noexec" "exec" \
"rw" "ro" \
"nosetuid" "setuid" \
"nodevices" "devices"
fi fi
typeset -i i=0 typeset -i i=0