Skip to content
Permalink
Browse files
8243431: use reproducible random in :vmTestbase_vm_metaspace
Reviewed-by: dholmes
  • Loading branch information
iignatev committed May 5, 2020
1 parent 80d2802 commit 0b7a47665f9b78ccf35275b678502c8aa3d55957
Showing with 27 additions and 4 deletions.
  1. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/flags/maxMetaspaceSize/TestMaxMetaspaceSize.java
  2. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/staticReferences/StaticReferences.java
  3. +7 −2 test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java
  4. +3 −2 .../jtreg/vmTestbase/metaspace/stressHierarchy/common/generateHierarchy/GenerateHierarchyHelper.java
  5. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy001/TestDescription.java
  6. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy002/TestDescription.java
  7. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy003/TestDescription.java
  8. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy004/TestDescription.java
  9. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy005/TestDescription.java
  10. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy006/TestDescription.java
  11. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy007/TestDescription.java
  12. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy008/TestDescription.java
  13. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy009/TestDescription.java
  14. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy010/TestDescription.java
  15. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy011/TestDescription.java
  16. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy012/TestDescription.java
  17. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy013/TestDescription.java
  18. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy014/TestDescription.java
  19. +1 −0 test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/stressHierarchy015/TestDescription.java
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/flags/maxMetaspaceSize.
*
@@ -23,6 +23,7 @@

/*
* @test
* @key randomness
* @modules java.base/jdk.internal.misc:+open
*
* @summary converted from VM Testbase metaspace/staticReferences.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressDictionary.
* VM Testbase keywords: [nonconcurrent, javac]
@@ -60,6 +61,10 @@
private static byte[] bytecode;

private class FillingDictionaryWorker implements Callable<Object> {
private final Random random;
public FillingDictionaryWorker(long seed) {
this.random = new Random(seed);
}
@Override
public Object call() throws Exception {
while (stresser.continueExecution()) {
@@ -117,7 +122,7 @@ public void run() {
bytecode = generateAndCompile();
List<Callable<Object>> tasks = new LinkedList<Callable<Object>>();
for (int i = 0; i < NUMBER_OF_CORRUPTING_THREADS; i++) {
tasks.add(this.new FillingDictionaryWorker());
tasks.add(this.new FillingDictionaryWorker(random.nextLong()));
}
for (int i = 0; i < NUMBER_OF_NOT_CORRUPTING_THREADS; i++) {
tasks.add(this.new RegularWorker());
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
import java.util.*;

import vm.share.InMemoryJavaCompiler;
import jdk.test.lib.Utils;

public class GenerateHierarchyHelper {

@@ -41,7 +42,7 @@

private static final int EDGE_IN_MIXED_CASE = 30;

private static Random random = new Random();
private static Random random = Utils.getRandomInstance();

public static TreeDescriptor generateHierarchy(int depth, int minLevelSize, int maxLevelSize, Type type) {
TreeDescriptor tree = new TreeDescriptor();
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy001.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy002.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy003.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy004.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy005.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy006.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy007.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy008.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy009.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy010.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy011.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy012.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy013.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy014.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
@@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy015.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]

0 comments on commit 0b7a476

Please sign in to comment.