Skip to content

Commit 4cdb978

Browse files
committed
8289098: clean up ported serviceability/jvmti tests
Reviewed-by: kevinw, sspitsyn
1 parent 9918b6d commit 4cdb978

File tree

75 files changed

+184
-654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+184
-654
lines changed

test/hotspot/jtreg/serviceability/jvmti/events/Breakpoint/breakpoint01/breakpoint01.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,7 @@
5757
*/
5858
public class breakpoint01 {
5959
static {
60-
try {
61-
System.loadLibrary("breakpoint01");
62-
} catch (UnsatisfiedLinkError ule) {
63-
System.err.println("Could not load \"breakpoint01\" library");
64-
System.err.println("java.library.path:"
65-
+ System.getProperty("java.library.path"));
66-
throw ule;
67-
}
60+
System.loadLibrary("breakpoint01");
6861
}
6962

7063
native int check();

test/hotspot/jtreg/serviceability/jvmti/events/Breakpoint/breakpoint01/libbreakpoint01.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static volatile jint result = PASSED;
5555
static jvmtiEnv *jvmti = NULL;
5656
static jvmtiEventCallbacks callbacks;
5757

58-
static volatile int callbacksEnabled = NSK_TRUE;
58+
static volatile int callbacksEnabled = JNI_TRUE;
5959
static jrawMonitorID agent_lock;
6060

6161
static void initCounters() {
@@ -196,13 +196,13 @@ Breakpoint(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread, jmethodID method, jloca
196196
void JNICALL
197197
VMStart(jvmtiEnv *jvmti, JNIEnv *jni) {
198198
RawMonitorLocker rml(jvmti, jni, agent_lock);
199-
callbacksEnabled = NSK_TRUE;
199+
callbacksEnabled = JNI_TRUE;
200200
}
201201

202202
void JNICALL
203203
VMDeath(jvmtiEnv *jvmti, JNIEnv *jni) {
204204
RawMonitorLocker rml(jvmti, jni, agent_lock);
205-
callbacksEnabled = NSK_FALSE;
205+
callbacksEnabled = JNI_FALSE;
206206
}
207207

208208
JNIEXPORT jint JNICALL

test/hotspot/jtreg/serviceability/jvmti/events/ClassLoad/classload01/classload01.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,7 @@
6161
*/
6262
public class classload01 {
6363
static {
64-
try {
65-
System.loadLibrary("classload01");
66-
} catch (UnsatisfiedLinkError ule) {
67-
System.err.println("Could not load \"classload01\" library");
68-
System.err.println("java.library.path:"
69-
+ System.getProperty("java.library.path"));
70-
throw ule;
71-
}
64+
System.loadLibrary("classload01");
7265
}
7366

7467
native int check();

test/hotspot/jtreg/serviceability/jvmti/events/ClassPrepare/classprep01/classprep01.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
* questions.
2222
*/
2323

24-
import java.io.PrintStream;
25-
26-
2724
/*
2825
* @test
2926
*
@@ -49,14 +46,7 @@
4946
public class classprep01 {
5047

5148
static {
52-
try {
53-
System.loadLibrary("classprep01");
54-
} catch (UnsatisfiedLinkError ule) {
55-
System.err.println("Could not load classprep01 library");
56-
System.err.println("java.library.path:"
57-
+ System.getProperty("java.library.path"));
58-
throw ule;
59-
}
49+
System.loadLibrary("classprep01");
6050
}
6151

6252
native static void getReady();

test/hotspot/jtreg/serviceability/jvmti/events/Exception/exception01/exception01.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* questions.
2222
*/
2323

24-
import java.io.PrintStream;
25-
2624
/*
2725
* @test
2826
*
@@ -51,14 +49,7 @@
5149
public class exception01 {
5250

5351
static {
54-
try {
55-
System.loadLibrary("exception01");
56-
} catch (UnsatisfiedLinkError ule) {
57-
System.err.println("Could not load exception01 library");
58-
System.err.println("java.library.path:"
59-
+ System.getProperty("java.library.path"));
60-
throw ule;
61-
}
52+
System.loadLibrary("exception01");
6253
}
6354

6455
static volatile int result;

test/hotspot/jtreg/serviceability/jvmti/events/ExceptionCatch/excatch01/excatch01.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,7 @@
4949
public class excatch01 {
5050

5151
static {
52-
try {
53-
System.loadLibrary("excatch01");
54-
} catch (UnsatisfiedLinkError ule) {
55-
System.err.println("Could not load excatch01 library");
56-
System.err.println("java.library.path:"
57-
+ System.getProperty("java.library.path"));
58-
throw ule;
59-
}
52+
System.loadLibrary("excatch01");
6053
}
6154

6255
static volatile int result;

test/hotspot/jtreg/serviceability/jvmti/events/FieldAccess/fieldacc01/fieldacc01.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,8 @@
4646

4747
public class fieldacc01 {
4848

49-
final static int JCK_STATUS_BASE = 95;
50-
5149
static {
52-
try {
53-
System.loadLibrary("fieldacc01");
54-
} catch (UnsatisfiedLinkError ule) {
55-
System.err.println("Could not load fieldacc01 library");
56-
System.err.println("java.library.path:"
57-
+ System.getProperty("java.library.path"));
58-
throw ule;
59-
}
50+
System.loadLibrary("fieldacc01");
6051
}
6152

6253
static volatile int result;

test/hotspot/jtreg/serviceability/jvmti/events/FieldAccess/fieldacc02/fieldacc02.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* questions.
2222
*/
2323

24-
import java.io.PrintStream;
25-
2624
/*
2725
* @test
2826
*
@@ -47,17 +45,8 @@
4745

4846
public class fieldacc02 {
4947

50-
final static int JCK_STATUS_BASE = 95;
51-
5248
static {
53-
try {
54-
System.loadLibrary("fieldacc02");
55-
} catch (UnsatisfiedLinkError ule) {
56-
System.err.println("Could not load fieldacc02 library");
57-
System.err.println("java.library.path:"
58-
+ System.getProperty("java.library.path"));
59-
throw ule;
60-
}
49+
System.loadLibrary("fieldacc02");
6150
}
6251

6352
static volatile int result;

test/hotspot/jtreg/serviceability/jvmti/events/FieldAccess/fieldacc03/fieldacc03.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* questions.
2222
*/
2323

24-
import java.io.PrintStream;
25-
2624
/*
2725
* @test
2826
*
@@ -48,17 +46,8 @@
4846

4947
public class fieldacc03 {
5048

51-
final static int JCK_STATUS_BASE = 95;
52-
5349
static {
54-
try {
55-
System.loadLibrary("fieldacc03");
56-
} catch (UnsatisfiedLinkError ule) {
57-
System.err.println("Could not load fieldacc03 library");
58-
System.err.println("java.library.path:"
59-
+ System.getProperty("java.library.path"));
60-
throw ule;
61-
}
50+
System.loadLibrary("fieldacc03");
6251
}
6352

6453
static volatile int result;

test/hotspot/jtreg/serviceability/jvmti/events/FieldAccess/fieldacc04/fieldacc04.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
* or visit www.oracle.com if you need additional information or have any
2121
* questions.
2222
*/
23-
import java.io.PrintStream;
2423

2524
/*
2625
* @test
@@ -46,17 +45,8 @@
4645

4746
public class fieldacc04 {
4847

49-
final static int JCK_STATUS_BASE = 95;
50-
5148
static {
52-
try {
53-
System.loadLibrary("fieldacc04");
54-
} catch (UnsatisfiedLinkError ule) {
55-
System.err.println("Could not load fieldacc04 library");
56-
System.err.println("java.library.path:"
57-
+ System.getProperty("java.library.path"));
58-
throw ule;
59-
}
49+
System.loadLibrary("fieldacc04");
6050
}
6151

6252
static volatile int result;

0 commit comments

Comments
 (0)