From 5b0c27cd14bbc07d50304c97735cc105d0258673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20F=C3=BCl=C3=B6p?= Date: Sat, 29 Mar 2025 19:59:20 +0100 Subject: [PATCH] ZTS: Fix zpool `dry run` tests output formating MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Fülöp --- .../cli_root/zpool_add/zpool_add_dryrun_output.ksh | 6 +++++- .../cli_root/zpool_create/zpool_create_dryrun_output.ksh | 6 +++++- .../cli_root/zpool_split/zpool_split_dryrun_output.ksh | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh index 9adf4d9bb..3f9ce3210 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh @@ -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 diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh index 68a85a5b5..5d654ec3a 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh @@ -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 diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh index 628e8342a..e66456a71 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh @@ -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