RFR: 8321812: Update GC tests to use execute[Limited]TestJava [v3]

Stefan Karlsson stefank at openjdk.org
Wed Jan 3 10:06:05 UTC 2024


On Wed, 3 Jan 2024 08:38:37 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> Stefan Karlsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>> 
>>  - Merge branch 'rename_executeTestJvm' into 8321812_use_executeTestJava_in_gc_tests
>>  - Whitespace fixes
>>    
>>    Co-authored-by: Thomas Schatzl <59967451+tschatzl at users.noreply.github.com>
>>  - 8321812: Update GC tests to use execute[Limited]TestJava
>
> test/hotspot/jtreg/gc/testlibrary/Helpers.java line 105:
> 
>> 103: 
>> 104:         ProcessBuilder pb = new ProcessBuilder(jar.getCommand());
>> 105:         OutputAnalyzer output = ProcessTools.executeProcess(pb);
> 
> The pattern
> 
> OutputAnalyzer output = ProcessTools.executeProcess(jcmd.getCommand());
> 
> is used above, but an explicit `ProcessBuilder` is used here. Maybe one style should be picked?
> 
> `test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java` does something similar to this as well.

I've changed this to skip using an explicit ProcessBuilder. However, that hit a problem that some ProcessTools.executeProcess overloads are declared to throw Throwable instead of Exception. Instead of fixing that inside this PR, or creating a workaround for this, I created a separate, trivial PR to update those functions. Please see #17240. I've merged the branch for that PR into this PR so that we can test the updated changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17067#discussion_r1440268678


More information about the shenandoah-dev mailing list