Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestHeadlessComponents_0_FAILED tar: This does not look like a tar archive #5224

Open
llxia opened this issue Apr 15, 2024 · 10 comments
Open

Comments

@llxia
Copy link
Contributor

llxia commented Apr 15, 2024

internal j9 test build.
related: backlog/issues/1372

[2024-03-02T15:57:33.704Z] + unwrap_file_to_location /Users/jenkins/workspace/Test_openjdk17_j9_dev.functional_aarch64_mac/bootjdkarchive/adoptopenjdk /Users/jenkins/bootjdk
[2024-03-02T15:57:33.704Z] + '[' mac == mac -o mac == linux ']'
[2024-03-02T15:57:33.704Z] + tar --strip-components=1 -xf /Users/jenkins/workspace/Test_openjdk17_j9_dev.functional_aarch64_mac/bootjdkarchive/adoptopenjdk -C /Users/jenkins/bootjdk
[2024-03-02T15:57:33.704Z] tar: This does not look like a tar archive
[2024-03-02T15:57:33.704Z] tar: Exiting with failure status due to previous errors
[2024-03-02T15:57:33.704Z] -----------------------------------
[2024-03-02T15:57:33.704Z] TestHeadlessComponents_0_FAILED

The test passed tar --strip-components=1 on aarch64_mac at Adoptium, but failed at a later stage /Users/admin/bootjdk/Contents/Home/bin/javac: No such file or directory:
https://ci.adoptium.net/job/Test_openjdk17_hs_dev.functional_aarch64_mac/11/console

18:07:25  + '[' mac == mac -o mac == linux ']'
18:07:25  + tar --strip-components=1 -xf /Users/admin/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac/bootjdkarchive/adoptopenjdk -C /Users/admin/bootjdk
18:07:25  + JAVAC_BINARY=/Users/admin/bootjdk/bin/javac
18:07:25  + '[' mac == mac ']'
18:07:25  + JAVAC_BINARY=/Users/admin/bootjdk/Contents/Home/bin/javac
18:07:25  + cp -r /Users/admin/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac/aqa-tests/functional/testHeadlessComponents/TestHeadlessComponents/testHeadlessComponents /Users/admin/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac
18:07:25  + ls /Users/admin/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac
18:07:25  aqa-tests
18:07:25  aqa-tests@tmp
18:07:25  bootjdkarchive
18:07:25  jdkbinary
18:07:25  jvmtest
18:07:25  testHeadlessComponents
18:07:25  + pushd /Users/admin/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac/testHeadlessComponents/jreTestingSwingComponents/src
18:07:25  ~/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac/testHeadlessComponents/jreTestingSwingComponents/src ~/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac/bootjdkarchive
18:07:25  ++ mktemp -d
18:07:25  + cp=/var/folders/fs/0w3t9t1d28xc3bj0tgb8hcrw0000gn/T/tmp.UL5PC9ijmo
18:07:25  ++ find . -type f -name '*.java'
18:07:25  + /Users/admin/bootjdk/Contents/Home/bin/javac ./IncompatibleComponent.java ./JLabelExample.java ./JDialogExample.java ./JButtonExample.java ./JComboBoxExample.java ./MainRunner.java ./JFrameExample.java ./TestArgumentParser.java ./CompatibleComponent.java ./SwingTestUtils.java ./JCheckBoxExample.java ./AbstractComponent.java -d /var/folders/fs/0w3t9t1d28xc3bj0tgb8hcrw0000gn/T/tmp.UL5PC9ijmo
18:07:25  /Users/admin/workspace/workspace/Test_openjdk11_hs_dev.functional_aarch64_mac/aqa-tests/TKG/../functional/testHeadlessComponents/TestHeadlessComponents/testHeadlessComponents.sh: line 189: /Users/admin/bootjdk/Contents/Home/bin/javac: No such file or directory
18:07:25  -----------------------------------
18:07:25  TestHeadlessComponents_0_FAILED
18:07:25  -----------------------------------

The test was added recently: #4875

@llxia
Copy link
Contributor Author

llxia commented May 13, 2024

@andrlos are you able to take a look at this issue? Thanks

@llxia
Copy link
Contributor Author

llxia commented May 13, 2024

@annaibm Please exclude this test for now. Thanks

@annaibm
Copy link
Contributor

annaibm commented May 14, 2024

@llxia Should the test be disabled for all platforms and versions?

@llxia
Copy link
Contributor Author

llxia commented May 14, 2024

I just noticed that this test downloaded hardcoded SDK under /home/jenkins/bootjdk. This hardcoded SDK is used for testing.

curl -OLJks "https://api.adoptopenjdk.net/v3/binary/latest/$OJDK_VERSION_NUMBER/ga/$OS/$ARCH/jdk/hotspot/normal/adoptopenjdk"

https://ci.adoptium.net/job/Test_openjdk17_hs_dev.functional_x86-64_linux/14/console

15:52:35  + curl -OLJks https://api.adoptopenjdk.net/v3/binary/latest/17/ga/linux/x86_64/jdk/hotspot/normal/adoptopenjdk
15:52:37  + rm -rf /home/jenkins/bootjdk
15:52:37  + mkdir -p /home/jenkins/bootjdk
15:52:37  + unwrap_file_to_location /home/jenkins/workspace/Test_openjdk17_hs_dev.functional_x86-64_linux/bootjdkarchive/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz /home/jenkins/bootjdk
15:52:37  + '[' linux == mac -o linux == linux ']'
15:52:37  + tar --strip-components=1 -xf /home/jenkins/workspace/Test_openjdk17_hs_dev.functional_x86-64_linux/bootjdkarchive/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz -C /home/jenkins/bootjdk
15:52:40  + JAVAC_BINARY=/home/jenkins/bootjdk/bin/javac
...
15:52:40  + /home/jenkins/bootjdk/bin/javac ./JComboBoxExample.java ./SwingTestUtils.java ./MainRunner.java ./JButtonExample.java ./TestArgumentParser.java ./JLabelExample.java ./JCheckBoxExample.java ./JFrameExample.java ./CompatibleComponent.java ./AbstractComponent.java ./IncompatibleComponent.java ./JDialogExample.java -d /tmp/tmp.o8BMNu2mp4

