-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[llvm-gsymutil] Fix flaky test #123814
Merged
Merged
[llvm-gsymutil] Fix flaky test #123814
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hopefully we can eventually use
[[#@LINE+N]]
and--leading-lines
to test these line numbers. Also, where does the/tmp/tst
file path prefix come from?https://llvm.org/docs/TestingGuide.html#extra-files
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.
Both the paths and line numbers come from
merged_callsites.dSYM.yaml
- which is binary encoded. So the input is hard-coded in binary format effectively.[[#@LINE+N]]
won't work in this case - we can update the lines in the test but the line numbers to test won't change.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.
Yes, but presumably those line numbers come from
merged_funcs_test.cpp
? Then we can in fact use the[[#@LINE+N]]
trick if we make sure to use--leading-lines
. We may have to regenerate the files so they are correct, though.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.
And if we move
#--- merged_funcs_test.cpp
towards the beginning of the file it makes it less likely that the line numbers will change when we update the test.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 see - one issue is that this test isn't really easily manually updatable because of hardcoded values in
callsites.yaml
. So using[[#@LINE+N]]
we could have that part auto-match but we still have to manually editcallsites.yaml
.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 don't see any line numbers in
callsites.yaml
. What would you have to update? Is there anyway it could be generated?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.
The
callsites.yaml
hasreturn_offset: [0x10]
which is a binary offset of a callsite into the function. There's no way to generate this right now - it's supposed to be test data generated from looking at the binary.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.
So it sounds like
callsites.yaml
needs to be changed every time we regenerate the input files, which seems to be an orthogonal problem to using@LINE+N
.