Description
This test is new with the changes for JDK-8165736. It looks like it always will fail on Windows:
---------------- stdout ----------------
32164:
_Agent_OnAttach@12 is not available in C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk10-hs.384\\windows-x64-debug.test\\hotspot\\jtreg\\native\\HasNoEntryPoint.dll
---------------- stderr ----------------
----------------------------------------
test AttachFailedTestBase.cli(): failure
java.lang.RuntimeException: java.lang.RuntimeException: 'Agent_OnAttach is not available' missing from stdout/stderr ```
We have a mismatch with what we expect the missing exported symbol to be called on Windows.
For Windows we have:
#define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12",
"Agent_OnAttach"}
And For linux we have:
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
And then shared code is:
const char *on_attach_symbols[] = AGENT_ONATTACH_SYMBOLS;
st->print_cr("%s is not available in %s",
on_attach_symbols[0], agent_lib->name());
And the test has:
output.shouldContain("Agent_OnAttach is not available");
So on Windows we will always print out _Agent_OnAttach@12 for the missing symbol instead of Agent_OnAttach, which is what the test is looking for. The test should either check for both symbols or use a pattern that will capture both symbols.
---------------- stdout ----------------
32164:
_Agent_OnAttach@12 is not available in C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk10-hs.384\\windows-x64-debug.test\\hotspot\\jtreg\\native\\HasNoEntryPoint.dll
---------------- stderr ----------------
----------------------------------------
test AttachFailedTestBase.cli(): failure
java.lang.RuntimeException: java.lang.RuntimeException: 'Agent_OnAttach is not available' missing from stdout/stderr ```
We have a mismatch with what we expect the missing exported symbol to be called on Windows.
For Windows we have:
#define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12",
"Agent_OnAttach"}
And For linux we have:
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
And then shared code is:
const char *on_attach_symbols[] = AGENT_ONATTACH_SYMBOLS;
st->print_cr("%s is not available in %s",
on_attach_symbols[0], agent_lib->name());
And the test has:
output.shouldContain("Agent_OnAttach is not available");
So on Windows we will always print out _Agent_OnAttach@12 for the missing symbol instead of Agent_OnAttach, which is what the test is looking for. The test should either check for both symbols or use a pattern that will capture both symbols.
Attachments
Issue Links
- relates to
-
JDK-8165736 Error message should be shown when JVMTI agent cannot be attached
-
- Resolved
-