ZTS: Fix zpool dry run tests output formating

Signed-off-by: Attila Fülöp <attila@fueloep.org>
This commit is contained in:
Attila Fülöp 2025-03-29 19:59:20 +01:00 committed by Tony Hutter
parent 029c4ae03a
commit 5b0c27cd14
3 changed files with 15 additions and 3 deletions

View File

@ -161,7 +161,11 @@ for (( i=0; i < ${#tests[@]}; i+=1 )); do
log_fail eval "zpool add -n '$TESTPOOL' $add"
fi
if [[ "$out" != "$want" ]]; then
log_fail "Got:\n" "$out" "\nbut expected:\n" "$want"
log_note "Got:"
log_note "$out"
log_note "but expected:"
log_note "$want"
log_fail "Dry run does not display config correctly"
fi
log_must destroy_pool "$TESTPOOL"
done

View File

@ -133,7 +133,11 @@ for (( i=0; i < ${#tests[@]}; i+=1 )); do
log_fail eval "zpool create -n '$TESTPOOL' $tree"
fi
if [[ "$out" != "$want" ]]; then
log_fail "Got:\n" "$out" "\nbut expected:\n" "$want"
log_note "Got:"
log_note "$out"
log_note "but expected:"
log_note "$want"
log_fail "Dry run does not display config correctly"
fi
done

View File

@ -146,7 +146,11 @@ for (( i=0; i < ${#tests[@]}; i+=1 )); do
log_fail eval "zpool split -n '$TESTPOOL' '$NEWPOOL' $devs"
fi
if [[ "$out" != "$want" ]]; then
log_fail "Got:\n" "$out" "\nbut expected:\n" "$want"
log_note "Got:"
log_note "$out"
log_note "but expected:"
log_note "$want"
log_fail "Dry run does not display config correctly"
fi
log_must destroy_pool "$TESTPOOL"
done