Skip to content

Commit b9186be

Browse files
author
Alex Menkov
committed
6606767: resexhausted00[34] fail assert(!thread->owns_locks(), "must release all locks when leaving VM")
Reviewed-by: sspitsyn, cjplummer
1 parent 1191a63 commit b9186be

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

test/hotspot/jtreg/ProblemList.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ vmTestbase/metaspace/gc/firstGC_99m/TestDescription.java 8208250 generic-all
131131
vmTestbase/metaspace/gc/firstGC_default/TestDescription.java 8208250 generic-all
132132

133133
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted001/TestDescription.java 8253916 linux-all
134-
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003/TestDescription.java 6606767 generic-all
135-
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004/TestDescription.java 6606767 generic-all
134+
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004/TestDescription.java 8253916 linux-all
136135
vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java 8202971 generic-all
137136
vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/TestDescription.java 8219652 aix-ppc64
138137
vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/TestDescription.java 8219652 aix-ppc64

test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2020, 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
@@ -31,6 +31,7 @@
3131

3232
import nsk.share.Consts;
3333
import nsk.share.test.Stresser;
34+
import jtreg.SkippedException;
3435

3536
public class resexhausted003 {
3637

@@ -115,7 +116,7 @@ public static int run(String args[], PrintStream out) {
115116
}
116117

117118
System.out.println("Can't reproduce OOME due to a limit on iterations/execution time. Test was useless.");
118-
return Consts.TEST_PASSED;
119+
throw new SkippedException("Test did not get an OutOfMemory error");
119120

120121
} catch (OutOfMemoryError e) {
121122
// that is what we are waiting for

test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import jdk.test.lib.Utils;
2828

2929
import nsk.share.Consts;
30+
import jtreg.SkippedException;
3031

3132
public class resexhausted004 {
3233
public static int run(String args[], PrintStream out) {
@@ -35,23 +36,24 @@ public static int run(String args[], PrintStream out) {
3536
int r;
3637

3738
for ( int i = 4 + selector.nextInt() & 3; i > 0; i-- ) {
38-
switch ( selector.nextInt() % 3 ) {
39+
try {
40+
switch (selector.nextInt() % 3) {
3941
case 0:
4042
r = resexhausted001.run(args, out);
41-
if ( r != Consts.TEST_PASSED )
42-
return r;
4343
break;
4444
case 1:
4545
r = resexhausted002.run(args, out);
46-
if ( r != Consts.TEST_PASSED )
47-
return r;
4846
break;
4947
default:
5048
r = resexhausted003.run(args, out);
51-
if ( r != Consts.TEST_PASSED )
52-
return r;
5349
break;
54-
}
50+
}
51+
if (r != Consts.TEST_PASSED) {
52+
return r;
53+
}
54+
} catch (SkippedException ex) {
55+
// it's ok
56+
}
5557
}
5658

5759
return Consts.TEST_PASSED;

0 commit comments

Comments
 (0)