adoptium / adoptium/aqa-tests

Verify some jdk_beans/jdk_imageio test cases are valid against headless builds

Open
#4,358 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
155
Forks
346
Avg merge
2d 9h
Merged PRs (30d)
36

Description

Relating to the Temurin x86-64_alpine-linux builds which are headless, assessing the extended.openjdk failures listed in https://github.com/adoptium/aqa-tests/issues/4254#issuecomment-1399801120

```
jdk_beans failing testcases:
TEST: java/beans/PropertyChangeSupport/Test4682386.java
TEST: java/beans/XMLEncoder/javax_swing_DefaultCellEditor.java
TEST: java/beans/XMLEncoder/javax_swing_JTree.java
TEST: java/beans/XMLEncoder/Test4631471.java
TEST: java/beans/XMLEncoder/Test4903007.java

jdk_imageio:
TEST: javax/imageio/plugins/shared/ImageWriterCompressionTest.java
```

Check whether these tests are actually valid against a headless JDK, and if not, likely need to raise upstream issue to ensure they are filtered off based on options passed to jtreg / vm (see https://github.com/adoptium/aqa-tests/blob/master/openjdk/openjdk.mk#L97-L98). (Do the testcases need the `@modules java.desktop/java.awt:open` annotation added to them? most failing with `java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null`)

```
java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:87)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:75)
at java.desktop/java.awt.Font.getFont2D(Font.java:526)
at java.desktop/java.awt.Font$FontAccessImpl.getFont2D(Font.java:265)
at java.desktop/sun.font.FontUtilities.getFont2D(FontUtilities.java:148)
at java.desktop/sun.java2d.SunGraphics2D.checkFontInfo(SunGraphics2D.java:672)
at java.desktop/sun.java2d.SunGraphics2D.getFontInfo(SunGraphics2D.java:838)
at java.desktop/sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:46)
at java.desktop/sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2932)
at ImageWriterCompressionTest.main(ImageWriterCompressionTest.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:85)
... 16 more
Caused by: java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null
at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:224)
at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:106)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:706)
at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:358)
at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:315)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at java.desktop/sun.font.SunFontManager.(SunFontManager.java:315)
at java.desktop/sun.awt.FcFontManager.(FcFontManager.java:35)
at java.desktop/sun.awt.X11FontManager.(X11FontManager.java:56)
... 22 more
```

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the listed jdk_beans and jdk_imageio test cases and the relevant options in openjdk/openjdk.mk at lines 97-98. Run the tests against the headless Temurin x86-64_alpine-linux build and determine whether each failure is valid; done means filtering invalid cases through jtreg/VM options, adding the mentioned annotations, or raising the required upstream issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.