diff options
| -rw-r--r-- | test/1953-pop-frame/class-loading-expected.patch | 17 | ||||
| -rw-r--r-- | test/1953-pop-frame/expected.txt | 14 | ||||
| -rw-r--r-- | test/1953-pop-frame/src/art/Test1953.java | 44 | ||||
| -rw-r--r-- | test/1954-pop-frame-jit/jvm-expected.patch | 17 | ||||
| -rw-r--r-- | test/1955-pop-frame-jit-called/jvm-expected.patch | 17 | ||||
| -rw-r--r-- | test/1956-pop-frame-jit-calling/jvm-expected.patch | 17 | ||||
| -rw-r--r-- | test/knownfailures.json | 4 |
7 files changed, 89 insertions, 41 deletions
diff --git a/test/1953-pop-frame/class-loading-expected.patch b/test/1953-pop-frame/class-loading-expected.patch index 2edef15dfd..1a5eda7fd6 100644 --- a/test/1953-pop-frame/class-loading-expected.patch +++ b/test/1953-pop-frame/class-loading-expected.patch @@ -1,4 +1,19 @@ -74a75,94 +36a37,50 +> Test stopped during notifyFramePop without exception on pop of calledFunction +> Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +> result is StandardTestObject { cnt: 2 } base-call count: 1 +> Test stopped during notifyFramePop without exception on pop of doNothing +> Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +> result is StandardTestObject { cnt: 1 } base-call count: 1 +> Test stopped during notifyFramePop with exception on pop of calledFunction +> Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0 +> art.Test1953$ExceptionThrowTestObject$TestError thrown and caught! +> result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1 +> Test stopped during notifyFramePop with exception on pop of doThrow +> Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0 +> art.Test1953$ExceptionCatchTestObject$TestError caught in called function. +> result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1 +60a75,94 > Test stopped during a ClassLoad event. > Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 0} base-call-count: 0 > Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME diff --git a/test/1953-pop-frame/expected.txt b/test/1953-pop-frame/expected.txt index 079768d4e9..dafc6b4c92 100644 --- a/test/1953-pop-frame/expected.txt +++ b/test/1953-pop-frame/expected.txt @@ -34,20 +34,6 @@ result is ExceptionOnceObject { cnt: 2, throwInSub: false } base-call count: 1 Test stopped during Method Exit due to exception thrown in subroutine Single call with PopFrame on ExceptionOnceObject { cnt: 0, throwInSub: true } base-call-count: 0 result is ExceptionOnceObject { cnt: 2, throwInSub: true } base-call count: 1 -Test stopped during notifyFramePop without exception on pop of calledFunction -Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 -result is StandardTestObject { cnt: 2 } base-call count: 1 -Test stopped during notifyFramePop without exception on pop of doNothing -Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 -result is StandardTestObject { cnt: 1 } base-call count: 1 -Test stopped during notifyFramePop with exception on pop of calledFunction -Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0 -art.Test1953$ExceptionThrowTestObject$TestError thrown and caught! -result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1 -Test stopped during notifyFramePop with exception on pop of doThrow -Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0 -art.Test1953$ExceptionCatchTestObject$TestError caught in called function. -result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1 Test stopped during ExceptionCatch event of calledFunction (catch in called function, throw in called function) Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0 art.Test1953$ExceptionThrowTestObject$TestError caught in same function. diff --git a/test/1953-pop-frame/src/art/Test1953.java b/test/1953-pop-frame/src/art/Test1953.java index ff41d24557..366809e362 100644 --- a/test/1953-pop-frame/src/art/Test1953.java +++ b/test/1953-pop-frame/src/art/Test1953.java @@ -37,6 +37,7 @@ import static art.SuspendEvents.EVENT_TYPE_CLASS_PREPARE; import static art.SuspendEvents.setupSuspendClassEvent; public class Test1953 { + private static boolean IS_ART = System.getProperty("java.vm.name").equals("Dalvik"); public final boolean canRunClassLoadTests; public static void doNothing() {} @@ -801,29 +802,34 @@ public class Test1953 { (thr) -> setupSuspendMethodEvent(exceptionOnceCalledMethod, /*enter*/ false, thr), SuspendEvents::clearSuspendMethodEvent); - System.out.println("Test stopped during notifyFramePop without exception on pop of calledFunction"); - runTestOn(new StandardTestObject(false), - (thr) -> setupSuspendPopFrameEvent(1, doNothingMethod, thr), - SuspendEvents::clearSuspendPopFrameEvent); - - System.out.println("Test stopped during notifyFramePop without exception on pop of doNothing"); - runTestOn(new StandardTestObject(false), - (thr) -> setupSuspendPopFrameEvent(0, doNothingMethod, thr), - SuspendEvents::clearSuspendPopFrameEvent); - final Method exceptionThrowCalledMethod = ExceptionThrowTestObject.class.getDeclaredMethod("calledFunction"); - System.out.println("Test stopped during notifyFramePop with exception on pop of calledFunction"); - runTestOn(new ExceptionThrowTestObject(false), - (thr) -> setupSuspendPopFrameEvent(0, exceptionThrowCalledMethod, thr), - SuspendEvents::clearSuspendPopFrameEvent); - final Method exceptionCatchThrowMethod = ExceptionCatchTestObject.class.getDeclaredMethod("doThrow"); - System.out.println("Test stopped during notifyFramePop with exception on pop of doThrow"); - runTestOn(new ExceptionCatchTestObject(), - (thr) -> setupSuspendPopFrameEvent(0, exceptionCatchThrowMethod, thr), - SuspendEvents::clearSuspendPopFrameEvent); + // Disable more often then we technically need to in order to avoid the need + // for a huge number of possible results and allow the test to be easily + // used in CTS. + if (IS_ART && canRunClassLoadTests && CanRunClassLoadingTests()) { + System.out.println("Test stopped during notifyFramePop without exception on pop of calledFunction"); + runTestOn(new StandardTestObject(false), + (thr) -> setupSuspendPopFrameEvent(1, doNothingMethod, thr), + SuspendEvents::clearSuspendPopFrameEvent); + + System.out.println("Test stopped during notifyFramePop without exception on pop of doNothing"); + runTestOn(new StandardTestObject(false), + (thr) -> setupSuspendPopFrameEvent(0, doNothingMethod, thr), + SuspendEvents::clearSuspendPopFrameEvent); + + System.out.println("Test stopped during notifyFramePop with exception on pop of calledFunction"); + runTestOn(new ExceptionThrowTestObject(false), + (thr) -> setupSuspendPopFrameEvent(0, exceptionThrowCalledMethod, thr), + SuspendEvents::clearSuspendPopFrameEvent); + + System.out.println("Test stopped during notifyFramePop with exception on pop of doThrow"); + runTestOn(new ExceptionCatchTestObject(), + (thr) -> setupSuspendPopFrameEvent(0, exceptionCatchThrowMethod, thr), + SuspendEvents::clearSuspendPopFrameEvent); + } System.out.println("Test stopped during ExceptionCatch event of calledFunction " + "(catch in called function, throw in called function)"); diff --git a/test/1954-pop-frame-jit/jvm-expected.patch b/test/1954-pop-frame-jit/jvm-expected.patch index 718f8ad839..6539d56b27 100644 --- a/test/1954-pop-frame-jit/jvm-expected.patch +++ b/test/1954-pop-frame-jit/jvm-expected.patch @@ -1,4 +1,19 @@ -75,94d74 +37,50d36 +< Test stopped during notifyFramePop without exception on pop of calledFunction +< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +< result is StandardTestObject { cnt: 2 } base-call count: 1 +< Test stopped during notifyFramePop without exception on pop of doNothing +< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +< result is StandardTestObject { cnt: 1 } base-call count: 1 +< Test stopped during notifyFramePop with exception on pop of calledFunction +< Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0 +< art.Test1953$ExceptionThrowTestObject$TestError thrown and caught! +< result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1 +< Test stopped during notifyFramePop with exception on pop of doThrow +< Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0 +< art.Test1953$ExceptionCatchTestObject$TestError caught in called function. +< result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1 +75,94d60 < Test stopped during a ClassLoad event. < Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 0} base-call-count: 0 < Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME diff --git a/test/1955-pop-frame-jit-called/jvm-expected.patch b/test/1955-pop-frame-jit-called/jvm-expected.patch index 718f8ad839..6539d56b27 100644 --- a/test/1955-pop-frame-jit-called/jvm-expected.patch +++ b/test/1955-pop-frame-jit-called/jvm-expected.patch @@ -1,4 +1,19 @@ -75,94d74 +37,50d36 +< Test stopped during notifyFramePop without exception on pop of calledFunction +< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +< result is StandardTestObject { cnt: 2 } base-call count: 1 +< Test stopped during notifyFramePop without exception on pop of doNothing +< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +< result is StandardTestObject { cnt: 1 } base-call count: 1 +< Test stopped during notifyFramePop with exception on pop of calledFunction +< Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0 +< art.Test1953$ExceptionThrowTestObject$TestError thrown and caught! +< result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1 +< Test stopped during notifyFramePop with exception on pop of doThrow +< Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0 +< art.Test1953$ExceptionCatchTestObject$TestError caught in called function. +< result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1 +75,94d60 < Test stopped during a ClassLoad event. < Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 0} base-call-count: 0 < Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME diff --git a/test/1956-pop-frame-jit-calling/jvm-expected.patch b/test/1956-pop-frame-jit-calling/jvm-expected.patch index 718f8ad839..6539d56b27 100644 --- a/test/1956-pop-frame-jit-calling/jvm-expected.patch +++ b/test/1956-pop-frame-jit-calling/jvm-expected.patch @@ -1,4 +1,19 @@ -75,94d74 +37,50d36 +< Test stopped during notifyFramePop without exception on pop of calledFunction +< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +< result is StandardTestObject { cnt: 2 } base-call count: 1 +< Test stopped during notifyFramePop without exception on pop of doNothing +< Single call with PopFrame on StandardTestObject { cnt: 0 } base-call-count: 0 +< result is StandardTestObject { cnt: 1 } base-call count: 1 +< Test stopped during notifyFramePop with exception on pop of calledFunction +< Single call with PopFrame on ExceptionThrowTestObject { cnt: 0 } base-call-count: 0 +< art.Test1953$ExceptionThrowTestObject$TestError thrown and caught! +< result is ExceptionThrowTestObject { cnt: 2 } base-call count: 1 +< Test stopped during notifyFramePop with exception on pop of doThrow +< Single call with PopFrame on ExceptionCatchTestObject { cnt: 0 } base-call-count: 0 +< art.Test1953$ExceptionCatchTestObject$TestError caught in called function. +< result is ExceptionCatchTestObject { cnt: 1 } base-call count: 1 +75,94d60 < Test stopped during a ClassLoad event. < Single call with PopFrame on ClassLoadObject { cnt: 0, curClass: 0} base-call-count: 0 < Failed to pop frame due to java.lang.RuntimeException: JVMTI_ERROR_OPAQUE_FRAME diff --git a/test/knownfailures.json b/test/knownfailures.json index 722f866cb8..09f5cdcc40 100644 --- a/test/knownfailures.json +++ b/test/knownfailures.json @@ -1386,10 +1386,6 @@ "960-default-smali", "966-default-conflict", "990-field-trace", - "1953-pop-frame", - "1954-pop-frame-jit", - "1955-pop-frame-jit-called", - "1956-pop-frame-jit-calling", "2009-structural-local-ref", "2011-stack-walk-concurrent-instrument", "2012-structural-redefinition-failures-jni-id", |