RFR: 8352617: IR framework test TestCompileCommandFileWriter.java runs TestCompilePhaseCollector instead of itself
Christian Hagedorn
chagedorn at openjdk.org
Wed Mar 26 09:41:27 UTC 2025
On Wed, 26 Mar 2025 08:50:32 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> Simply changing the path in `@run` was not enough (see JBS for details). And actually, the test wasn't doing anything before trying to open an output file to check the result. From various hints, I completed the test: I hope it was the intent!
>>
>> I think @chhagedorn's eye would be the most relevant.
>>
>> Thanks,
>> Marc
>
> test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/flag/TestCompileCommandFileWriter.java line 85:
>
>> 83: private void check(Class<?> testClass, boolean findIdeal, boolean findOpto, CompilePhase... compilePhases) throws IOException {
>> 84: var compilerDirectivesFlagBuilder = new CompilerDirectivesFlagBuilder(testClass);
>> 85: compilerDirectivesFlagBuilder.build();
>
> I was tempted to write
>
> new CompilerDirectivesFlagBuilder(testClass).build();
>
> since we don't use `compilerDirectivesFlagBuilder` after. But I felt like the style might not be liked. Opinions on that?
I guess it's fine to go with `new CompilerDirectivesFlagBuilder(testClass).build()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24240#discussion_r2013723724
More information about the hotspot-compiler-dev
mailing list