< prev index next >
test/java/security/SecureRandom/EnoughSeedTest.java
Print this page
@@ -25,11 +25,11 @@
* @test
* @bug 8141039
* @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;
import static java.lang.Math.*;
@@ -38,10 +38,11 @@
private static final String DRBG_CONFIG = "securerandom.drbg.config";
private static final String DRBG_CONFIG_VALUE
= 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[]{
"SHA1PRNG", "Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) {
System.out.printf("%nTest for SecureRandom algorithm: '%s'", mech);
< prev index next >