RFR: 8266088: compiler/arguments/TestPrintOptoAssemblyLineNumbers test should user driver mode

Igor Ignatyev iignatyev at openjdk.java.net
Tue Apr 27 20:26:39 UTC 2021

On Tue, 27 Apr 2021 19:54:02 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

> Hi all,
> could you please review this tiny patch for `TestPrintOptoAssemblyLineNumbers` test? 
> from JBS:
>> compiler/arguments/TestPrintOptoAssemblyLineNumbers class is a driver class that spawns a new JVM and validates its output, there is no need for the JVM which executes TestPrintOptoAssemblyLineNumbers to be run w/ all vm flags.
> besides addressing this, the patch also removes `/compiler/patches` from `@library` as it's not needed and fixes code style here and there.
> testing:
> - [x] `compiler/arguments/TestPrintOptoAssemblyLineNumbers` on `{linux,windows,macosx}-x64-debug`
> Thanks,
> -- Igor

staring more at this test, I've noticed a few other things which should be improved:
 - the test didn't use `OutputAnaluzer::*should*` method to check that the output contains the desired line. so in case of failure, we won't have all information about the subprocess
 - it didn't check the subprocess' exit code
 - the file is sensitive to line numbers but didn't have the comment which we use to mark and track such files


PR: https://git.openjdk.java.net/jdk/pull/3726

More information about the hotspot-compiler-dev mailing list