Integrated: JDK-8302810: NMT gtests don't correctly check for marked ranges
Thomas Stuefe
stuefe at openjdk.org
Fri Feb 24 08:02:13 UTC 2023
On Sat, 18 Feb 2023 06:25:00 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> We have the helper functions `GtestUtils::mark_range` and `GtestUtils::check_range`. One fills a range with a byte pattern, and the other checks that range.
>
> The latter does not assert - it just returns a boolean value. But its name implies it does, in fact, assert (as similar check_... functions in hotspot).
>
> It is used without ASSERT_TRUE or EXPECT_TRUE in several places, which makes these tests ignore errors. This caused https://bugs.openjdk.org/browse/JDK-8302811 to be hidden.
>
> ----
>
> Patch adds the necessary assertions (EXPECT_, in this case, since its used in a non-void subfunction).
>
> It also renames `GtestUtils::check_range` to `GtestUtils::is_range_checked`, which more clearly indicates that it returns a boolean value and won't assert on itself.
This pull request has now been integrated.
Changeset: 8f7c4969
Author: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/8f7c4969c28c58ae4b9adeed822707b28be16dd0
Stats: 18 lines in 3 files changed: 2 ins; 0 del; 16 mod
8302810: NMT gtests don't correctly check for marked ranges
Reviewed-by: gziemski, dholmes
-------------
PR: https://git.openjdk.org/jdk/pull/12629
More information about the hotspot-runtime-dev
mailing list