RFR (XS) 8217321: [TESTBUG] utilities/test_globalDefinitions.cpp should use _LP64, not LP64
David Holmes
david.holmes at oracle.com
Thu Jan 17 22:12:43 UTC 2019
Hi Aleksey,
When we build hotspot we set LP64 (whereas _LP64 presumably comes from
the compiler). Shouldn't the gtests get compiled with the same flags as
the product code?
Thanks,
David
On 18/01/2019 1:00 am, Aleksey Shipilev wrote:
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8217321
>
> Not sure if we should push it to jdk/jdk12, or just to jdk/jdk, and then backport. I am leaning to
> just jdk/jdk.
>
> Fix:
>
> diff -r 495edb72707a test/hotspot/gtest/utilities/test_globalDefinitions.cpp
> --- a/test/hotspot/gtest/utilities/test_globalDefinitions.cpp Thu Jan 17 15:25:11 2019 +0100
> +++ b/test/hotspot/gtest/utilities/test_globalDefinitions.cpp Thu Jan 17 15:56:06 2019 +0100
> @@ -103,7 +103,7 @@
> EXPECT_STREQ("M", exact_unit_for_byte_size(M));
> EXPECT_STREQ("B", exact_unit_for_byte_size(M + 1));
> EXPECT_STREQ("K", exact_unit_for_byte_size(M + K));
> -#ifdef LP64
> +#ifdef _LP64
> EXPECT_STREQ("B", exact_unit_for_byte_size(G - 1));
> EXPECT_STREQ("G", exact_unit_for_byte_size(G));
> EXPECT_STREQ("B", exact_unit_for_byte_size(G + 1));
> @@ -123,7 +123,7 @@
> EXPECT_EQ(1u, byte_size_in_exact_unit(M));
> EXPECT_EQ(M + 1, byte_size_in_exact_unit(M + 1));
> EXPECT_EQ(K + 1, byte_size_in_exact_unit(M + K));
> -#ifdef LP64
> +#ifdef _LP64
> EXPECT_EQ(G - 1, byte_size_in_exact_unit(G - 1));
> EXPECT_EQ(1u, byte_size_in_exact_unit(G));
> EXPECT_EQ(G + 1, byte_size_in_exact_unit(G + 1));
>
> Testing: gtest on Linux x86_64, jdk-submit (running)
>
> Thanks,
> -Aleksey
>
More information about the hotspot-dev
mailing list