]> granicus.if.org Git - zfs/commitdiff
ZTS: Fix trim/trim_config and trim/autotrim_config
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 4 Oct 2019 19:38:07 +0000 (12:38 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Oct 2019 19:38:07 +0000 (12:38 -0700)
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

tests/zfs-tests/tests/functional/trim/autotrim_config.ksh
tests/zfs-tests/tests/functional/trim/trim_config.ksh

index 6ce396a38012dfcfd6defcf14bee833968dddca0..e41e325687d4f7209509a4c358d7ba0cafd5039e 100755 (executable)
@@ -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
index e56bd6248f2ccbfed0366494bcd6a326954010b8..993072b1084fa6080bb9de2668c45f994f3ee380 100755 (executable)
@@ -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