From ab9646166d4f1fb01f648c678e896ea05a9517f6 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Thu, 27 Feb 2020 09:37:34 -0800 Subject: ZTS: Fix zfs_receive_004_neg `zfs recv` of an incremental stream that already exists is ignored, with a message like: receiving incremental stream of pool/fs@incsnap into pool/fs@incsnap snap testpool/testfs@incsnap already exists; ignoring And the command exits successfully (exit code 0). The zfs_receive_004_neg test is expecting that a this case will fail, with nonzero exit code. The fix is to remove this specific command from the test case. This lets us check that the remaining commands do in fact fail. Reviewed-by: Ryan Moeller Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Matthew Ahrens Closes #10055 --- tests/test-runner/bin/zts-report.py | 1 - .../tests/functional/cli_root/zfs_receive/zfs_receive_004_neg.ksh | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/test-runner/bin/zts-report.py b/tests/test-runner/bin/zts-report.py index 111686920..19730aaaf 100755 --- a/tests/test-runner/bin/zts-report.py +++ b/tests/test-runner/bin/zts-report.py @@ -147,7 +147,6 @@ summary = { known = { 'casenorm/mixed_none_lookup_ci': ['FAIL', '7633'], 'casenorm/mixed_formd_lookup_ci': ['FAIL', '7633'], - 'cli_root/zfs_receive/zfs_receive_004_neg': ['FAIL', known_reason], 'cli_root/zfs_unshare/zfs_unshare_002_pos': ['SKIP', na_reason], 'cli_root/zfs_unshare/zfs_unshare_006_pos': ['SKIP', na_reason], 'cli_user/misc/zfs_share_001_neg': ['SKIP', na_reason], diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_004_neg.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_004_neg.ksh index 3a9c2279a..56f536225 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_004_neg.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_004_neg.ksh @@ -92,16 +92,11 @@ sync set -A badargs \ "" "nonexistent-snap" "blah@blah" "-d" "-d nonexistent-dataset" \ - "$TESTPOOL/$TESTFS" "$TESTPOOL1" "$TESTPOOL/fs@" "$TESTPOOL/fs@@mysnap" \ + "$TESTPOOL1" "$TESTPOOL/fs@" "$TESTPOOL/fs@@mysnap" \ "$TESTPOOL/fs@@" "$TESTPOOL/fs/@mysnap" "$TESTPOOL/fs@/mysnap" \ "$TESTPOOL/nonexistent-fs/nonexistent-fs" "-d $TESTPOOL/nonexistent-fs" \ "-d $TESTPOOL/$TESTFS/nonexistent-fs" -if is_global_zone ; then - typeset -i n=${#badargs[@]} - badargs[$n]="-d $TESTPOOL" -fi - typeset -i i=0 while (( i < ${#badargs[*]} )) do -- cgit v1.2.3