-
Notifications
You must be signed in to change notification settings - Fork 721
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
Fix argument types in jniargtests #14560
Conversation
This commit fixes the argument types from jint to jboolean in some of the JNI functions for jniargtests. Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
jenkins test sanity all jdk11 |
jenkins test sanity amac jdk11 |
You can find the declarations of those native methods in the Java code side here. openj9/test/functional/NativeTest/jniargtests/JniArgTests.java Lines 3699 to 3703 in c0f5771
|
Please ignore the failures with aarch64_mac. I will track them in #14500. |
@llxia : please review or delegate |
all aarch_linux are offline https://openj9-jenkins.osuosl.org/label/ci.role.test&&sw.os.linux&&hw.arch.aarch64/ |
See https://openj9.slack.com/archives/CDS7QE9HB/p1645138685402399 |
I ran jniargtests with this PR on AArch64 Linux locally, and it was successful. |
I also ran sanity.functional on AArch64 Linux as an internal jenkins job: job/Test_openjdk11_j9_sanity.functional_aarch64_linux_Personal/119/ |
This commit fixes the argument types from jint to jboolean in some of the JNI functions for jniargtests. Original PR in master: eclipse-openj9#14560 Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
jenkins test sanity alinux64 jdk11 |
I found the type inconsistency in the JNI arguments was introduced by #4569. By the way, you cannot extend to
@ChengJin01 Do you have any comment about this? |
@knn-k, The fix at #4569 was used to avoid an unexpected bug that converted If the test cases are never verified on macOS/Aarch64, there might be missing code in OpenJ9 to address this situation in the files at https://github.com/eclipse-openj9/openj9/pull/4569/files. In addition, I notice there were only two failing subtests
against the test code at /runtime/tests/jniarg/args_10.c
and /test/functional/NativeTest/jniargtests/JniArgTests.java
My understanding is, if the test doesn't work on macOS/Aarch64, most of test items in these subtests (when conversing from /test/functional/NativeTest/jniargtests/JniArgTests.java
/runtime/tests/jniarg/args_10.c
So I'd suggest to check why other subtests in the test suites still passed on macOS/Aarch64 to understand what really happened to code/tests involved. |
@ChengJin01 The situation is a little bit complicated to describe.
Let's look at the openj9/runtime/tests/jniarg/args_10.c Line 168 in ce1c984
AArch64 macOS uses 8 GPRs for passing integer/pointer arguments. The first two GPRs are occupied by
The bytecode interpreter, however, places When |
Look at
|
Is it better to have this discussion anywhere else? Open a separate issue? |
Is there any problem in fully reverting PR #4569? The original problem with GifImageDecoder has been already fixed in the OpenJDK side. |
Technically there should be no problem if reverting this PR but it won't totally solve the issue and will end up with unexpected behaviours if the conversion from So you could only revert the PR on macOS/Aarch64 for the moment (and disable all the test cases on macOS/Aarch64 as they become useless at this point) while keeping the fix for all other platforms, in which case you might need to come up with a better solution to macOS/Aarch64 if the conversion still occurs on macOS/Aarch64 at that time. |
Thank you for your response, @ChengJin01 . I am canceling this PR, and going to open a new PR. |
I opened Issue #14574 for further discussion on the type conversion. |
I also opened PR #14575 for reverting the type extension change on AArch64 macOS as suggested. |
This commit fixes the argument types from jint to jboolean in some of
the JNI functions for jniargtests.
Signed-off-by: KONNO Kazuhiro konno@jp.ibm.com