Skip to content

Commit

Permalink
6606767: resexhausted00[34] fail assert(!thread->owns_locks(), "must …
Browse files Browse the repository at this point in the history
…release all locks when leaving VM")

Backport-of: b9186be
  • Loading branch information
RealCLanger committed Jul 19, 2022
1 parent 805a031 commit 252cafd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
3 changes: 1 addition & 2 deletions test/hotspot/jtreg/ProblemList.txt
Expand Up @@ -198,8 +198,7 @@ vmTestbase/metaspace/gc/firstGC_default/TestDescription.java 8208250 generic-all
vmTestbase/nsk/jvmti/ClearBreakpoint/clrbrk001/TestDescription.java 8016181 generic-all
vmTestbase/nsk/jvmti/FieldModification/fieldmod001/TestDescription.java 8016181 generic-all
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted001/TestDescription.java 8253916 linux-all
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003/TestDescription.java 6606767 generic-all
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004/TestDescription.java 6606767 generic-all
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004/TestDescription.java 8253916 linux-all
vmTestbase/nsk/jvmti/ThreadStart/threadstart001/TestDescription.java 8016181 generic-all
vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java 8204506,8203350 generic-all
vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java 6813266 generic-all
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2019, 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
Expand Down Expand Up @@ -31,6 +31,7 @@

import nsk.share.Consts;
import nsk.share.test.Stresser;
import jtreg.SkippedException;

public class resexhausted003 {

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

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

} catch (OutOfMemoryError e) {
// that is what we are waiting for
Expand Down
Expand Up @@ -26,6 +26,7 @@
import java.util.Random;

import nsk.share.Consts;
import jtreg.SkippedException;

public class resexhausted004 {
public static int run(String args[], PrintStream out) {
Expand All @@ -34,23 +35,24 @@ public static int run(String args[], PrintStream out) {
int r;

for ( int i = 4 + selector.nextInt() & 3; i > 0; i-- ) {
switch ( selector.nextInt() % 3 ) {
try {
switch (selector.nextInt() % 3) {
case 0:
r = resexhausted001.run(args, out);
if ( r != Consts.TEST_PASSED )
return r;
break;
case 1:
r = resexhausted002.run(args, out);
if ( r != Consts.TEST_PASSED )
return r;
break;
default:
r = resexhausted003.run(args, out);
if ( r != Consts.TEST_PASSED )
return r;
break;
}
}
if (r != Consts.TEST_PASSED) {
return r;
}
} catch (SkippedException ex) {
// it's ok
}
}

return Consts.TEST_PASSED;
Expand Down

1 comment on commit 252cafd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.