From 5989fa6dd8a2fd49d20266e203380804b2dab7eb Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Fri, 24 Nov 2023 10:13:37 +0000 Subject: Disable a few tests that don't work with ART There are a few checks related to passing an invalid method id / field id and expecting an invalid response. ART has never supported this. RI doesn't have the expected behaviour too. These tests are already marked as expected failures. Disabling these tests to avoid cluttering the logcat with check failures and also the tests aren't very useful in the current form to catch any errors. This CL disables following tests: org.apache.harmony.jpda.tests.jdwp.ClassType_InvokeMethodTest.testInvokeMethod002 org.apache.harmony.jpda.tests.jdwp.ClassType_InvokeMethodTest.testInvokeMethod003 org.apache.harmony.jpda.tests.jdwp.ReferenceType_GetValues002Test.testGetValues002 org.apache.harmony.jpda.tests.jdwp.ReferenceType_GetValues004Test.testGetValues004 org.apache.harmony.jpda.tests.jdwp.StringReference_ValueTest.testStringReferenceValueTest001_NullString org.apache.harmony.jpda.tests.jdwp.ClassType_InvokeMethod002Test.testInvokeMethod_wrong_argument_types Bug: 227193963 Test: art/tools/run-libjdwp-tests.sh Change-Id: If91178167139d14770220cb13d89f2456942230f --- .../apache/harmony/jpda/tests/share/AllTests.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/jdwp/src/test/java/org/apache/harmony/jpda/tests/share/AllTests.java b/jdwp/src/test/java/org/apache/harmony/jpda/tests/share/AllTests.java index 55ce1ca..62862ec 100644 --- a/jdwp/src/test/java/org/apache/harmony/jpda/tests/share/AllTests.java +++ b/jdwp/src/test/java/org/apache/harmony/jpda/tests/share/AllTests.java @@ -129,6 +129,27 @@ public class AllTests { // though. Set bad_test_cases = new HashSet<>(); bad_test_cases.addAll(Arrays.asList(TEST_OPTIONS.getBadTestCases())); + + // TODO(b/227193963): ART and RI don't report errors for certain JNI checks like incorrect + // method IDs on invoke method or incorrect field ids on GetField. Though this is required by + // the spec ART has never supported this. RI doesn't support it either. So disable the following + // tests. + bad_test_cases.add( + "org.apache.harmony.jpda.tests.jdwp.ClassType_InvokeMethodTest#testInvokeMethod002"); + bad_test_cases.add( + "org.apache.harmony.jpda.tests.jdwp.ClassType_InvokeMethodTest#testInvokeMethod003"); + bad_test_cases.add( + "org.apache.harmony.jpda.tests.jdwp.ReferenceType_GetValues002Test#testGetValues002"); + bad_test_cases.add( + "org.apache.harmony.jpda.tests.jdwp.ReferenceType_GetValues004Test#testGetValues004"); + bad_test_cases.add( + "org.apache.harmony.jpda.tests.jdwp.StringReference_ValueTest#" + + "testStringReferenceValueTest001_NullString"); + bad_test_cases.add( + "org.apache.harmony.jpda.tests.jdwp.ClassType_InvokeMethod002Test#" + + "testInvokeMethod_wrong_argument_types"); + + FilterSuite suite = (k) -> { try { baseSuite.addTest( -- cgit v1.2.3