RFR: 8321931: memory_swap_current_in_bytes reports 0 as "unlimited" [v5]

Severin Gehwolf sgehwolf at openjdk.org
Mon Jan 22 20:37:30 UTC 2024


On Mon, 22 Jan 2024 17:13:10 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

> This bug fix is correcting the behavior where `0` should be displayed instead of `unlimited`. Strictly speaking that's all we need to test here. The test I proposed uses an approach that is flexible enough in case that this value happens to be greater than `0` in the future for any reason.

I disagree. What you are looking for is if the actual value is `0` you want `memory_swap_current_in_bytes` to report `0`. The test you have might end up running with any number `> 0` in the interface file, and your test would spuriously pass even with the actual bug present (since `unlimited` would not occur in this case). The only way to actually ensure you get `0` is by running the test in a container with swap turned off.

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

PR Comment: https://git.openjdk.org/jdk/pull/17314#issuecomment-1904761120


More information about the hotspot-runtime-dev mailing list