-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zfs diff -h/ZFS_DIFF_NO_MANGLE, diff cleanups #12829
Conversation
uuh FreeBSD HEAD CI failure appears unrelated? |
a9651f8
to
d470718
Compare
Personally, I just use this alias right now, and it's done the inputs I've needed so far, but I can't argue with wanting a builtin to print more human-readably without needing another thing to do it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me. Always pleased to see someone sand a rough edge off of zfs diff
.
92bbfb9
to
6b33153
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for the improvement.
@@ -24,7 +24,6 @@ | |||
#include <stdlib.h> | |||
#include <string.h> | |||
|
|||
/* ARGSUSED */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: looks like this cleanup ended up in wrong commit.
6b33153
to
8dcd129
Compare
Fair enough, moved to the ARGSUSED one |
The Debian 10 and CentOS 7 failures make no sense to me, since they're in casenorm/zpool expansion, which this doesn't touch? |
It looks like they hit unrelated issues. This should be good to go. |
My only concern with this is we've used |
In many ways this is the exact, unmangled, value, but -h works too, ya – updated |
8dcd129
to
1b466f1
Compare
Right, I can definitely see the argument for |
-h sounds good to me - conceptually, I'd imagine that the default output of diff is only maybe one step removed from what we'd want from a --parsable anyway - since it's not really intended for direct human consumption, but ease of processing, all I'd really want on top would be some sort of serialization of the state of the from/to objects whenever it can't print the normal representations (e.g. any time it'd print an error). |
tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_cliargs.ksh
Outdated
Show resolved
Hide resolved
1b466f1
to
7bfd082
Compare
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Found by clang 14 with -Wunused-but-set-variable Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
7bfd082
to
0c5e615
Compare
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Upstream-commit: 344bbc8 Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Upstream-commit: a72129e Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Upstream-commit: 344bbc8 Closes #12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Upstream-commit: a72129e Closes #12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Found by clang 14 with -Wunused-but-set-variable Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Found by clang 14 with -Wunused-but-set-variable Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#12829
Motivation and Context
If I have to write another instance of this
to process stuff like this
one more time just to read a diff I will return to monky, in a big way
Description
The first patch has the -p/NO_MANGLE flags for easy cherry-picking, the rest are NFC and explained in the messages.
Also, nominally, the %o with uint8_t argument should not work on big endian, but there didn't seem to be any tests validating that?
Went with -p for, dunno, printable? but not so sure about it. thots?
How Has This Been Tested?
Ran it. There's a new test, too, which CI will validate hopefully.
Types of changes
Checklist:
Signed-off-by
.