RFR: 8213226: [TESTBUG] Reduce the usage of CDSTestUtils.executeAndLog()
Calvin Cheung
ccheung at openjdk.java.net
Fri Jan 29 23:40:41 UTC 2021
On Fri, 29 Jan 2021 22:36:45 GMT, Yumin Qi <minqi at openjdk.org> wrote:
>> Please review this CDS tests cleanup for reducing the usage of `CDSTestUtils.executeAndLog()` by making use of `CDSTestUtils.run()`, `CDSTestUtils.createArchiveAndCheck()`, etc.
>>
>> Testing: tiers 1 - 4.
>
> test/hotspot/jtreg/runtime/cds/SharedStrings.java line 59:
>
>> 57: // Set CDSOptions.xShareMode to "off" so that the result checking
>> 58: // would not always expect the word "sharing" in the output.
>> 59: .setXShareMode("off")
>
> According to CDSTestUtils.runWithArchive:
> for (String p : opts.prefix) cmd.add(p);
>
> cmd.add("-Xshare:" + opts.xShareMode);
> The -Xshare::off will be the last one for share mode setting, so this test will be always with shared mode off? Unless the suffix include share setting to change that.
I took a look at some old test log of this test and noticed although the following was set:
`-Dtest.java.opts='-Xshare:off -showversion'`
The options were never included in the command line because the `executeAndLog` was used.
There's also the following comment in SharedStrings.java:
// Note: This is a basic sanity test for Shared Strings feature.
// This also serves as a reference on how to use this feature,
// hence the command lines are spelled out instead of using the
// test utils methods.
I'm proposing revert the change of this file.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2297
More information about the hotspot-runtime-dev
mailing list