-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Remove IBM-1047 export option and generate makefiles in IBM-1047 encoding for JDK21 on z/OS #608
base: master
Are you sure you want to change the base?
Conversation
f72613c
to
9162d92
Compare
52df309
to
3ed7f0a
Compare
Verification runs on sanity.functional JDK21 JDK17 LinuxPPCLe - Grinder_CR/27674/ JDK11 |
@llxia Could you please review this PR. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PP does not only revert IBM_JAVA_OPTIONS="-Dfile.encoding=IBM-1047"
, it sets JVM_OPTIONS=-Dfile.encoding=IBM-1047
in makefile. If this option isn't required anymore. JDK21 z/OS latest builds works fine without any options.
, then we do not need to set JVM_OPTIONS=-Dfile.encoding=IBM-1047
The reason we're setting JVM_OPTIONS here, EnvDetector creates autoGenEnv.mk file for 21 it's in UTF-8. Hence added this JVM_OPTIONS. I'll remove this settings in makefile and will add check for 21 in EnvDetector.java itself. |
a43e10d
to
2a548c1
Compare
This PR seems to be actively being updated. Is it ready for review? If not, please move it to draft. |
8cb3d2f
to
8ee1faa
Compare
Removed JVM_OPTIONS from makefile and added Charset.forName("IBM-1047") to create autoGenEnv.mk in ebcdic for JDK21+ on z/OS. Verification zLinux 21 - Grinder_CR/27876 @llxia Could please review the changes. Thank you. |
src/org/testKitGen/MkGen.java
Outdated
|
||
public Writer getWriterObject(String filetype) { | ||
try { | ||
if (arg.getSpec().toLowerCase().contains("zos") && (arg.getJdkVersion().matches("2\\d"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This regex does not work if we have a Java version 30+.
src/org/testKitGen/UtilsGen.java
Outdated
private String utilsMk; | ||
private String rerunMk; | ||
private List<String> ignoreOnRerunList; | ||
|
||
public UtilsGen(Arguments arg, ModesDictionary md, List<String> ignoreOnRerunList) { | ||
this.arg = arg; | ||
this.md = md; | ||
this.mg = new MkGen(arg, null, null, rerunMk, ignoreOnRerunList, ignoreOnRerunList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
It doesn't seem right to initialize
MkGen
solely to usegetWriterObject()
inMkGen.java
, especially when it involves setting fake parameters inMkGen
. -
getWriterObject()
should be a utility function that can be utilized by all files, includingEnvDetector.java
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this.mg = new MkGen(arg, null, null, rerunMk, ignoreOnRerunList, ignoreOnRerunList);
. It is not used.
@@ -98,7 +98,7 @@ private void parseInvalidSpec(Element modes) throws IOException { | |||
ArrayList<String> specs = new ArrayList<String>(); | |||
int lineNum = 0; | |||
BufferedReader reader = null; | |||
if (arg.getSpec().toLowerCase().contains("zos")) { | |||
if (arg.getSpec().toLowerCase().contains("zos") && !(arg.getJdkVersion().matches("2\\d"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. This regex does not work if we have a Java version 30+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has not been addressed
Modified scripts as suggested. Verification jobs JDK21 z/OS - Grinder_CR/27949/ |
src/org/openj9/envInfo/Utility.java
Outdated
|
||
public static Writer writer; | ||
|
||
public static Writer getWriterObject(String jdkVersion, String SpecInfo, String filetype) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- jdkVersion should be
int
, not String. filetype
->fileName
src/org/testKitGen/UtilsGen.java
Outdated
import java.util.List; | ||
|
||
import org.openj9.envInfo.Utility;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra ;
@@ -98,7 +98,7 @@ private void parseInvalidSpec(Element modes) throws IOException { | |||
ArrayList<String> specs = new ArrayList<String>(); | |||
int lineNum = 0; | |||
BufferedReader reader = null; | |||
if (arg.getSpec().toLowerCase().contains("zos")) { | |||
if (arg.getSpec().toLowerCase().contains("zos") && !(arg.getJdkVersion().matches("2\\d"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has not been addressed
src/org/testKitGen/UtilsGen.java
Outdated
private String utilsMk; | ||
private String rerunMk; | ||
private List<String> ignoreOnRerunList; | ||
|
||
public UtilsGen(Arguments arg, ModesDictionary md, List<String> ignoreOnRerunList) { | ||
this.arg = arg; | ||
this.md = md; | ||
this.mg = new MkGen(arg, null, null, rerunMk, ignoreOnRerunList, ignoreOnRerunList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this.mg = new MkGen(arg, null, null, rerunMk, ignoreOnRerunList, ignoreOnRerunList);
. It is not used.
src/org/testKitGen/UtilsGen.java
Outdated
@@ -40,7 +44,7 @@ public void generateFiles() { | |||
} | |||
|
|||
private void generateUtil() { | |||
try (FileWriter f = new FileWriter(utilsMk)) { | |||
try (Writer f = Utility.getWriterObject(arg.getJdkVersion(), arg.getSpec(), utilsMk)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JDK_VERSION is an optional parameter. Please ensure this works if the user does not set JDK_VERSION.
0cf4b62
to
0ae6dd7
Compare
… for JDK21+ on z/OS Signed-off-by: Pasam Soujanya <[email protected]>
0ae6dd7
to
137cecf
Compare
@llxia Could you please review the changes. Thank you. |
@@ -98,7 +98,7 @@ private void parseInvalidSpec(Element modes) throws IOException { | |||
ArrayList<String> specs = new ArrayList<String>(); | |||
int lineNum = 0; | |||
BufferedReader reader = null; | |||
if (arg.getSpec().toLowerCase().contains("zos")) { | |||
if (arg.getSpec().toLowerCase().contains("zos") && !(arg.getJdkVersion().matches("[2-9][0-9]"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arg.getJdkVersion()
is still used. Please ensure #608 (comment) is addressed.
@psoujany Could you please clarify the purpose of this PR? Based on my observation, the zos JDK21 sanity.functional test build appears to be fine without this PR. |
The main intention of this PR is to run JDK21 tests without using |
Thanks @psoujany. Some of the Grinder link expired. Could you rerun a non-zos Grinder? Thanks |
Submitted 11/17/21 jobs on non-z/OS. |
Grinder zos using AQA master branch failed. Is there a related change in AQA repo? |
@llxia yes, we need to address this issue in AQA. For time being can we fix encoding of jars using .gitattributes? For verification I've used my fork with the change for z/OS. Please let me know if we can fix .gitattributes so that I can raise PR for that as well. Thank you. |
We need to ensure that the |
Raised a PR with the .gitattributes change adoptium/aqa-tests#5833. |
This PR reverts below commit which exports
IBM_JAVA_OPTIONS to IBM-1047
, as this option isn't required anymore. JDK21 z/OS latest builds works fine without any options.psoujany@28c7f76
defaultCharset of Java21 is UTF-8, TKG scripts which are generating makefiles like utils.mk, rerun.mk are getting created in UTF for 21 on z/OS causing encoding issues. Hence, changing scripts to forcefully create these makefiles in
Charset.forName("IBM-1047")
only for 21 on z/OS.