8157344: Multiple test timeouts after push for JDK-8141039
authorasmotrak
Thu, 19 May 2016 19:45:04 -0700
changeset 38437 0401899aa994
parent 38436 4676f6c9ebee
child 38438 6e6b1c38fdc0
8157344: Multiple test timeouts after push for JDK-8141039 8156606: java/security/SecureRandom/Serialize.java gets time out in Linux Reviewed-by: weijun
jdk/test/ProblemList.txt
jdk/test/java/security/SecureRandom/ApiTest.java
jdk/test/java/security/SecureRandom/EnoughSeedTest.java
jdk/test/java/security/SecureRandom/Serialize.java
--- a/jdk/test/ProblemList.txt	Thu May 19 16:25:35 2016 -0700
+++ b/jdk/test/ProblemList.txt	Thu May 19 19:45:04 2016 -0700
@@ -292,6 +292,8 @@
 
 sun/security/x509/URICertStore/ExtensionsWithLDAP.java          8134577 generic-all
 
+sun/security/provider/SecureRandom/StrongSecureRandom.java      8157387 linux-all
+
 ############################################################################
 
 # jdk_sound
--- a/jdk/test/java/security/SecureRandom/ApiTest.java	Thu May 19 16:25:35 2016 -0700
+++ b/jdk/test/java/security/SecureRandom/ApiTest.java	Thu May 19 19:45:04 2016 -0700
@@ -28,11 +28,11 @@
  * @summary This test do API coverage for SecureRandom. It covers most of
  *          supported operations along with possible positive and negative
  *          parameters for DRBG mechanism.
- * @run main ApiTest Hash_DRBG
- * @run main ApiTest HMAC_DRBG
- * @run main ApiTest CTR_DRBG
- * @run main ApiTest SHA1PRNG
- * @run main ApiTest NATIVE
+ * @run main/othervm ApiTest Hash_DRBG
+ * @run main/othervm ApiTest HMAC_DRBG
+ * @run main/othervm ApiTest CTR_DRBG
+ * @run main/othervm ApiTest SHA1PRNG
+ * @run main/othervm ApiTest NATIVE
  */
 import java.security.NoSuchAlgorithmException;
 import java.security.SecureRandom;
@@ -53,6 +53,7 @@
             = Security.getProperty(DRBG_CONFIG);
 
     public static void main(String[] args) throws Exception {
+        System.setProperty("java.security.egd", "file:/dev/urandom");
 
         if (args == null || args.length < 1) {
             throw new RuntimeException("No mechanism available to run test.");
--- a/jdk/test/java/security/SecureRandom/EnoughSeedTest.java	Thu May 19 16:25:35 2016 -0700
+++ b/jdk/test/java/security/SecureRandom/EnoughSeedTest.java	Thu May 19 19:45:04 2016 -0700
@@ -27,7 +27,7 @@
  * @library /lib/testlibrary
  * @summary Check SecureRandom generate expected seed counts what the caller
  *          asked for.
- * @run main EnoughSeedTest
+ * @run main/othervm EnoughSeedTest
  */
 import java.security.SecureRandom;
 import java.security.Security;
@@ -40,6 +40,7 @@
             = Security.getProperty(DRBG_CONFIG);
 
     public static void main(String[] args) {
+        System.setProperty("java.security.egd", "file:/dev/urandom");
 
         boolean success = true;
         for (String mech : new String[]{
--- a/jdk/test/java/security/SecureRandom/Serialize.java	Thu May 19 16:25:35 2016 -0700
+++ b/jdk/test/java/security/SecureRandom/Serialize.java	Thu May 19 19:45:04 2016 -0700
@@ -24,6 +24,7 @@
 /* @test
  * @bug 4102896
  * @summary Make sure that a SecureRandom object can be serialized
+ * @run main/othervm Serialize
  */
 
 import java.security.*;
@@ -32,6 +33,8 @@
 public class Serialize {
 
     public static void main(String args[]) throws Exception {
+        System.setProperty("java.security.egd", "file:/dev/urandom");
+
         for (String alg: new String[]{
                 "SHA1PRNG", "DRBG", "Hash_DRBG", "HMAC_DRBG", "CTR_DRBG",
                 "Hash_DRBG,SHA-512,192,pr_and_reseed"}) {