diff --git a/TEST.ROOT b/TEST.ROOT index e69de29..3280f7a 100644 --- a/TEST.ROOT +++ b/TEST.ROOT @@ -0,0 +1,7 @@ +maxOutputSize=1000000 +# there may be tests, whcih absence/presence is quite healthy to be set up in runtime +# those are controlled by environemnt variables. Eg RH_JDK=true will enable few additional tests +# which are known to pass on RH builds, but not on any others +requires.extraPropDefns = tests/VarDeps.java +requires.properties = \ + var.rh.jdk diff --git a/test/TEST.ROOT b/test/TEST.ROOT index cecf742..5dd4073 100644 --- a/test/TEST.ROOT +++ b/test/TEST.ROOT @@ -1 +1,7 @@ maxOutputSize=1000000 +# there may be tests, whcih absence/presence is quite healthy to be set up in runtime +# those are controlled by environemnt variables. Eg RH_JDK=true will enable few additional tests +# which are known to pass on RH builds, but not on any others +requires.extraPropDefns = VarDeps.java +requires.properties = \ + var.rh.jdk diff --git a/test/VarDeps.java b/test/VarDeps.java new file mode 100644 index 0000000..6a9e3b2 --- /dev/null +++ b/test/VarDeps.java @@ -0,0 +1,27 @@ +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.concurrent.Callable; + +public class VarDeps implements Callable> { + + boolean checkVar(String var) { + String varval = System.getenv(var); + if (varval == null) { return false; } + return varval.equalsIgnoreCase("true"); + } + + @Override + public Map call() { + Map map = new HashMap(); + map.put("var.rh.jdk", checkVar("RH_JDK") ? "true": "false"); + return map; + } + + public static void main(String[] args) { + for (Map.Entry entry: new VarDeps().call().entrySet()) { + System.out.println(entry.getKey() + ": " + entry.getValue()); + } + } +} diff --git a/test/reproducers/1112806/GlyphBug4.java b/test/reproducers/1112806/GlyphBug4.java index 70f56be..d110e6d 100644 --- a/test/reproducers/1112806/GlyphBug4.java +++ b/test/reproducers/1112806/GlyphBug4.java @@ -11,7 +11,7 @@ /* * @test * @bug 1112806 - * @requires os.arch != "aarch64" + * @requires os.arch != "aarch64" & (os.family == "linux" | os.family == "windows") * @summary heck that LineBreakMeasurer.nextLayout does not throw ArrayIndexOutOfBoundsException * @run main/timeout=60000 GlyphBug4 */ diff --git a/test/reproducers/1818881/allowNonCaAnchor-javaSecurity.sh b/test/reproducers/1818881/allowNonCaAnchor-javaSecurity.sh index 392b45f..7c94c65 100755 --- a/test/reproducers/1818881/allowNonCaAnchor-javaSecurity.sh +++ b/test/reproducers/1818881/allowNonCaAnchor-javaSecurity.sh @@ -1,6 +1,7 @@ #!/bin/bash # @test allowNonCaAnchor-javaSecurity +# @requires var.rh.jdk == "true" # @bug 1818881 # @summary Add security property (i.e. java.security file) version of jdk.security.allowNonCaAnchor # @run shell allowNonCaAnchor-javaSecurity.sh diff --git a/test/reproducers/1818881/allowNonCaAnchor-property.sh b/test/reproducers/1818881/allowNonCaAnchor-property.sh index 0025ebc..af4ecd1 100644 --- a/test/reproducers/1818881/allowNonCaAnchor-property.sh +++ b/test/reproducers/1818881/allowNonCaAnchor-property.sh @@ -1,6 +1,7 @@ #!/bin/bash # @test jdk.security.allowNonCaAnchor-property +# @requires var.rh.jdk == "true" # @bug 1818881 # @summary security property jdk.security.allowNonCaAnchor works # @run shell allowNonCaAnchor-property.sh diff --git a/test/reproducers/1894083/test1894083.sh b/test/reproducers/1894083/test1894083.sh index 3c31b3f..df6042a 100644 --- a/test/reproducers/1894083/test1894083.sh +++ b/test/reproducers/1894083/test1894083.sh @@ -1,6 +1,7 @@ #!/bin/sh # @test +# @requires var.rh.jdk == "true" # @bug 1894083 # @summary ojdk was not depending on nss package -> failing in fips mode # @run shell test1894083.sh diff --git a/test/reproducers/1897602/TestDiagnosticCommandImpl.java b/test/reproducers/1897602/TestDiagnosticCommandImpl.java index e85b0b5..b40ec12 100644 --- a/test/reproducers/1897602/TestDiagnosticCommandImpl.java +++ b/test/reproducers/1897602/TestDiagnosticCommandImpl.java @@ -2,6 +2,7 @@ /* * Test delegated to shell to make the assert more direct * test + * requires var.rh.jdk == "true" * bug 1897602 * summary Warnings when using ManagementFactory.getPlatformMBeanServer with -Xcheck:jni VM argument * run main/othervm -Xcheck:jni TestDiagnosticCommandImpl diff --git a/test/reproducers/1897602/TestDiagnosticCommandImpl.sh b/test/reproducers/1897602/TestDiagnosticCommandImpl.sh index 67e1725..52d96da 100644 --- a/test/reproducers/1897602/TestDiagnosticCommandImpl.sh +++ b/test/reproducers/1897602/TestDiagnosticCommandImpl.sh @@ -2,6 +2,7 @@ # # @test +# @requires var.rh.jdk == "true" # @bug 1897602 # @summary Warnings when using ManagementFactory.getPlatformMBeanServer with -Xcheck:jni VM argument # @requires jdk.version.major > 8 diff --git a/test/reproducers/6913047/Bug6913047.java b/test/reproducers/6913047/Bug6913047.java index 833978b..c8f93a6 100644 --- a/test/reproducers/6913047/Bug6913047.java +++ b/test/reproducers/6913047/Bug6913047.java @@ -26,7 +26,7 @@ * @test * @bug 6913047 * @summary Native memory exhaustion using SunPKCS11 on 32 bits JVM. - * @requires os.simpleArch != "i586" + * @requires os.simpleArch != "i586" & var.rh.jdk == "true" * @run shell/timeout=120 run.sh * @author Martin Balao (mbalao@redhat.com) */ diff --git a/test/reproducers/7057857/MemoryAllocatorTest.java b/test/reproducers/7057857/MemoryAllocatorTest.java index 31c8b12..ef02ae1 100644 --- a/test/reproducers/7057857/MemoryAllocatorTest.java +++ b/test/reproducers/7057857/MemoryAllocatorTest.java @@ -3,7 +3,7 @@ * @modules jdk.jartool/sun.tools.jar * @bug 6755943 6792554 7057857 * @summary Checks any memory overruns in archive length. - * @requires os.simpleArch != "i586" + * @requires os.simpleArch != "i586" & (os.family == "linux" | os.family == "windows") * @run main/othervm/timeout=1200 MemoryAllocatorTest */