Openjdk-infrastructure: Ensure AIX test machines are able to run X11 tests

Created on 14 Apr 2020  路  9Comments  路  Source: AdoptOpenJDK/openjdk-infrastructure

Should be possible using Xvfb (Virtual X11 server) from the X11.vfb package, but we need to verify if it's available and working ("working" can be checked on a non-adoptopenjdk machine if needed) as @smlambert reminded me today that we apparently still have the x11 tests disabled.

Possibly a good one for @Haroon-Khel to look into as most people won't have a way of running stuff on AIX systems :-)

Related: https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/211 (macos) and an old general issue on the virtual display topic at https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/267

enhancement

Most helpful comment

Yes, right track for sure. Looks like we need to do some cleanup there... https://github.com/AdoptOpenJDK/openjdk-tests/blob/565191efde062aa5337befdd943611c75aff6d42/buildenv/jenkins/JenkinsfileBase#L541-L576

Both openjdk and jck test groups contain tests that require DISPLAY to be set. In fact, not clear to me why do not merely have an
if ((env.BUILD_LIST.contains('openjdk') || (env.BUILD_LIST.startsWith('jck')){...

or also thinking whether we should just set up the DISPLAY in all cases even if it will not be used (not sure of the overhead of this, doubt its much, and it would reduce complexity of the groovy script).

All 9 comments

Both jdk_awt and jdk_swing tests require DISPLAY to be set.

jdk_awt tests are only running on x86 architectures (and not osx), though I see that jdk_swing tests are only disabled on osx, which means they are running weekly on AIX, and it seems there are issues, example: https://ci.adoptopenjdk.net/view/Test_openjdk_weekly/job/Test_openjdk11_hs_extended.openjdk_ppc64_aix/6/testReport/sanity_client_SwingSet_src_TabbedPaneDemoTest/java/TabbedPaneDemoTest/

I am going to presume that we need to do something different then we do currently. Jenkins xvfb plugin likely is not working to setup the display on AIX, or at least we should try to run the plugin for that platform and see what happens, it currently is only invoked for linux x86 platform (https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L395).

jdk_awt tests are only running on x86 architectures (and not osx

Hmmm to clarify - they aren't running on the other LInux architectures then (ppcle/ss390x/aarch64/armv7l)? Is that our choice?

Should be possible using Xvfb (Virtual X11 server) from the X11.vfb package, but we need to verify if it's available and working ("working" can be checked on a non-adoptopenjdk machine if needed)

Ive managed to run some X11 tests on an aix machine with X11.vfb installed. The tests passed, so this confirms that its available and working

@smlambert please correct me if im wrong but, according to https://github.com/AdoptOpenJDK/openjdk-tests/blob/565191efde062aa5337befdd943611c75aff6d42/buildenv/jenkins/JenkinsfileBase#L566, It seems that for AIX machines, only if the BUILD_LIST includes jck will an X11 server start and the DISPLAY variable be set. This needs to be changed to include for when the BUILD_LIST includes openjdk, as the jdk_awt and jdk_swing tests are part of that BUILD_LIST.

Am I on the right track here? If so, ill put in a pr to fix this

Yes, right track for sure. Looks like we need to do some cleanup there... https://github.com/AdoptOpenJDK/openjdk-tests/blob/565191efde062aa5337befdd943611c75aff6d42/buildenv/jenkins/JenkinsfileBase#L541-L576

Both openjdk and jck test groups contain tests that require DISPLAY to be set. In fact, not clear to me why do not merely have an
if ((env.BUILD_LIST.contains('openjdk') || (env.BUILD_LIST.startsWith('jck')){...

or also thinking whether we should just set up the DISPLAY in all cases even if it will not be used (not sure of the overhead of this, doubt its much, and it would reduce complexity of the groovy script).

The overhead of starting up a virtual X server shouldn't be much at all - a few seconds at most. Assuming it would be started/stopped once per job (as opposed to for each individual test!) that might not be a problem. I'd only be concerned about whether we make it harder for anyone else running our test scripts to run the tests if they don't have the virtual server up - if it just fails the tests then I'd say that's perfectly acceptable :-)

Yes, that is the behaviour if no virtual server is up, tests fail (with error msg that says failed to set x11 display... or something similar).

@Haroon-Khel has a good start on a PR to address this, just need to debug the breakage of the linux story (which should be something fairly straight-forward).

Ive made some final changes on that pr. I kicked off grinders, running both jdk_awt and jdk_swing, on linux and aix. All tests run without any previously occuring DISPLAY error, which is great, depsite not all of the tests passing.
Grinders:
Linux: jdk_awt, jdk_swing
Aix: jdk_awt, jdk_swing

Are there any further tests that should be run?

Sounds good - feel free to close this :-)

Was this page helpful?
0 / 5 - 0 ratings