diff options
author | Christian Schwarz <[email protected]> | 2019-11-25 20:08:20 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-01-23 09:33:53 -0800 |
commit | f658f61c722872753e8899a118e11546f136e85a (patch) | |
tree | 3f6de2564eddf58aa1617b7ecd35197575da8881 /tests/zfs-tests | |
parent | 7b53e2e5a9c771869e5629e9cca04f2014e7413b (diff) |
cmd/zfs: redact: better error message for common usage errors
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matt Ahrens <[email protected]>
Signed-off-by: Christian Schwarz <[email protected]>
Closes #9867
Diffstat (limited to 'tests/zfs-tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh b/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh index e27eb601e..8eafc4706 100755 --- a/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh +++ b/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh @@ -77,4 +77,12 @@ log_mustnot zfs redact $recvfs@snap book5 $clone3@snap # Nor may a redacted dataset appear in the redaction list. log_mustnot zfs redact testpool2/recvfs@snap2 book7 testpool2/recvfs@snap +# Error messages for common usage errors +log_mustnot_expect "not contain '#'" zfs redact $sendfs@snap1 \#book $sendfs@snap2 +log_mustnot_expect "not contain '#'" zfs redact $sendfs@snap1 $sendfs#book $sendfs@snap2 +log_mustnot_expect "full dataset names" zfs redact $sendfs@snap1 book @snap2 +log_mustnot_expect "full dataset names" zfs redact $sendfs@snap1 book @snap2 +log_mustnot_expect "full dataset names" zfs redact $sendfs@snap1 \#book @snap2 +log_mustnot_expect "descendent of snapshot" zfs redact $sendfs@snap2 book $sendfs@snap1 + log_pass "Verify that redacted send correctly detects invalid arguments." |