aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-10-04 12:38:07 -0700
committerGitHub <[email protected]>2019-10-04 12:38:07 -0700
commit94bcf6f5e31aad91033111ffed0ca45934e0e37d (patch)
tree6fadc236f60662014381dad69c3f654c47bfadb7
parent6bd4f4545d3d334442fbe87d40ad0e0542703ce6 (diff)
ZTS: Fix trim/trim_config and trim/autotrim_config
There have been occasional CI failures which occur when the trimmed vdev size exactly matches the target size. Resolve this by slightly relaxing the conditional and checking for -ge rather than -gt. In all of the cases observer, the values match exactly. For example: Failure /mnt/trim-vdev1 is 768 MB which is not -gt than 768 MB Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9399
-rwxr-xr-xtests/zfs-tests/tests/functional/trim/autotrim_config.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/trim/trim_config.ksh2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/trim/autotrim_config.ksh b/tests/zfs-tests/tests/functional/trim/autotrim_config.ksh
index 6ce396a38..e41e32568 100755
--- a/tests/zfs-tests/tests/functional/trim/autotrim_config.ksh
+++ b/tests/zfs-tests/tests/functional/trim/autotrim_config.ksh
@@ -89,7 +89,7 @@ for type in "" "mirror" "raidz2"; do
# Fill the pool, verify the vdevs are no longer sparse.
file_write -o create -f /$TESTPOOL/file -b 1048576 -c $fill_mb -d R
- verify_vdevs "-gt" "$VDEV_MAX_MB" $VDEVS
+ verify_vdevs "-ge" "$VDEV_MAX_MB" $VDEVS
# Remove the file, wait for trim, verify the vdevs are now sparse.
log_must rm /$TESTPOOL/file
diff --git a/tests/zfs-tests/tests/functional/trim/trim_config.ksh b/tests/zfs-tests/tests/functional/trim/trim_config.ksh
index e56bd6248..993072b10 100755
--- a/tests/zfs-tests/tests/functional/trim/trim_config.ksh
+++ b/tests/zfs-tests/tests/functional/trim/trim_config.ksh
@@ -88,7 +88,7 @@ for type in "" "mirror" "raidz2"; do
# Fill the pool, verify the vdevs are no longer sparse.
file_write -o create -f /$TESTPOOL/file -b 1048576 -c $fill_mb -d R
- verify_vdevs "-gt" "$VDEV_MAX_MB" $VDEVS
+ verify_vdevs "-ge" "$VDEV_MAX_MB" $VDEVS
# Remove the file, issue trim, verify the vdevs are now sparse.
log_must rm /$TESTPOOL/file