changeset 14557:3bcf2d4fdb54

8157344: Multiple test timeouts after push for JDK-8141039 8156606: java/security/SecureRandom/Serialize.java gets time out in Linux Reviewed-by: weijun
author asmotrak
date Thu, 19 May 2016 19:45:04 -0700
parents 01a8615439f0
children 0e78d0a7a517
files test/ProblemList.txt test/java/security/SecureRandom/ApiTest.java test/java/security/SecureRandom/EnoughSeedTest.java test/java/security/SecureRandom/Serialize.java
diffstat 4 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/ProblemList.txt	Thu May 19 16:25:35 2016 -0700
+++ b/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/test/java/security/SecureRandom/ApiTest.java	Thu May 19 16:25:35 2016 -0700
+++ b/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/test/java/security/SecureRandom/EnoughSeedTest.java	Thu May 19 16:25:35 2016 -0700
+++ b/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/test/java/security/SecureRandom/Serialize.java	Thu May 19 16:25:35 2016 -0700
+++ b/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"}) {