8243435: use reproducible random in :vmTestbase_nsk_jvmti

Reviewed-by: sspitsyn, cjplummer
This commit is contained in:
Igor Ignatyev 2020-05-01 16:22:20 -07:00
parent 56fcd54843
commit d29e5b72f0
24 changed files with 44 additions and 30 deletions

View File

@ -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
@ -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]

View File

@ -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
@ -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]

View File

@ -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
@ -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]

View File

@ -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
@ -24,6 +24,7 @@
/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/CompiledMethodUnload/compmethunload001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]

View File

@ -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
@ -24,6 +24,7 @@
/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/GarbageCollectionFinish/gcfinish001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]

View File

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

View File

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

View File

@ -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
@ -39,7 +39,6 @@
package nsk.jvmti.IterateThroughHeap.abort;
import java.util.Random;
import java.io.PrintStream;
import nsk.share.*;

View File

@ -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
@ -66,7 +66,6 @@
package nsk.jvmti.IterateThroughHeap.callbacks;
import java.util.Random;
import java.io.PrintStream;
import nsk.share.*;

View File

@ -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
@ -22,7 +22,6 @@
*/
package nsk.jvmti.IterateThroughHeap.concrete_klass_filter;
import java.util.Random;
import java.io.PrintStream;
import nsk.share.*;

View File

@ -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
@ -22,7 +22,6 @@
*/
package nsk.jvmti.IterateThroughHeap.filter_tagged;
import java.util.Random;
import java.io.PrintStream;
import nsk.share.*;

View File

@ -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
@ -22,7 +22,6 @@
*/
package nsk.jvmti.IterateThroughHeap.non_concrete_klass_filter;
import java.util.Random;
import java.io.PrintStream;
import nsk.share.*;

View File

@ -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
@ -24,6 +24,7 @@
/*
* @test
* @key randomness
*
* @summary converted from VM Testbase nsk/jvmti/ObjectFree/objfree001.
* VM Testbase keywords: [jpda, jvmti, noras, nonconcurrent]

View File

@ -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
@ -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]
*

View File

@ -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
@ -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]
*

View File

@ -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
@ -24,13 +24,14 @@ package nsk.jvmti.ResourceExhausted;
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-- ) {

View File

@ -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
@ -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

View File

@ -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
@ -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]

View File

@ -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
@ -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]

View File

@ -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
@ -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]

View File

@ -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
@ -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]

View File

@ -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
@ -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]

View File

@ -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
@ -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]

View File

@ -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
@ -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]