Skip to content

Commit 1d7b4b5

Browse files
author
duke
committed
Backport 98e1d2fab123befa78342ba53b76a560dddd6385
1 parent efa1f8e commit 1d7b4b5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/hotspot/gtest/runtime/test_os.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,16 +808,24 @@ TEST_VM(os, dll_address_to_function_and_library_name) {
808808
LOG("shorten_paths=%d, demangle=%d, strip_arguments=%d, provide_scratch_buffer=%d",
809809
shorten_paths, demangle, strip_arguments, provide_scratch_buffer);
810810

811-
// Should show os::min_page_size in libjvm
811+
// Should show Threads::create_vm in libjvm
812812
addr = CAST_FROM_FN_PTR(address, Threads::create_vm);
813813
st.reset();
814814
EXPECT_TRUE(os::print_function_and_library_name(&st, addr,
815815
provide_scratch_buffer ? tmp : nullptr,
816816
sizeof(tmp),
817817
shorten_paths, demangle,
818818
strip_arguments));
819+
820+
#ifdef _WINDOWS
821+
// On Windows, if no full .pdb file is available, the output can be something like "0x... in ..."
822+
if (strncmp(output, "0x", 2) != 0) {
823+
#endif
819824
EXPECT_CONTAINS(output, "Threads");
820825
EXPECT_CONTAINS(output, "create_vm");
826+
#ifdef _WINDOWS
827+
}
828+
#endif
821829
EXPECT_CONTAINS(output, "jvm"); // "jvm.dll" or "libjvm.so" or similar
822830
LOG("%s", output);
823831

0 commit comments

Comments
 (0)