RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings
Aleksey Shipilev
shade at openjdk.java.net
Tue Feb 9 17:58:42 UTC 2021
On Tue, 9 Feb 2021 16:47:14 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Having two `@test` blocks makes the maintenance more difficult. I had to do a diff to find out the difference between the two blocks.
>
> There's an existing test that explicitly tests both `-XX:+CompactStrings` and `-XX:-CompactStrings`. Maybe we can do the same thing?
No, I don't think we can. In other tests, the conflict between `-XX:+CompactStrings` and `-XX:-CompactStrings` would select one of the modes, so both test configurations would degenerate into one config (run twice). In this test, however, the compact strings mode defines whether the affected subtest would pass or fail, because it pokes at the allocation limit. So, we have to sense the actual setting of `CompactStrings` here.
As I said, the alternative would be sensing it programmatically via `WhiteBox`, at expense at single `@test` config, but with `WhiteBox` ceremony.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2355
More information about the core-libs-dev
mailing list