ProblemList for 32-bit VM with 64-bit testrunner.
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Mon Dec 3 16:23:45 UTC 2018
Hi,
I prepared a patch that fixes the issue, see below.
I'm running our tests tonight with this patch in place.
Best regards,
Goetz.
diff -r 0a7e4061e80e -r 754d239c2cd5 src/share/classes/com/sun/javatest/regtest/config/OS.java
--- a/src/share/classes/com/sun/javatest/regtest/config/OS.java Thu Oct 11 16:19:33 2018 +0200
+++ b/src/share/classes/com/sun/javatest/regtest/config/OS.java Mon Dec 03 17:17:25 2018 +0100
@@ -62,9 +62,9 @@
}
public static OS forProps(Properties sysProps) {
- String name = System.getProperty("os.name");
- String arch = System.getProperty("os.arch");
- String version = System.getProperty("os.version");
+ String name = sysProps.getProperty("os.name");
+ String arch = sysProps.getProperty("os.arch");
+ String version = sysProps.getProperty("os.version");
return new OS(
(name == null) ? "unknown" : name,
(arch == null) ? "unknown" : arch,
diff -r 0a7e4061e80e -r 754d239c2cd5 src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java
--- a/src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java Thu Oct 11 16:19:33 2018 +0200
+++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java Mon Dec 03 17:17:25 2018 +0100
@@ -333,8 +333,23 @@
*/
@Override
public CachingTestFilter getExcludeListFilter() {
- // warning: os.arch depends on JVM; it ideally should come from the test jdk
- OS os = OS.current();
+
+ // At least os.arch must match the test jdk. We might test
+ // a 32-bit VM with a harness run on a 64-bit VM.
+ OS os;
+ JDK jdk = getTestJDK();
+ if (jdk != null) {
+ try {
+ os = OS.forProps(jdk.getProperties(this));
+ } catch (JDK.Fault e) {
+ System.out.println("Could not obtain system properties from testjdk." +
+ " Continuing with properties of testrunner:" + e);
+ os = OS.current();
+ }
+ } else {
+ // Testrunner and testee are the same.
+ os = OS.current();
+ }
// On JPRT, we see the following various types of values for these properties
// os.arch amd64
> -----Original Message-----
> From: Lindenmaier, Goetz
> Sent: Montag, 3. Dezember 2018 12:53
> To: 'jtreg-dev at openjdk.java.net' <jtreg-dev at openjdk.java.net>
> Subject: ProblemList for 32-bit VM with 64-bit testrunner.
>
> Hi,
>
>
>
> I have been failing to add tests to our ProblemList to be excluded
>
> when testing our 32-bit windows build.
>
>
>
> Now I figured that the HashSet with the excludePlatforms (in
>
> RegressionParameters.java) is filled with the values of the VM
>
> executing the harness. In my case, this is running on a 64-bit
>
> VM, and we pass the 32-bit VM to be tested with -testjdk.
>
> There also is a comment "warning: os.arch depends on JVM; it ideally
>
> should come from the test jdk"
>
>
>
> Is there already a bug for this? Will this eventually be fixed?
>
> Or is there a common workaround?
>
>
>
> If I put windows-all into the ProblemList, the tests are skipped,
>
> but they are also skipped when testing the 64-bit VM.
>
>
>
> Best regards,
>
> Goetz.
More information about the jtreg-dev
mailing list