Skip to content
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

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

dannycjones
Copy link
Contributor

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).

@dannycjones dannycjones requested a review from c-hagem January 7, 2025 13:50
@dannycjones dannycjones temporarily deployed to PR integration tests January 7, 2025 13:50 — with GitHub Actions Inactive
@dannycjones dannycjones enabled auto-merge January 7, 2025 13:50
@dannycjones dannycjones temporarily deployed to PR integration tests January 7, 2025 13:50 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 7, 2025 13:50 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 7, 2025 13:50 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 7, 2025 13:50 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 7, 2025 13:50 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 7, 2025 13:50 — with GitHub Actions Inactive
assert!(keys.remove(name));
assert!(
keys.remove(name),
"file name must be in the set of child names in the reference fs",
Copy link
Contributor

@c-hagem c-hagem Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two nits:

  1. Maybe include the name if the file (or directory) in the message.
  2. 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.
Suggested change
"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",

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@c-hagem c-hagem left a 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.

@dannycjones dannycjones added this pull request to the merge queue Jan 7, 2025
Merged via the queue into awslabs:main with commit 866ee1c Jan 7, 2025
24 checks passed
@dannycjones dannycjones deleted the minor-reftest-updates branch January 7, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants