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
8274039: codestrings gtest fails when hsdis is present #5606
Conversation
|
@phedlin The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Disassembly diff is only used/attempted when hsdis is available, e.g. through LD_LIBRARY_PATH, but the approach is rather brittle. Same issue should be expected on other platforms (in particular platforms I do not have access to). Should the test-case ifdef on known platforms? |
Webrevs
|
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.
This fixes the test failure for my x86_64. Since this is a test bug, I think it is fine to add more platform-specific fixes as needed.
Alternatively, we might want to compare that the disassembly prefixes are the same?
// Padding: aarch64 | ||
std::basic_string<char> tmp2 = std::regex_replace(tmp1, std::regex("\\s+<addr>:\\s+\\.inst\\t<addr> ; undefined"), ""); | ||
// Padding: x64 | ||
std::basic_string<char> red = std::regex_replace(tmp2, std::regex(" <addr>: hlt \\n"), ""); |
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.
Can we do \\s+
here as well, like in aarch64
case? Pretty sure this whitespace can be subtly different.
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.
We could (and I did start in that end) but I decided to be as specific as possible since the pattern is such a "plain" one (unlike the pattern for aarch64 which is more distinct). But you do have a point of course. I will update the regexp to:
std::regex("[ \\t]+<addr>:\\s+hlt\\s+\\n(?!\\s+;;)")
Using \\s
is perhaps a bit sloppy when only TAB and SPC are intended but does little harm.
@phedlin This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 16 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
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.
Not sure why the first group is [ \\t]+
in x86_64 match, but it still works on my machine.
Just in order not to eat the last "\n" before the padded output (newlines are consumed at the end of the pattern). If you think consuming the newlines in the prefix is better (more obvious or just in line with the aarch64 pattern) we can use:
|
Alternative pattern. (Just trying the "in review" editing work-flow.)
This works on my machine too. But honestly, I don't care. Just pick one of these variants and unbreak the |
Thanks for reviewing. |
Going to push as commit c9de806.
Your commit was automatically rebased without conflicts. |
@phedlin Pushed as commit c9de806. |
Please review this change to the (g)test-case "codestrings".
Adding missing regexp pattern to remove trailing hsdis printout due to padding on x64.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5606/head:pull/5606
$ git checkout pull/5606
Update a local copy of the PR:
$ git checkout pull/5606
$ git pull https://git.openjdk.java.net/jdk pull/5606/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5606
View PR using the GUI difftool:
$ git pr show -t 5606
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5606.diff