Skip to content

Commit 5b0c27c

Browse files
AttilaFueloeptonyhutter
authored andcommitted
ZTS: Fix zpool dry run tests output formating
Signed-off-by: Attila Fülöp <attila@fueloep.org>
1 parent 029c4ae commit 5b0c27c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ for (( i=0; i < ${#tests[@]}; i+=1 )); do
161161
log_fail eval "zpool add -n '$TESTPOOL' $add"
162162
fi
163163
if [[ "$out" != "$want" ]]; then
164-
log_fail "Got:\n" "$out" "\nbut expected:\n" "$want"
164+
log_note "Got:"
165+
log_note "$out"
166+
log_note "but expected:"
167+
log_note "$want"
168+
log_fail "Dry run does not display config correctly"
165169
fi
166170
log_must destroy_pool "$TESTPOOL"
167171
done

tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ for (( i=0; i < ${#tests[@]}; i+=1 )); do
133133
log_fail eval "zpool create -n '$TESTPOOL' $tree"
134134
fi
135135
if [[ "$out" != "$want" ]]; then
136-
log_fail "Got:\n" "$out" "\nbut expected:\n" "$want"
136+
log_note "Got:"
137+
log_note "$out"
138+
log_note "but expected:"
139+
log_note "$want"
140+
log_fail "Dry run does not display config correctly"
137141
fi
138142
done
139143

tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ for (( i=0; i < ${#tests[@]}; i+=1 )); do
146146
log_fail eval "zpool split -n '$TESTPOOL' '$NEWPOOL' $devs"
147147
fi
148148
if [[ "$out" != "$want" ]]; then
149-
log_fail "Got:\n" "$out" "\nbut expected:\n" "$want"
149+
log_note "Got:"
150+
log_note "$out"
151+
log_note "but expected:"
152+
log_note "$want"
153+
log_fail "Dry run does not display config correctly"
150154
fi
151155
log_must destroy_pool "$TESTPOOL"
152156
done

0 commit comments

Comments
 (0)