aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

TestHeadlessComponents_0_FAILED tar: This does not look like a tar archive

Open llxia opened this issue 10 months ago • 10 comments

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: https://github.com/adoptium/aqa-tests/issues/4875

llxia avatar Apr 15 '24 18:04 llxia

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

llxia avatar May 13 '24 21:05 llxia

@annaibm Please exclude this test for now. Thanks

llxia avatar May 13 '24 21:05 llxia

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

annaibm avatar May 14 '24 13:05 annaibm

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.

llxia avatar May 14 '24 13:05 llxia

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 avatar May 14 '24 15:05 judovana

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.

judovana avatar May 14 '24 15:05 judovana

https://github.com/adoptium/aqa-tests/pull/5084#discussion_r1499723551

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.

smlambert avatar May 14 '24 15:05 smlambert

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

judovana avatar May 14 '24 15:05 judovana

It can wait.

smlambert avatar May 14 '24 15:05 smlambert

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

andrlos avatar Jun 26 '24 13:06 andrlos