summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/tests/functional/reservation/reservation.cfg2
-rwxr-xr-xtests/zfs-tests/tests/functional/reservation/reservation_004_pos.sh6
-rwxr-xr-xtests/zfs-tests/tests/functional/slog/slog_014_pos.ksh14
3 files changed, 19 insertions, 3 deletions
diff --git a/tests/zfs-tests/tests/functional/reservation/reservation.cfg b/tests/zfs-tests/tests/functional/reservation/reservation.cfg
index c12ad072c..b4f9af938 100644
--- a/tests/zfs-tests/tests/functional/reservation/reservation.cfg
+++ b/tests/zfs-tests/tests/functional/reservation/reservation.cfg
@@ -29,7 +29,7 @@
#
export RESV_DELTA=5242880
-export RESV_TOLERANCE=5242880 # Acceptable limit (5MB) for diff in space stats
+export RESV_TOLERANCE=10485760 # Acceptable limit (10MB) diff in space stats
export RESV_SIZE=52428800 # Default reservation size (50MB)
export RESV_FREE_SPACE=52428800 # Amount of space (50MB) to leave free in a pool
export RESV_NUM_FS=10 # Number of filesystems to create
diff --git a/tests/zfs-tests/tests/functional/reservation/reservation_004_pos.sh b/tests/zfs-tests/tests/functional/reservation/reservation_004_pos.sh
index a396aae4b..f8342ff29 100755
--- a/tests/zfs-tests/tests/functional/reservation/reservation_004_pos.sh
+++ b/tests/zfs-tests/tests/functional/reservation/reservation_004_pos.sh
@@ -117,6 +117,12 @@ for obj in $OBJ_LIST ; do
new_space_avail=`get_prop available $TESTPOOL`
new_space_used=`get_prop used $TESTPOOL`
+ #
+ # Recent changes to metaslab logic have caused these tests to expand
+ # outside of their previous tolerance. If this is discovered to be a
+ # bug, rather than a side effect of some interactions, the reservation
+ # should be halved again.
+ #
log_must within_limits $space_used $new_space_used $RESV_TOLERANCE
log_must within_limits $space_avail $new_space_avail $RESV_TOLERANCE
done
diff --git a/tests/zfs-tests/tests/functional/slog/slog_014_pos.ksh b/tests/zfs-tests/tests/functional/slog/slog_014_pos.ksh
index 7e1872893..0ec96ae1e 100755
--- a/tests/zfs-tests/tests/functional/slog/slog_014_pos.ksh
+++ b/tests/zfs-tests/tests/functional/slog/slog_014_pos.ksh
@@ -26,7 +26,7 @@
#
#
-# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+# Copyright (c) 2013, 2018 by Delphix. All rights reserved.
#
. $STF_SUITE/tests/functional/slog/slog.kshlib
@@ -50,9 +50,19 @@ for type in "mirror" "raidz" "raidz2"; do
log_must zpool create $TESTPOOL $type $VDEV $spare $SDEV \
log $LDEV
+ # Create a file to be corrupted
+ dd if=/dev/urandom of=/$TESTPOOL/filler bs=1024k count=50
+
+ #
+ # Ensure the file has been synced out before attempting to
+ # corrupt its contents.
+ #
+ sync
+
+ #
# Corrupt a pool device to make the pool DEGRADED
- dd if=/dev/urandom of=/$TESTPOOL/filler bs=1024k count=50
# The oseek value below is to skip past the vdev label.
+ #
if is_linux; then
log_must dd if=/dev/urandom of=$VDIR/a bs=1024k \
seek=4 conv=notrunc count=50