Commit 7742566 1 parent 3582b32 commit 7742566 Copy full SHA for 7742566
File tree 1 file changed +10
-4
lines changed
test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadEventTest
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -184,23 +184,29 @@ public static void main(String[] args) throws Exception {
184
184
int threadEndExp = THREAD_CNT ;
185
185
int threadMountExp = THREAD_CNT - TCNT2 ;
186
186
int threadUnmountExp = THREAD_CNT + TCNT3 ;
187
+ int diffUnmountMountExp = TCNT2 + TCNT3 ;
187
188
188
189
log ("ThreadEnd cnt: " + threadEndCnt + " (expected: " + threadEndExp + ")" );
189
- log ("ThreadMount cnt: " + threadMountCnt + " (expected: " + threadMountExp + ")" );
190
- log ("ThreadUnmount cnt: " + threadUnmountCnt + " (expected: " + threadUnmountExp + ")" );
190
+ log ("ThreadMount cnt: " + threadMountCnt + " (expected: >=" + threadMountExp + ")" );
191
+ log ("ThreadUnmount cnt: " + threadUnmountCnt + " (expected: >=" + threadUnmountExp + ")" );
192
+ log ("ThreadUnmount/ThreadMount diff cnt: " + (threadUnmountCnt - threadMountCnt ) + " (expected: " + diffUnmountMountExp + ")" );
191
193
192
194
if (threadEndCnt != threadEndExp ) {
193
195
log ("FAILED: unexpected count of ThreadEnd events" );
194
196
failed = true ;
195
197
}
196
- if (threadMountCnt != threadMountExp ) {
198
+ if (threadMountCnt < threadMountExp ) {
197
199
log ("FAILED: unexpected count of ThreadMount events" );
198
200
failed = true ;
199
201
}
200
- if (threadUnmountCnt != threadUnmountExp ) {
202
+ if (threadUnmountCnt < threadUnmountExp ) {
201
203
log ("FAILED: unexpected count of ThreadUnmount events" );
202
204
failed = true ;
203
205
}
206
+ if ((threadUnmountCnt - threadMountCnt ) != diffUnmountMountExp ) {
207
+ log ("FAILED: unexpected difference of ThreadUnmount and threadMountCnt events" );
208
+ failed = true ;
209
+ }
204
210
if (failed ) {
205
211
throw new RuntimeException ("FAILED: event count is wrong" );
206
212
}
You can’t perform that action at this time.
0 commit comments