On Wed, 19 Feb 2025 03:21:37 GMT, SendaoYan <s...@openjdk.org> wrote:

>> Hi all,
>> 
>> Several JMH tests fails 'Cannot invoke "java.io.InputStream.available()" 
>> because "is" is null', because the file 
>> 'build/linux-x86_64-server-release/images/test/micro/benchmarks.jar' missing 
>> the required xml input file defined by 
>> test/micro/org/openjdk/bench/javax/xml/AbstractXMLMicro.java. This PR copy 
>> the required xml file to benchmarks.jar, and remove two unexist xml input 
>> file.
>> 
>> After this PR, below JMH tests will run passes.
>> 
>> 
>> org.openjdk.bench.javax.xml.DOM.testBuild
>> org.openjdk.bench.javax.xml.DOM.testModify
>> org.openjdk.bench.javax.xml.DOM.testWalk
>> org.openjdk.bench.javax.xml.SAXUsingJDK.testParse
>> org.openjdk.bench.javax.xml.STAX.testParse
>> 
>> 
>> Test command:
>> 
>> 
>> rm -rf build/jmh-result/ ; mkdir -p build/jmh-result/ ; time for test in 
>> `cat list.txt` ; do time make test TEST="micro:$test" 
>> MICRO="FORK=1;WARMUP_ITER=2" CONF=release &> build/jmh-result/$test.log ; 
>> done
>> 
>> 
>> Change has been verified locally, no risk.
>
> SendaoYan has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Use SetupCopyFiles macro to copy the dependency files

The issue here looks like an oversight (of mine) in the migration from the 
standalone JMH repo. There we simply held a copy of the needed XML files, e.g. 
https://github.com/openjdk/jmh-jdk-microbenchmarks/blob/master/micros-jdk8/src/main/resources/org/openjdk/bench/javax/xml/msgAttach.xml

As we're now in-tree I guess it makes sense to copy these over at build time as 
per this fix - though it creates an undocumented dependency. If anyone changes 
these tests on the functional side we'd silently break. Perhaps needs a unit 
test to guard and document the dependency?

Taking a step back: If these particular micros have all been broken since JEP 
230 was integrated in JDK 12 and no-one noticed until now - maybe they aren't 
really worth their weight and should instead be removed?

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

PR Comment: https://git.openjdk.org/jdk/pull/23625#issuecomment-2667518427

Reply via email to