tools/jimage/JImageExtractTest.java fails with java.io.IOException: "./JImageExtractTest7820094828510119097not_an_image" is not an image file
----------System.out:(13/485)----------
Invoking testExtract
jimage [extract, /sandbox/testJDK/lib/modules]
Invoking testExtractHelp
jimage [extract, --help]
jimage [extract, --help]
Invoking testExtractToDir
jimage [extract, --dir, ./JImageExtractTest6216172566610168749, /sandbox/testJDK/lib/modules]
Invoking testExtractNoImageSpecified
jimage [extract, ]
Invoking testExtractFromDir
jimage [extract, sandbox/testJDK/lib]
Invoking testExtractNotAnImage
jimage [extract, ./JImageExtractTest7820094828510119097not_an_image]
----------System.err:(46/3154)----------
java.io.IOException: "./JImageExtractTest7820094828510119097not_an_image" is not an image file
at java.base/jdk.internal.jimage.BasicImageReader.<init>(BasicImageReader.java:148)
at java.base/jdk.internal.jimage.BasicImageReader.open(BasicImageReader.java:181)
at jdk.jlink/jdk.tools.jimage.JImageTask.iterate(JImageTask.java:392)
at jdk.jlink/jdk.tools.jimage.JImageTask.run(JImageTask.java:441)
at jdk.jlink/jdk.tools.jimage.JImageTask.run(JImageTask.java:237)
at jdk.jlink/jdk.tools.jimage.Main.run(Main.java:48)
at JImageCliTest.jimage(JImageCliTest.java:78)
at JImageExtractTest.testExtractNotAnImage(JImageExtractTest.java:87)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at JImageCliTest.runTests(JImageCliTest.java:111)
at JImageExtractTest.main(JImageExtractTest.java:178)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
at java.base/java.lang.Thread.run(Thread.java:844)
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at JImageCliTest.runTests(JImageCliTest.java:111)
at JImageExtractTest.main(JImageExtractTest.java:178)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.RuntimeException: Output contains error, output=[]
: expected true, was false
at jdk.test.lib.Asserts.fail(Asserts.java:594)
at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
at JImageCliTest$JImageResult.assertShowsError(JImageCliTest.java:96)
at JImageExtractTest.testExtractNotAnImage(JImageExtractTest.java:89)
... 12 more