Skip to content

Commit

Permalink
ZTS: Fix trim/trim_config and trim/autotrim_config
Browse files Browse the repository at this point in the history
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 <ryan@ixsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9399
  • Loading branch information
behlendorf authored and tonyhutter committed Jan 22, 2020
1 parent 5a1bf9e commit 5e78137
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/zfs-tests/tests/functional/trim/autotrim_config.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/zfs-tests/tests/functional/trim/trim_config.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e78137

Please sign in to comment.