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

tools/javah/ReadOldClass.sh and serviceability/dcmd/DynLibDcmdTest.java fail on AIX #5854

Open
Haroon-Khel opened this issue Jan 14, 2025 · 1 comment

Comments

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Jan 14, 2025

https://ci.adoptium.net/job/Test_openjdk8_hs_sanity.openjdk_ppc64_aix_testList_0/19/tapResults/

langtools_all_0

Failed test cases: 
TEST: tools/javah/ReadOldClass.sh
Test results: passed: 3,120; failed: 1

This test fails on AIX
Logs:

19:53:12  STDOUT:
19:53:12  Unrecognized system!
19:53:12  STDERR:
19:53:12  rerun:

Looking at the test code:

https://github.com/adoptium/jdk8u/blob/1a6e3a5ea32d5c671cb46a590046f16426089921/langtools/test/tools/javah/ReadOldClass.sh#L31

# set platform-dependent variables
OS=`uname -s`
case "$OS" in
  SunOS | Linux | Darwin | CYGWIN* )
    PS=":"
    FS="/"
    ;;
  Windows* )
    PS=";"
    FS="\\"
    ;;
  * )
    echo "Unrecognized system!"
    exit 1;
    ;;
esac

uname -s returns AIX on aix machines, so this test is expected to fail on AIX. Should be excluded for JDK8 (only present on JDK8)

@Haroon-Khel Haroon-Khel moved this to In Progress in 2025 1Q Adoptium Plan Jan 14, 2025
@Haroon-Khel Haroon-Khel changed the title tools/javah/ReadOldClass.sh fails on AIX tools/javah/ReadOldClass.sh and serviceability/dcmd/DynLibDcmdTest.java fail on AIX Jan 14, 2025
@Haroon-Khel
Copy link
Contributor Author

Adding serviceability/dcmd/DynLibDcmdTest.java to this issue. Looking at the code, it fails if run on AIX
https://github.com/adoptium/jdk8u/blob/1a6e3a5ea32d5c671cb46a590046f16426089921/hotspot/test/serviceability/dcmd/DynLibDcmdTest.java#L4

        String osDependentBaseString = null;
        if (Platform.isSolaris()) {
            osDependentBaseString = "lib%s.so";
        } else if (Platform.isWindows()) {
            osDependentBaseString = "%s.dll";
        } else if (Platform.isOSX()) {
            osDependentBaseString = "lib%s.dylib";
        } else if (Platform.isLinux()) {
            osDependentBaseString = "lib%s.so";
        }

        if (osDependentBaseString == null) {
            throw new Exception("Unsupported OS");
        }

This is what we are seeing in our logs:

https://ci.adoptium.net/job/Test_openjdk8_hs_extended.openjdk_ppc64_aix_testList_0/20/testReport/serviceability_dcmd_DynLibDcmdTest/java/DynLibDcmdTest/

java.lang.Exception: Unsupported OS
	at DynLibDcmdTest.main(DynLibDcmdTest.java:53)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.lang.Thread.run(Thread.java:750)

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

No branches or pull requests

1 participant