-
Notifications
You must be signed in to change notification settings - Fork 175
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
Improve tracing and assertion messages for reftests #1211
Conversation
Signed-off-by: Daniel Carl Jones <[email protected]>
assert!(keys.remove(name)); | ||
assert!( | ||
keys.remove(name), | ||
"file name must be in the set of child names in the reference fs", |
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.
Two nits:
- Maybe include the name if the file (or directory) in the message.
- Should we keep the file naming, even though this can also be a directory? We do the same on L679, so we could leave it.
"file name must be in the set of child names in the reference fs", | |
"file {name} name must be in the set of child names in the reference fs", |
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.
Including the name sounds good! I have some other changes, they're a bit more involved so I won't work on it immediately but I'll include this in those.
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.
I'll take a look at the file versus directory stuff too, I'd like to make it as accurate as possible - including specifying them as "directory entries" if its not one or the other.
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.
Thanks! Especially the scoped tracing seems really useful with always knowing which operation is currently executed. I had a small comment about one error message, apart from that it LGTM.
This change adds some additional tracing to reftests and makes some adjustments to assertion messages to make it clearer why we assert what we assert and would return a better message when things go wrong.
There are no significant changes, this is primarily readability and debugging improvements.
Does this change impact existing behavior?
No change to behavior of Mountpoint or its libraries.
Does this change need a changelog entry?
No, no behavior change.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).