https://github.com/rh-openjdk/TestHeadlessComponents/blob/main/testHeadlessComponents.sh#L67-L76

This is wrong as we are not testing the SDK that is produced within the pipeline. And this only tests Temurin latest, no other JVM.

@andrlos Is this intended?

@annaibm Please exclude this test for all platforms and versions for openj9 and ibm for now.
@smlambert I will leave you to decide on Temurin.

annaibm added a commit to annaibm/aqa-tests that referenced this issue May 14, 2024
- Disabled TestHeadlessComponents all platforms, versions on openj9 and ibm.

related: adoptium#5224

Signed-off-by: Anna Babu Palathingal <[email protected]>
annaibm added a commit to annaibm/aqa-tests that referenced this issue May 14, 2024
- Disabled TestHeadlessComponents all platforms, versions on openj9 and ibm.

related: adoptium#5224

Signed-off-by: Anna Babu Palathingal <[email protected]>
@judovana
Copy link
Contributor

I just noticed that this test downloaded hardcoded SDK under /home/jenkins/bootjdk. This hardcoded SDK is used for testing.

curl -OLJks "https://api.adoptopenjdk.net/v3/binary/latest/$OJDK_VERSION_NUMBER/ga/$OS/$ARCH/jdk/hotspot/normal/adoptopenjdk"

https://ci.adoptium.net/job/Test_openjdk17_hs_dev.functional_x86-64_linux/14/console

15:52:35  + curl -OLJks https://api.adoptopenjdk.net/v3/binary/latest/17/ga/linux/x86_64/jdk/hotspot/normal/adoptopenjdk
15:52:37  + rm -rf /home/jenkins/bootjdk
15:52:37  + mkdir -p /home/jenkins/bootjdk
15:52:37  + unwrap_file_to_location /home/jenkins/workspace/Test_openjdk17_hs_dev.functional_x86-64_linux/bootjdkarchive/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz /home/jenkins/bootjdk
15:52:37  + '[' linux == mac -o linux == linux ']'
15:52:37  + tar --strip-components=1 -xf /home/jenkins/workspace/Test_openjdk17_hs_dev.functional_x86-64_linux/bootjdkarchive/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz -C /home/jenkins/bootjdk
15:52:40  + JAVAC_BINARY=/home/jenkins/bootjdk/bin/javac
...
15:52:40  + /home/jenkins/bootjdk/bin/javac ./JComboBoxExample.java ./SwingTestUtils.java ./MainRunner.java ./JButtonExample.java ./TestArgumentParser.java ./JLabelExample.java ./JCheckBoxExample.java ./JFrameExample.java ./CompatibleComponent.java ./AbstractComponent.java ./IncompatibleComponent.java ./JDialogExample.java -d /tmp/tmp.o8BMNu2mp4

https://github.com/rh-openjdk/TestHeadlessComponents/blob/main/testHeadlessComponents.sh#L67-L76

This is wrong as we are not testing the SDK that is produced within the pipeline. And this only tests Temurin latest, no other JVM.

@andrlos Is this intended?

@annaibm Please exclude this test for all platforms and versions for openj9 and ibm for now. @smlambert I will leave you to decide on Temurin.

That assumption is wrong. Unlkess anythign changed, the dowloaded jdk is used to compile cases, not rune them.

Dont forget that it is designed to test headless JRE, which can not have javac....

@judovana
Copy link
Contributor

judovana commented May 14, 2024

Have you found any trace of why the javac is not found? My assumption is yet again readlink -f But I'm really jsut guessing. @andrlos is on educational leave for at least three more weeks.

I recall there were some checks if there javac in tested platform, if there is some 3rd party jdk, and so on. So those check must missbehave on your systems.

@smlambert
Copy link
Contributor

#5084 (comment)

We can update to leverage the USE_JRE parameter which is supposed to test the JRE but use the JDK to compile. In this way we can avoid having the underlying test material pulling in and installing untracked uncached JDKs onto test machines.

@judovana
Copy link
Contributor

Can that wait for @andrlos to get back, or do you want me to look into that?

@smlambert
Copy link
Contributor

It can wait.

annaibm added a commit to annaibm/aqa-tests that referenced this issue May 14, 2024
- Disabled TestHeadlessComponents all platforms, versions on openj9 and ibm.

related: adoptium#5224

Signed-off-by: Anna Babu Palathingal <[email protected]>
LongyuZhang pushed a commit that referenced this issue May 14, 2024
- Disabled TestHeadlessComponents all platforms, versions on openj9 and ibm.

related: #5224

Signed-off-by: Anna Babu Palathingal <[email protected]>
@andrlos
Copy link
Contributor

andrlos commented Jun 26, 2024

andrlos is back! and ready to tackle this.. So basically the idea was really to have a jdk ready for compilation purposes and test only executing with the testJdk.. I have to admit that I can see how clumsy the code is now. I would like to brainstorm a bit how jre test execution is generally handled in adoptium pipeline as we hit probably the very same issue with our jre testing and a generic solution would benefit all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

5 participants