Skip to content

Commit 4c49bef

Browse files
behlendorfRageLtMan
authored andcommitted
ZTS: zpool_trim_start_and_cancel_pos.ksh
Several of the TRIM tests were based of the initialize tests and then adapted for TRIM. The zpool_trim_start_and_cancel_pos.ksh test was intended to be one such test but it was overlooked and actually never adapted. Update it accordingly. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#11649
1 parent 131ae6e commit 4c49bef

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_start_and_cancel_pos.ksh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,29 @@
2020
#
2121

2222
. $STF_SUITE/include/libtest.shlib
23-
. $STF_SUITE/tests/functional/cli_root/zpool_initialize/zpool_initialize.kshlib
23+
. $STF_SUITE/tests/functional/cli_root/zpool_trim/zpool_trim.kshlib
2424

2525
#
2626
# DESCRIPTION:
27-
# Starting and stopping an initialize works.
27+
# Starting and stopping a trim works.
2828
#
2929
# STRATEGY:
3030
# 1. Create a one-disk pool.
31-
# 2. Start initializing and verify that initializing is active.
32-
# 3. Cancel initializing and verify that initializing is not active.
31+
# 2. Start trimming and verify that trimming is active.
32+
# 3. Cancel trimming and verify that trimming is not active.
3333
#
3434

3535
DISK1=${DISKS%% *}
3636

3737
log_must zpool create -f $TESTPOOL $DISK1
38-
log_must zpool initialize $TESTPOOL
38+
log_must zpool trim $TESTPOOL
3939

40-
[[ -z "$(initialize_progress $TESTPOOL $DISK1)" ]] && \
41-
log_fail "Initialize did not start"
40+
[[ -z "$(trim_progress $TESTPOOL $DISK1)" ]] && \
41+
log_fail "TRIM did not start"
4242

43-
log_must zpool initialize -c $TESTPOOL
43+
log_must zpool trim -c $TESTPOOL
4444

45-
[[ -z "$(initialize_progress $TESTPOOL $DISK1)" ]] || \
46-
log_fail "Initialize did not stop"
45+
[[ -z "$(trim_progress $TESTPOOL $DISK1)" ]] || \
46+
log_fail "TRIM did not stop"
4747

48-
log_pass "Initialize start + cancel works"
48+
log_pass "TRIM start + cancel works"

0 commit comments

Comments
 (0)