From ecaf3ea3f27199076263d96da1560959f14b18eb Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 9 May 2023 12:18:24 -0700 Subject: [PATCH] ZTS: Minor fixes Backport two minor ZTS test case fixes from 63652e15 to resolve a few spurious failures. Signed-off-by: Brian Behlendorf --- .../tests/functional/alloc_class/alloc_class_013_pos.ksh | 3 ++- .../cli_root/zpool_trim/zpool_trim_start_and_cancel_pos.ksh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/zfs-tests/tests/functional/alloc_class/alloc_class_013_pos.ksh b/tests/zfs-tests/tests/functional/alloc_class/alloc_class_013_pos.ksh index 2ce22a6242..790a47f265 100755 --- a/tests/zfs-tests/tests/functional/alloc_class/alloc_class_013_pos.ksh +++ b/tests/zfs-tests/tests/functional/alloc_class/alloc_class_013_pos.ksh @@ -42,7 +42,8 @@ log_must display_status "$TESTPOOL" log_must zfs create -o dedup=on -V 2G $TESTPOOL/$TESTVOL -log_must eval "new_fs $ZVOL_DEVDIR/$TESTPOOL/$TESTVOL >/dev/null 2>&1" +block_device_wait "$ZVOL_DEVDIR/$TESTPOOL/$TESTVOL" +log_must eval "new_fs $ZVOL_DEVDIR/$TESTPOOL/$TESTVOL >/dev/null" sync_pool log_must zpool list -v $TESTPOOL diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_start_and_cancel_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_start_and_cancel_pos.ksh index fbb0c29104..19781137d3 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_start_and_cancel_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_start_and_cancel_pos.ksh @@ -35,7 +35,7 @@ DISK1=${DISKS%% *} log_must zpool create -f $TESTPOOL $DISK1 -log_must zpool trim $TESTPOOL +log_must zpool trim -r 1 $TESTPOOL [[ -z "$(trim_progress $TESTPOOL $DISK1)" ]] && \ log_fail "TRIM did not start"