Skip to content

Commit 89987db

Browse files
committed
8303773: Replace "main.wrapper" with "test.thread.factory" property in test code
Reviewed-by: cjplummer, amenkov
1 parent 0e501f6 commit 89987db

File tree

21 files changed

+62
-63
lines changed

21 files changed

+62
-63
lines changed

test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor001/monitor001.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -152,7 +152,7 @@ private boolean checkCommands(String[] reply) {
152152

153153
// check 'threads', searching for "java.lang.Thread" followed by the main thread name.
154154
v.add("java.lang.Thread");
155-
if (System.getProperty("main.wrapper") != null) {
155+
if (System.getProperty("test.thread.factory") != null) {
156156
v.add(nsk.share.MainWrapper.OLD_MAIN_THREAD_NAME);
157157
} else {
158158
v.add("main");

test/hotspot/jtreg/vmTestbase/nsk/jdb/threads/threads003/threads003.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -90,7 +90,7 @@ protected void runCases() {
9090
int count;
9191
Vector v;
9292
String[] threads;
93-
boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
93+
boolean vthreadMode = "Virtual".equals(System.getProperty("test.thread.factory"));
9494

9595
if (!vthreadMode) {
9696
// This test is only meant to be run in vthread mode.

test/hotspot/jtreg/vmTestbase/nsk/jdb/unmonitor/unmonitor001/unmonitor001.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -186,7 +186,7 @@ private boolean checkCommands(String[] reply) {
186186

187187
// check 'threads', searching for "java.lang.Thread" followed by the main thread name.
188188
v.add("java.lang.Thread");
189-
if (System.getProperty("main.wrapper") != null) {
189+
if (System.getProperty("test.thread.factory") != null) {
190190
v.add(nsk.share.MainWrapper.OLD_MAIN_THREAD_NAME);
191191
} else {
192192
v.add("main");

test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds002.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -191,7 +191,7 @@ private void execTest() {
191191
complain("Unexpected " + e);
192192
exitStatus = Consts.TEST_FAILED;
193193
}
194-
boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
194+
boolean vthreadMode = "Virtual".equals(System.getProperty("test.thread.factory"));
195195
display("vthreadMode: " + vthreadMode + ", isTopmostFrame: " + isTopmostFrame);
196196
try {
197197
stackFrame.setValue(var, null);

test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threads/threads001.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -134,8 +134,8 @@ private static void log3(String message) {
134134
private int runThis (String argv[], PrintStream out) {
135135

136136
Debugee debuggee;
137-
boolean usingWrapper = System.getProperty("main.wrapper") != null;
138-
boolean usingVThreadWrapper = "Virtual".equals(System.getProperty("main.wrapper"));
137+
boolean usingTTF = System.getProperty("test.thread.factory") != null;
138+
boolean usingVirtualTTF = "Virtual".equals(System.getProperty("test.thread.factory"));
139139

140140
argsHandler = new ArgumentHandler(argv);
141141
logHandler = new Log(out, argsHandler);
@@ -253,10 +253,10 @@ private int runThis (String argv[], PrintStream out) {
253253
* the "VirtualThreads" ThreadGroup, and threfore do not show up in group1.
254254
*/
255255
int expectedNumThreads;
256-
if (usingVThreadWrapper) {
256+
if (usingVirtualTTF) {
257257
expectedNumThreads = 1;
258258
} else {
259-
expectedNumThreads = usingWrapper ? 3 : 2;
259+
expectedNumThreads = usingTTF ? 3 : 2;
260260
}
261261
if (threads.size() < expectedNumThreads) {
262262
log3("ERROR: threads.size() < 2 for group1 : " + threads.size() );
@@ -277,7 +277,7 @@ private int runThis (String argv[], PrintStream out) {
277277
if (s1.equals("Thread2"))
278278
nThread2 += 1;
279279
}
280-
if (nMain != 1 && !usingVThreadWrapper) {
280+
if (nMain != 1 && !usingVirtualTTF) {
281281
log3("ERROR: # of 'main' threads != 1 : " + nMain);
282282
expresult = 1;
283283
}

test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop001.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class stop001 {
6969
static final int PASSED = 0;
7070
static final int FAILED = 2;
7171
static final int PASS_BASE = 95;
72-
static final boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
72+
static final boolean vthreadMode = "Virtual".equals(System.getProperty("test.thread.factory"));
7373

7474
//----------------------------------------------------- templete parameters
7575
static final String

test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop001a.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public Threadstop001a(String threadName) {
189189

190190
public static Object lockingObject2 = new Object();
191191

192-
static final boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
192+
static final boolean vthreadMode = "Virtual".equals(System.getProperty("test.thread.factory"));
193193

194194
private int i1 = 0, i2 = 10;
195195

test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop002.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class stop002 {
7575
static final String COMMAND_GO = "go";
7676
static final String COMMAND_QUIT = "quit";
7777

78-
static final boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
78+
static final boolean vthreadMode = "Virtual".equals(System.getProperty("test.thread.factory"));
7979

8080
private ArgumentHandler argHandler;
8181
private Log log;

test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop002t.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class stop002t {
3838
volatile boolean stopLooping1 = false;
3939
volatile boolean stopLooping2 = false;
4040
volatile static int testNumReady = 0;
41-
static final boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
41+
static final boolean vthreadMode = "Virtual".equals(System.getProperty("test.thread.factory"));
4242

4343
public static void main(String args[]) {
4444
System.exit(run(args) + Consts.JCK_STATUS_BASE);

test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -251,7 +251,7 @@ public void run() {
251251
// debug agent has already generated the THREAD_START event for the
252252
// original "main", so we end up with two THREAD_START events for "main".
253253
// We need to allow for this.
254-
if ((System.getProperty("main.wrapper") != null) &&
254+
if ((System.getProperty("test.thread.factory") != null) &&
255255
checkedThreads[i][0].equals("main") &&
256256
checkedThreads[i][1].equals("1")) {
257257
checkedThreads[i][1] = "2";

0 commit comments

Comments
 (0)