ZTS: Adopt OpenZFS test analysis script

Adopt and extend the OpenZFS ZTS results analysis script for use
with ZFS on Linux.  This allows for automatic analysis of tests
which may be skipped for a variety or reasons or which are not
entirely reliable.

In addition to the list of 'known' failures, which have been updated
for ZFS on Linux, there in a new 'maybe' section.  This mapping
include tests which might be correctly skipped depending on the
test environment.  This may be because of a missing dependency or
lack of required kernel support.  This list also includes tests
which normally pass but might on occasion fail for a harmless
reason.

The script was also extended include a reason for why a given test
might be skipped or may fail.  The reason will be included after
the test in the "results other than PASS that are expected" section.
For failures it is preferable to set the reason to the GitHub issue
number and for skipped tests several generic reasons are available.
You may also specify a custom reason if needed.

All tests were added back in to the linux.run file even if they are
expected to failed.  There is value in running tests which may not
pass, the expected results for these tests has been encoded in
the new analysis script.

All tests which were disabled because they ran more slowly on a
32-bit system have been re-enabled.  Developers working on 32-bit
systems should assess what it reasonable for their environment.

The unnecessary dependency on physical block devices was removed for
the checksum, grow_pool, and grow_replicas test groups so they are
no longer skipped.  Updated the filetest_001_pos test case to run
properly now that it is enabled and moved the grow tests in to a
single directory.

Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7638
This commit is contained in:
Brian Behlendorf
2018-06-20 14:03:13 -07:00
committed by GitHub
parent 1c38ac61e1
commit e4a3297a04
59 changed files with 587 additions and 591 deletions
+1 -2
View File
@@ -22,8 +22,7 @@ SUBDIRS = \
exec \
fault \
features \
grow_pool \
grow_replicas \
grow \
history \
hkdf \
inheritance \
@@ -44,11 +44,6 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/6145
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
function cleanup_testenv
{
cleanup
@@ -40,5 +40,17 @@ log_must add_group $QGROUP
log_must add_user $QGROUP $QUSER1
log_must add_user $QGROUP $QUSER2
#
# Verify the test user can execute the zfs utilities. This may not
# be possible due to default permissions on the user home directory.
# This can be resolved granting group read access.
#
# chmod 0750 $HOME
#
user_run $QUSER1 zfs list
if [ $? -ne 0 ]; then
log_unsupported "Test user $QUSER1 cannot execute zfs utilities"
fi
DISK=${DISKS%% *}
default_setup $DISK
@@ -35,16 +35,4 @@
verify_runnable "global"
df -F zfs -h | grep "$TESTFS " >/dev/null
[[ $? == 0 ]] && log_must zfs umount -f $TESTDIR
destroy_pool $TESTPOOL
# recreate and destroy a zpool over the disks to restore the partitions to
# normal
if [[ -n $SINGLE_DISK ]]; then
log_must cleanup_devices $MIRROR_PRIMARY
else
log_must cleanup_devices $MIRROR_PRIMARY $MIRROR_SECONDARY
fi
log_pass
default_cleanup
@@ -28,39 +28,4 @@
# Copyright (c) 2013 by Delphix. All rights reserved.
#
typeset -i NUMBER_OF_DISKS=0
for i in $DISKS; do
[[ -n $MIRROR_PRIMARY ]] && MIRROR_SECONDARY=$i
[[ -z $MIRROR_PRIMARY ]] && MIRROR_PRIMARY=$i
done
if [[ -z $MIRROR_SECONDARY ]]; then
# We need to repartition the single disk to two slices
SINGLE_DISK=$MIRROR_PRIMARY
MIRROR_SECONDARY=$MIRROR_PRIMARY
SIDE_PRIMARY_PART=0
SIDE_SECONDARY_PART=1
if is_linux; then
SIDE_PRIMARY=${SINGLE_DISK}p1
SIDE_SECONDARY=${SINGLE_DISK}p2
else
SIDE_PRIMARY=${SINGLE_DISK}s${SIDE_PRIMARY_PART}
SIDE_SECONDARY=${SINGLE_DISK}s${SIDE_SECONDARY_PART}
fi
else
SIDE_PRIMARY_PART=0
SIDE_SECONDARY_PART=0
if is_linux; then
SIDE_PRIMARY=${MIRROR_PRIMARY}p1
SIDE_SECONDARY=${MIRROR_SECONDARY}p1
else
SIDE_PRIMARY=${MIRROR_PRIMARY}s${SIDE_PRIMARY_PART}
SIDE_SECONDARY=${MIRROR_SECONDARY}s${SIDE_SECONDARY_PART}
fi
fi
export MIRROR_PRIMARY MIRROR_SECONDARY SINGLE_DISK SIDE_PRIMARY SIDE_SECONDARY
export MIRROR_MEGS=100
export MIRROR_SIZE=${MIRROR_MEGS}m # default mirror size
set -A CHECKSUM_TYPES "fletcher2" "fletcher4" "sha256" "sha512" "skein" "edonr"
@@ -22,6 +22,7 @@
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/include/properties.shlib
. $STF_SUITE/tests/functional/checksum/default.cfg
# DESCRIPTION:
# Sanity test to make sure checksum algorithms work.
@@ -60,14 +61,9 @@ log_assert "Create and read back files with using different checksum algorithms"
log_onexit cleanup
FSSIZE=$(zpool list -Hp -o size $TESTPOOL)
WRITESZ=1048576
WRITECNT=$((($FSSIZE) / $WRITESZ ))
# Skip the first and last 4MB
SKIP=4127518
SKIPCNT=$((($SKIP / $WRITESZ )))
SKIPCNT=$((($SKIPCNT * 2)))
WRITECNT=$((($WRITECNT - $SKIPCNT)))
SKIPCNT=$(((4194304 / $WRITESZ) * 2))
WRITECNT=$((($MINVDEVSIZE / $WRITESZ) - $SKIPCNT))
# Get a list of vdevs in our pool
set -A array $(get_disklist_fullpath)
@@ -75,19 +71,21 @@ set -A array $(get_disklist_fullpath)
# Get the first vdev, since we will corrupt it later
firstvdev=${array[0]}
# First test each checksum by writing a file using it, and confirm there's no
# errors.
for ((count = 0; count < ${#checksum_props[*]} ; count++)); do
i=${checksum_props[$count]}
zfs set checksum=$i $TESTPOOL
file_write -o overwrite -f $TESTDIR/test_$i -b $WRITESZ -c 5 -d R
done
zpool export $TESTPOOL
zpool import $TESTPOOL
zpool scrub $TESTPOOL
while is_pool_scrubbing $TESTPOOL; do
sleep 1
# Test each checksum by writing a file using it, confirm there are no errors.
typeset -i i=1
while [[ $i -lt ${#CHECKSUM_TYPES[*]} ]]; do
type=${CHECKSUM_TYPES[i]}
log_must zfs set checksum=$type $TESTPOOL
log_must file_write -o overwrite -f $TESTDIR/test_$type \
-b $WRITESZ -c 5 -d R
(( i = i + 1 ))
done
log_must zpool export $TESTPOOL
log_must zpool import $TESTPOOL
log_must zpool scrub $TESTPOOL
log_must wait_scrubbed $TESTPOOL
zpool status -P -v $TESTPOOL | grep $firstvdev | read -r name state rd wr cksum
log_assert "Normal file write test saw $cksum checksum errors"
log_must [ $cksum -eq 0 ]
@@ -95,31 +93,32 @@ log_must [ $cksum -eq 0 ]
rm -fr $TESTDIR/*
log_assert "Test scrambling the disk and seeing checksum errors"
for ((count = 0; count < ${#checksum_props[*]} ; count++)); do
i=${checksum_props[$count]}
zfs set checksum=$i $TESTPOOL
file_write -o overwrite -f $TESTDIR/test_$i -b $WRITESZ -c 5 -d R
typeset -i j=1
while [[ $j -lt ${#CHECKSUM_TYPES[*]} ]]; do
type=${CHECKSUM_TYPES[$j]}
log_must zfs set checksum=$type $TESTPOOL
log_must file_write -o overwrite -f $TESTDIR/test_$type \
-b $WRITESZ -c 5 -d R
zpool export $TESTPOOL
log_must zpool export $TESTPOOL
# Scramble the data on the first vdev in our pool.
# Skip the first and last 16MB of data, then scramble the rest after that
#
file_write -o overwrite -f $firstvdev -s $SKIP -c $WRITECNT -b $WRITESZ -d R
# Scramble the data on the first vdev in our pool. Skip the first
# and last 16MB of data, then scramble the rest after that.
log_must dd if=/dev/zero of=$firstvdev bs=$WRITESZ skip=$SKIPCNT \
count=$WRITECNT
zpool import $TESTPOOL
log_must zpool import $TESTPOOL
log_must zpool scrub $TESTPOOL
log_must wait_scrubbed $TESTPOOL
i=${checksum_props[$count]}
zpool scrub $TESTPOOL
while is_pool_scrubbing $TESTPOOL; do
sleep 1
done
zpool status -P -v $TESTPOOL | grep $firstvdev | \
read -r name state rd wr cksum
zpool status -P -v $TESTPOOL | grep $firstvdev | read -r name state rd wr cksum
log_assert "Checksum '$i' caught $cksum checksum errors"
log_assert "Checksum '$type' caught $cksum checksum errors"
log_must [ $cksum -ne 0 ]
rm -f $TESTDIR/test_$i
zpool clear $TESTPOOL
rm -f $TESTDIR/test_$type
log_must zpool clear $TESTPOOL
(( j = j + 1 ))
done
@@ -30,22 +30,7 @@
#
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/checksum/default.cfg
verify_runnable "global"
if ! $(is_physical_device $DISKS) ; then
log_unsupported "This directory cannot be run on raw files."
fi
if [[ -n $SINGLE_DISK ]]; then
log_note "Partitioning a single disk ($SINGLE_DISK)"
else
log_note "Partitioning disks ($MIRROR_PRIMARY $MIRROR_SECONDARY)"
fi
log_must set_partition $SIDE_PRIMARY_PART "" $MIRROR_SIZE $MIRROR_PRIMARY
log_must set_partition $SIDE_SECONDARY_PART "" $MIRROR_SIZE $MIRROR_SECONDARY
default_mirror_setup $SIDE_PRIMARY $SIDE_SECONDARY
log_pass
default_mirror_setup $DISKS
@@ -43,11 +43,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6145
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
function cleanup
{
[[ -e $propfile ]] && rm -f $propfile
@@ -45,7 +45,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/5479
if is_kmemleak; then
log_unsupported "Test case runs slowly when kmemleak is enabled"
fi
@@ -49,6 +49,11 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/4990
if is_linux; then
log_unsupported "Test case needs to be updated"
fi
function cleanup
{
log_must force_unmount $TESTPOOL/$TESTFS
@@ -27,6 +27,11 @@
. $STF_SUITE/include/libtest.shlib
share -s
if [ $? -ne 0 ]; then
log_unsupported "The NFS utilities are not installed"
fi
# Make sure NFS server is running before testing.
setup_nfs_server
@@ -27,6 +27,11 @@
. $STF_SUITE/include/libtest.shlib
share -s
if [ $? -ne 0 ]; then
log_unsupported "The NFS utilities are not installed"
fi
# Make sure NFS server is running before testing.
setup_nfs_server
@@ -45,11 +45,6 @@
verify_runnable "global"
# https://github.com/zfsonlinux/zfs/issues/6145
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
function cleanup
{
poolexists $TESTPOOL && \
@@ -45,11 +45,6 @@
verify_runnable "global"
# https://github.com/zfsonlinux/zfs/issues/6145
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
function cleanup
{
poolexists $TESTPOOL2 && destroy_pool $TESTPOOL2
@@ -50,7 +50,7 @@ verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5771
if is_linux; then
log_unsupported "Requires additional ZED support"
log_unsupported "Requires autoexpand property support"
fi
function cleanup
@@ -50,7 +50,7 @@ verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5771
if is_linux; then
log_unsupported "Requires additional ZED support"
log_unsupported "Requires autoexpand property support"
fi
function cleanup
@@ -59,6 +59,11 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/6839
if is_linux; then
log_unsupported "Test case may be slow"
fi
set -A vdevs "" "mirror" "raidz"
function verify
@@ -44,11 +44,6 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5444
if is_32bit; then
log_unsupported "Test case fails on 32-bit systems"
fi
log_assert "When scrubbing, detach device should not break system."
log_must zpool scrub $TESTPOOL
@@ -43,11 +43,6 @@
verify_runnable "global"
# https://github.com/zfsonlinux/zfs/issues/6141
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
function cleanup
{
for config in $CONFIGS; do
@@ -55,6 +55,18 @@ log_must add_group $OTHER_GROUP
log_must add_user $OTHER_GROUP $OTHER1
log_must add_user $OTHER_GROUP $OTHER2
#
# Verify the test user can execute the zfs utilities. This may not
# be possible due to default permissions on the user home directory.
# This can be resolved granting group read access.
#
# chmod 0750 $HOME
#
user_run $STAFF1 zfs list
if [ $? -ne 0 ]; then
log_unsupported "Test user $STAFF1 cannot execute zfs utilities"
fi
DISK=${DISKS%% *}
default_volume_setup $DISK
log_must chmod 777 $TESTDIR
@@ -48,10 +48,6 @@
verify_runnable "global"
if is_32bit; then
log_unsupported "Test case fails on 32-bit systems"
fi
log_assert "Setting devices=on on file system, the devices files in this file" \
"system can be used."
log_onexit cleanup
@@ -48,10 +48,6 @@
verify_runnable "global"
if is_32bit; then
log_unsupported "Test case fails on 32-bit systems"
fi
log_assert "Setting devices=off on file system, the devices files in this file"\
"system can not be used."
log_onexit cleanup
@@ -1,6 +1,7 @@
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/grow_replicas
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/grow
dist_pkgdata_SCRIPTS = \
grow_pool_001_pos.ksh \
grow_replicas_001_pos.ksh
dist_pkgdata_DATA = \
grow_replicas.cfg
grow.cfg
@@ -1,4 +1,3 @@
#!/bin/ksh -p
#
# CDDL HEADER START
#
@@ -21,33 +20,23 @@
#
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
# Copyright (c) 2013 by Delphix. All rights reserved.
# Copyright 2016 Nexenta Systems, Inc.
#
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/grow_pool/grow_pool.cfg
verify_runnable "global"
export DEVICE1="$TEST_BASE_DIR/device-1"
export DEVICE2="$TEST_BASE_DIR/device-2"
export DEVICE3="$TEST_BASE_DIR/device-3"
export DEVICE4="$TEST_BASE_DIR/device-4"
ismounted $TESTFS && \
log_must zfs umount $TESTDIR
destroy_pool "$TESTPOOL"
#
# Here we create & destroy a zpool using the disks
# because this resets the partitions to normal
#
if [[ -z $DISK ]]; then
create_pool ZZZ "$DISK0 $DISK1"
destroy_pool ZZZ
else
create_pool ZZZ "$DISK"
destroy_pool ZZZ
fi
log_pass
export BLOCK_SIZE=131072
export TESTFILE1=file$$.1
export SMALL_WRITE_COUNT=100
export WRITE_COUNT=4096000
@@ -1,4 +1,4 @@
#! /bin/ksh -p
#!/bin/ksh -p
#
# CDDL HEADER START
#
@@ -30,7 +30,7 @@
#
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/grow_pool/grow_pool.cfg
. $STF_SUITE/tests/functional/grow/grow.cfg
#
# DESCRIPTION:
@@ -46,13 +46,29 @@
verify_runnable "global"
function cleanup
{
destroy_pool $TESTPOOL
rm -f $DEVICE1 $DEVICE2 $DEVICE3
}
log_assert "A zpool may be increased in capacity by adding a disk"
log_onexit cleanup
truncate -s $SPA_MINDEVSIZE $DEVICE1 $DEVICE2
create_pool $TESTPOOL $pooltype $DEVICE1 $DEVICE2
log_must zfs create $TESTPOOL/$TESTFS
log_must zfs set mountpoint=$TESTDIR $TESTPOOL/$TESTFS
log_must zfs set compression=off $TESTPOOL/$TESTFS
file_write -o create -f $TESTDIR/$TESTFILE1 \
-b $BLOCK_SIZE -c $WRITE_COUNT -d 0
typeset -i zret=$?
readonly ENOSPC=28
if [[ $zret -ne $ENOSPC ]]; then
log_fail "file_write completed w/o ENOSPC, aborting!!!"
fi
@@ -61,14 +77,15 @@ if [[ ! -s $TESTDIR/$TESTFILE1 ]]; then
log_fail "$TESTDIR/$TESTFILE1 was not created"
fi
if [[ -n $DISK ]]; then
log_must zpool add $TESTPOOL $DISK"s"$SLICE1
else
log_must zpool add $TESTPOOL $DISK1
fi
truncate -s $SPA_MINDEVSIZE $DEVICE3
log_must zpool add $TESTPOOL $DEVICE3
log_must file_write -o append -f $TESTDIR/$TESTFILE1 \
-b $BLOCK_SIZE -c $SMALL_WRITE_COUNT -d 0
log_must zfs inherit compression $TESTPOOL/$TESTFS
log_must destroy_pool $TESTPOOL
rm -f $DEVICE1 $DEVICE2 $DEVICE3
log_pass "TESTPOOL successfully grown"
@@ -1,4 +1,4 @@
#! /bin/ksh -p
#!/bin/ksh -p
#
# CDDL HEADER START
#
@@ -30,7 +30,8 @@
# Copyright 2016 Nexenta Systems, Inc.
#
. $STF_SUITE/tests/functional/grow_replicas/grow_replicas.cfg
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/grow/grow.cfg
# DESCRIPTION:
# A ZFS filesystem is limited by the amount of disk space
@@ -44,18 +45,10 @@
verify_runnable "global"
if is_32bit; then
log_unsupported "Test case fails on 32-bit systems"
fi
if ! is_physical_device $DISKS; then
log_unsupported "This test case cannot be run on raw files"
fi
function cleanup
{
datasetexists $TESTPOOL && log_must destroy_pool $TESTPOOL
[[ -d $TESTDIR ]] && log_must rm -rf $TESTDIR
destroy_pool $TESTPOOL
rm -f $DEVICE1 $DEVICE2 $DEVICE3 $DEVICE4
}
log_assert "mirror/raidz pool may be increased in capacity by adding a disk"
@@ -67,28 +60,13 @@ readonly ENOSPC=28
for pooltype in "mirror" "raidz"; do
log_note "Creating pool type: $pooltype"
if [[ -n $DISK ]]; then
log_note "No spare disks available. Using slices on $DISK"
for slice in $SLICES; do
log_must set_partition $slice "$cyl" $SIZE $DISK
cyl=$(get_endslice $DISK $slice)
done
create_pool $TESTPOOL $pooltype \
${DISK}${SLICE_PREFIX}${SLICE0} \
${DISK}${SLICE_PREFIX}${SLICE1}
else
log_must set_partition 0 "" $SIZE $DISK0
log_must set_partition 0 "" $SIZE $DISK1
create_pool $TESTPOOL $pooltype \
${DISK0}${SLICE_PREFIX}${SLICE0} \
${DISK1}${SLICE_PREFIX}${SLICE0}
fi
truncate -s $SPA_MINDEVSIZE $DEVICE1 $DEVICE2
create_pool $TESTPOOL $pooltype $DEVICE1 $DEVICE2
[[ -d $TESTDIR ]] && log_must rm -rf $TESTDIR
log_must zfs create $TESTPOOL/$TESTFS
log_must zfs set mountpoint=$TESTDIR $TESTPOOL/$TESTFS
log_must zfs set compression=off $TESTPOOL/$TESTFS
file_write -o create -f $TESTDIR/$TESTFILE1 \
-b $BLOCK_SIZE -c $WRITE_COUNT -d 0
@@ -98,23 +76,14 @@ for pooltype in "mirror" "raidz"; do
[[ ! -s $TESTDIR/$TESTFILE1 ]] && \
log_fail "$TESTDIR/$TESTFILE1 was not created"
# $DISK will be set if we're using slices on one disk
if [[ -n $DISK ]]; then
log_must zpool add $TESTPOOL $pooltype \
${DISK}${SLICE_PREFIX}${SLICE3} \
${DISK}${SLICE_PREFIX}${SLICE4}
else
[[ -z $DISK2 || -z $DISK3 ]] &&
log_unsupported "No spare disks available"
log_must zpool add $TESTPOOL $pooltype \
${DISK2}${SLICE_PREFIX}${SLICE0} \
${DISK3}${SLICE_PREFIX}${SLICE0}
fi
truncate -s $SPA_MINDEVSIZE $DEVICE3 $DEVICE4
log_must zpool add $TESTPOOL $pooltype $DEVICE3 $DEVICE4
log_must file_write -o append -f $TESTDIR/$TESTFILE1 \
-b $BLOCK_SIZE -c $SMALL_WRITE_COUNT -d 0
log_must destroy_pool $TESTPOOL
rm -f $DEVICE1 $DEVICE2 $DEVICE3 $DEVICE4
done
log_pass "mirror/raidz pool successfully grown"
@@ -1,8 +0,0 @@
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/grow_pool
dist_pkgdata_SCRIPTS = \
setup.ksh \
cleanup.ksh \
grow_pool_001_pos.ksh
dist_pkgdata_DATA = \
grow_pool.cfg
@@ -1,76 +0,0 @@
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 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
export DISKSARRAY=$DISKS
export DISK_ARRAY_NUM=$(echo ${DISKS} | nawk '{print NF}')
function set_disks
{
set -A disk_array $(find_disks $DISKS)
typeset -i i=0
typeset -i limit=2
while (( i < limit )); do
if [[ -n ${disk_array[$i]} ]]; then
export DISK${i}="${disk_array[$i]}"
else
export DISK=${DISKS%% *}
return
fi
((i = i + 1))
done
export DISK=""
}
export BLOCK_SIZE=8192
set_disks
#
# Do not make SIZE too large as the three slices may exceed
# the size of the disk, and also slow down the test
# which involves filling until ENOSPC
#
export SIZE="100mb"
export SMALL_WRITE_COUNT=100
export TESTFILE1=file$$.1
export WRITE_COUNT=65536000
if is_linux; then
set_device_dir
set_slice_prefix
export SLICE=1
export SLICE0=1
export SLICE1=2
else
export SLICE_PREFIX="s"
export SLICE=0
export SLICE0=0
export SLICE1=1
fi
@@ -1,57 +0,0 @@
#!/bin/ksh -p
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2009 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/grow_pool/grow_pool.cfg
verify_runnable "global"
if ! $(is_physical_device $DISKS) ; then
log_unsupported "This directory cannot be run on raw files."
fi
if [[ -n $DISK ]]; then
log_note "No spare disks available. Using slices on $DISK"
log_must zero_partitions $DISK
for i in $SLICE0 $SLICE1 ; do
log_must set_partition $i "$cyl" $SIZE $DISK
cyl=$(get_endslice $DISK $i)
done
tmp=$DISK"s"$SLICE0
else
log_must zero_partitions $DISK0
log_must zero_partitions $DISK1
log_must set_partition $SLICE "" $SIZE $DISK0
log_must set_partition $SLICE "" $SIZE $DISK1
tmp=$DISK0$SLICE_PREFIX$SLICE
fi
default_setup $tmp
@@ -1,82 +0,0 @@
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# Copyright (c) 2013 by Delphix. All rights reserved.
# Copyright 2016 Nexenta Systems, Inc.
#
. $STF_SUITE/include/libtest.shlib
export DISKSARRAY=$DISKS
export DISK_ARRAY_NUM=$(echo ${DISKS} | nawk '{print NF}')
function set_disks
{
set -A disk_array $(find_disks $DISKS)
typeset -i i=0
typeset -i limit=4
while (( i < limit )); do
if [[ -n ${disk_array[$i]} ]]; then
export DISK${i}="${disk_array[$i]}"
else
export DISK=${DISKS%% *}
return
fi
((i = i + 1))
done
export DISK=""
}
export BLOCK_SIZE=8192
set_disks
# Do not make SIZE too large as the three slices may exceed
# the size of the disk, and also slow down the test
# which involves filling until ENOSPC.
export SIZE="100mb"
export SMALL_WRITE_COUNT=100
export TESTFILE1=file$$.1
export WRITE_COUNT=65536000
if is_linux; then
export SLICES="0 1 2 3 4"
set_device_dir
set_slice_prefix
export SLICE0=1
export SLICE1=2
export SLICE2=3
export SLICE3=4
export SLICE4=5
else
export SLICES="0 1 3 4"
export SLICE_PREFIX="s"
export SLICE0=0
export SLICE1=1
export SLICE2=2
export SLICE3=3
export SLICE4=4
fi
@@ -31,11 +31,6 @@
. $STF_SUITE/include/libtest.shlib
# See issue: https://github.com/zfsonlinux/zfs/issues/7026
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
#
# DESCRIPTION:
# 'zpool history' can cope with simultaneous commands.
@@ -45,11 +45,6 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5657
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
function cleanup
{
if datasetexists $fs ; then
@@ -59,6 +59,18 @@ root_testfs=$TESTPOOL/$TESTFS1
add_group $HIST_GROUP
add_user $HIST_GROUP $HIST_USER
#
# Verify the test user can execute the zfs utilities. This may not
# be possible due to default permissions on the user home directory.
# This can be resolved granting group read access.
#
# chmod 0750 $HOME
#
user_run $HIST_USER zfs list
if [ $? -ne 0 ]; then
log_unsupported "Test user $HIST_USER cannot execute zfs utilities"
fi
run_and_verify "zfs create $root_testfs" "-l"
run_and_verify "zfs allow $HIST_GROUP snapshot,mount $root_testfs" "-l"
run_and_verify "zfs allow $HIST_USER destroy,mount $root_testfs" "-l"
@@ -31,10 +31,6 @@
. $STF_SUITE/include/libtest.shlib
if is_32bit; then
log_unsupported "Test case fails on 32-bit systems"
fi
#
# DESCRIPTION:
# Write a file to the allowable ZFS fs size.
@@ -46,11 +46,6 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/6145
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
#
# Parse the results of zpool & zfs creation with specified size
#
@@ -27,6 +27,12 @@
verify_runnable "global"
# Verify that the required dependencies for testing are installed.
python -c "import cffi" 2>/dev/null
if [ $? -eq 1 ]; then
log_unsupported "python-cffi not found by Python"
fi
# We don't just try to "import libzfs_core" because we want to skip these tests
# only if pyzfs was not installed due to missing, build-time, dependencies; if
# we cannot load "libzfs_core" due to other reasons, for instance an API/ABI
@@ -34,8 +40,7 @@ verify_runnable "global"
python -c '
import pkgutil, sys
sys.exit(pkgutil.find_loader("libzfs_core") is None)'
if [ $? -eq 1 ]
then
if [ $? -eq 1 ]; then
log_unsupported "libzfs_core not found by Python"
fi
@@ -43,6 +43,9 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6066
log_unsupported "Occasionally hangs"
# Origin Clone
#
set -A dtst "$POOL" "$POOL/pclone" \
@@ -35,11 +35,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6086
if is_32bit; then
log_unsupported "Test case occasionally fails"
fi
log_assert "Verify resumability of a full and incremental ZFS send/receive " \
"in the presence of a corrupted stream"
log_onexit resume_cleanup $sendfs $streamfs
@@ -33,11 +33,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6446
if is_linux; then
log_unsupported "Test often hangs. Skipping."
fi
log_assert "Verify resumability of full ZFS send/receive with the -D " \
"(dedup) flag"
@@ -35,11 +35,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6446
if is_linux; then
log_unsupported "Test often hangs. Skipping."
fi
log_assert "Verify resumability of a full and incremental ZFS send/receive " \
"with the -e (embedded) flag"
@@ -38,11 +38,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/5654
if is_32bit; then
log_unsupported "Test case fails on 32-bit systems"
fi
log_assert "Verify resumability of an incremental ZFS send/receive with ZFS " \
"bookmarks"
@@ -35,11 +35,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/5665
if is_linux; then
log_unsupported "Test case hangs frequently."
fi
log_assert "Verify resumability of a full ZFS send/receive with the source " \
"filesystem unmounted"
@@ -35,11 +35,6 @@ function cleanup
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6087
if is_32bit; then
log_unsupported "Test case occasionally fails on 32-bit systems"
fi
log_assert "Verify compressed send works with volumes"
log_onexit cleanup
@@ -49,11 +49,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6145
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
# Setup array, 4 elements as a group, refer to:
# i+0: name of a snapshot
# i+1: mountpoint of the snapshot
@@ -45,11 +45,6 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5727
if is_32bit; then
log_unsupported "Test case slow on 32-bit systems"
fi
function cleanup
{
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
@@ -45,11 +45,6 @@
verify_runnable "both"
# See issue: https://github.com/zfsonlinux/zfs/issues/6136
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
log_assert "Ensure multiple threads performing write appends to the same" \
"ZFS file succeed"
@@ -46,11 +46,6 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5727
if is_32bit; then
log_unsupported "Test case slow on 32-bit systems"
fi
function cleanup
{
[[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
@@ -43,7 +43,7 @@
verify_runnable "global"
if ! lsattr -pd > /dev/null 2>&1; then
log_unsupported "Current e2fsprogs does not support set/show project ID"
log_unsupported "Current lsattr does not support set/show project ID"
fi
log_assert "pool upgrade for projectquota should work"
@@ -31,11 +31,6 @@
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/vdev_zaps/vdev_zaps.kshlib
# See issue: https://github.com/zfsonlinux/zfs/issues/6935
if is_linux; then
log_unsupported "Test case occasionally fails"
fi
log_assert "Per-vdev ZAPs are transferred properly on attach/detach"
DISK=${DISKS%% *}
@@ -46,10 +46,6 @@
verify_runnable "both"
if is_32bit; then
log_unsupported "Test case occasionally fails on 32-bit systems"
fi
function cleanup
{
for file in `find $TESTDIR -type f`; do
@@ -46,10 +46,6 @@
verify_runnable "both"
if is_32bit; then
log_unsupported "Test case runs slowly on 32 bit"
fi
function cleanup
{
for file in `find $TESTDIR -type f`; do
@@ -47,11 +47,6 @@
verify_runnable "global"
# See issue: https://github.com/zfsonlinux/zfs/issues/5848
if is_32bit; then
log_unsupported "Test case runs slowly on 32 bit"
fi
function cleanup
{
rm -rf $TESTDIR/*
@@ -44,10 +44,6 @@
verify_runnable "global"
if is_32bit; then
log_unsupported "Test case runs slowly on 32 bit"
fi
volsize=$(zfs get -H -o value volsize $TESTPOOL/$TESTVOL)
function cleanup
@@ -111,7 +107,6 @@ if [ $retval -ne 0 ] ; then
# e2fsprogs-1.43.3 (Fedora 25 and older): returns 4
# e2fsprogs-1.43.4 (Fedora 26): returns 8
#
# https://github.com/zfsonlinux/zfs/issues/6297
if [ $retval -ne 4 -a $retval -ne 8 ] ; then
log_fail "fsck exited with wrong value $retval"
fi