RFR: 8274039: codestrings gtest fails when hsdis is present

Aleksey Shipilev shade at openjdk.java.net
Tue Sep 21 14:01:38 UTC 2021


On Tue, 21 Sep 2021 11:29:49 GMT, Patric Hedlin <phedlin at openjdk.org> wrote:

> Please review this change to the (g)test-case "codestrings".
> 
> Adding missing regexp pattern to remove trailing **hsdis** printout due to padding on x64.

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?

test/hotspot/gtest/code/test_codestrings.cpp line 46:

> 44:     std::basic_string<char> tmp2 = std::regex_replace(tmp1, std::regex("\\s+<addr>:\\s+\\.inst\\t<addr> ; undefined"), "");
> 45:     // Padding: x64
> 46:     std::basic_string<char> red  = std::regex_replace(tmp2, std::regex("  <addr>:   hlt    \\n"), "");

Can we do `\\s+` here as well, like in `aarch64` case? Pretty sure this whitespace can be subtly different.

-------------

Marked as reviewed by shade (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5606


More information about the hotspot-compiler-dev mailing list