Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8243435: use reproducible random in :vmTestbase_nsk_jvmti
Browse files Browse the repository at this point in the history
Reviewed-by: sspitsyn, cjplummer
  • Loading branch information
iignatev committed May 1, 2020
1 parent 56fcd54 commit d29e5b7
Show file tree
Hide file tree
Showing 24 changed files with 44 additions and 30 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/AttachOnDemand/attach020.
* VM Testbase keywords: [jpda, jvmti, noras, feature_282, vm6, jdk, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/AttachOnDemand/attach021.
* VM Testbase keywords: [jpda, jvmti, noras, feature_282, vm6, jdk, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/AttachOnDemand/attach022.
* VM Testbase keywords: [jpda, jvmti, noras, feature_282, vm6, jdk, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/CompiledMethodUnload/compmethunload001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/GarbageCollectionFinish/gcfinish001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/GarbageCollectionStart/gcstart001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/GarbageCollectionStart/gcstart002.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -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
Expand Down Expand Up @@ -39,7 +39,6 @@

package nsk.jvmti.IterateThroughHeap.abort;

import java.util.Random;
import java.io.PrintStream;

import nsk.share.*;
Expand Down
@@ -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
Expand Down Expand Up @@ -66,7 +66,6 @@

package nsk.jvmti.IterateThroughHeap.callbacks;

import java.util.Random;
import java.io.PrintStream;

import nsk.share.*;
Expand Down
@@ -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
Expand All @@ -22,7 +22,6 @@
*/
package nsk.jvmti.IterateThroughHeap.concrete_klass_filter;

import java.util.Random;
import java.io.PrintStream;

import nsk.share.*;
Expand Down
@@ -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
Expand All @@ -22,7 +22,6 @@
*/
package nsk.jvmti.IterateThroughHeap.filter_tagged;

import java.util.Random;
import java.io.PrintStream;

import nsk.share.*;
Expand Down
@@ -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
Expand All @@ -22,7 +22,6 @@
*/
package nsk.jvmti.IterateThroughHeap.non_concrete_klass_filter;

import java.util.Random;
import java.io.PrintStream;

import nsk.share.*;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/ObjectFree/objfree001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -25,6 +25,7 @@
/*
* @test
*
* @key randomness
* @summary converted from VM Testbase nsk/jvmti/RedefineClasses/StressRedefine.
* VM Testbase keywords: [quick, jpda, jvmti, noras, redefine, javac, jdk]
*
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -25,6 +25,7 @@
/*
* @test
*
* @key randomness
* @summary converted from VM Testbase nsk/jvmti/RedefineClasses/StressRedefineWithoutBytecodeCorruption.
* VM Testbase keywords: [quick, jpda, jvmti, noras, redefine, javac, jdk]
*
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 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
Expand All @@ -24,13 +24,14 @@

import java.io.*;
import java.util.Random;
import jdk.test.lib.Utils;

import nsk.share.Consts;

public class resexhausted004 {
public static int run(String args[], PrintStream out) {

Random selector = new Random(System.currentTimeMillis());
Random selector = Utils.getRandomInstance();
int r;

for ( int i = 4 + selector.nextInt() & 3; i > 0; i-- ) {
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -25,6 +25,7 @@
/*
* @test
*
* @key randomness
* @summary converted from VM Testbase nsk/jvmti/ResourceExhausted/resexhausted004.
* VM Testbase keywords: [jpda, jvmti, noras, vm6, nonconcurrent, quarantine, exclude]
* VM Testbase comments: 7013634 6606767
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/scenarios/allocation/AP12/ap12t001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/scenarios/events/EM02/em02t002.
* VM Testbase keywords: [jpda, jvmti, onload_only_logic, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/scenarios/events/EM02/em02t003.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/scenarios/events/EM02/em02t005.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/scenarios/events/EM02/em02t006.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/scenarios/events/EM07/em07t002.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand All @@ -24,6 +24,7 @@

/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/scenarios/extension/EX03/ex03t001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent, quarantine]
Expand Down

0 comments on commit d29e5b7

Please sign in to comment.