From: Vladimir Marko Date: Tue, 22 Nov 2016 13:18:00 +0000 (+0000) Subject: Fix 626-const-class-linking for no-dex2oat configuration. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0ba0c7d9b0;p=android-x86%2Fart.git Fix 626-const-class-linking for no-dex2oat configuration. For this configuration, the MisbehavingLoader.loadClass() is called twice, so we cannot rely on printing the message exactly once. Test: m ART_TEST_RUN_TEST_NO_DEX2OAT=true \ test-art-host-run-test-626-const-class-linking Bug: 30627598 Change-Id: I6daecb52efc1d25fc5cf796f8aef726666e97c8b --- diff --git a/test/626-const-class-linking/expected.txt b/test/626-const-class-linking/expected.txt index e83aa78f4..1243226ff 100644 --- a/test/626-const-class-linking/expected.txt +++ b/test/626-const-class-linking/expected.txt @@ -33,7 +33,6 @@ total: 4 throwables: 0 class_weaks: 4 (2 unique) testRacyLoader2 done -MisbehavingLoader loading Helper2 instead of Test java.lang.NoClassDefFoundError: Initiating class loader of type MisbehavingLoader returned class Helper2 instead of Test. testMisbehavingLoader done first: Helper1 class loader: RacyMisbehavingLoader diff --git a/test/626-const-class-linking/src/MisbehavingLoader.java b/test/626-const-class-linking/src/MisbehavingLoader.java index 61639ba73..ca9783e4e 100644 --- a/test/626-const-class-linking/src/MisbehavingLoader.java +++ b/test/626-const-class-linking/src/MisbehavingLoader.java @@ -40,7 +40,6 @@ public class MisbehavingLoader extends DefiningLoader { return super.loadClass(name, resolve); } else if (name.equals("Test")) { // Ask for a different class. - System.out.println("MisbehavingLoader loading Helper2 instead of Test"); return defining_loader.loadClass("Helper2", resolve); } return super.loadClass(name, resolve);