summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Test Class.forName and serialization on inner classesIan Rogers2012-02-174-1/+48
| | | | Change-Id: Ib8e5e5df02818ca05d46d866f60a59c07a843d51
* Test behavior of int shifts >= 32Ian Rogers2012-02-172-0/+35
| | | | Change-Id: I6e228418068b70447295f367ed56ff8cb86abd33
* Use debug dex2oatd in run-testBrian Carlstrom2012-02-165-5/+5
| | | | Change-Id: Ief6e78b965081e4c884a48a048fc6d3021ca83bd
* user build support for art (2 of 3)Brian Carlstrom2012-02-167-8/+8
| | | | Change-Id: I4696fee58e43db48540e2442c4235fc4bb02d9e3
* We replace -d with -O recently, but not uniformly.Elliott Hughes2012-02-143-25/+20
| | | | Change-Id: Ia66037addabe8f0c61531d955bf570aa4c7c83e6
* Only JDWP exposes ACC_SUPER.Elliott Hughes2012-02-141-2/+10
| | | | | | Also track the use of suppressed exceptions with ClassNotFoundException. Change-Id: I5349d2e397f94c162cf44435cd36cab71f233480
* Add a new dalvik run-test test to art.Elliott Hughes2012-02-103-0/+13
| | | | | | Original: https://android-review.googlesource.com/32551 Change-Id: I0503818af15f427c6419a7a7a49689b3c2596ede
* Add access check slow paths to field accessesIan Rogers2012-02-051-7/+7
| | | | | | | | | | | | | | | | | | | This check makes the verifier, compiler and runtime agree with who should perform access checks and fixes compliance for these instructions. Introduce new "fast" sget/sput that just get the static storage base from a method's declaring class when the static field is within the same class. Saves a load and branch in the common case. Fold gen routines for wide and not wide together. Fix bug where sub-classes could appear intialized in the image but their parents were only verified. Extra debug output for test case 075. Change-Id: I934da3624ed8fa8e026b2c95d936d04b1af022ef
* Testing should use debug dex2oat and oatexec by defaultIan Rogers2012-02-032-5/+6
| | | | Change-Id: Ib674f60a73bbe9c20fa7c0719ce0c9057a9e3a9e
* Tests should include exception stack traces on failure.Elliott Hughes2012-02-021-2/+2
| | | | Change-Id: I8f50285202a3d7328efac8bc30ac2ba7beab5efc
* Fix a few bugs in push-and-run-test-jar.Elliott Hughes2012-02-017-14/+14
| | | | | | | | | | | | | | Simon says it's "adb shell mkdir", not "adb mkdir" (which was silently failing). We shouldn't be putting test .jar and .oat files in /system/framework (silently causing --quiet to use out of date code). The runtime has been looking for X.jar.oat given X.jar for some time now (which was silently causing all modes to use out of date code in conjunction with a to-be-fixed bug that's preventing us from recognizing that the .oat file's checksum is out of date). Change-Id: I2421878159f24cc7564faa105a3e795c09929158
* Manually merge my AOSP update to the VM tests.Elliott Hughes2012-01-3133-73/+925
| | | | | | | | Original change: https://android-review.googlesource.com/32051 Bug: http://code.google.com/p/android/issues/detail?id=21599 Bug: http://code.google.com/p/android/issues/detail?id=21597 Change-Id: I31e440b66b720647afab54ca39fd6eb1bbb0cb60
* Change Fibonacci to default argument when none provided for ↵Brian Carlstrom2012-01-311-8/+10
| | | | | | test-art-target-oat-Fibonacci Change-Id: I497225b7d232bd1282db9beb89ff8e8401a46253
* Class::SetStatus(kStatusError) now checks that an exception is pending and ↵Brian Carlstrom2012-01-312-5/+5
| | | | | | uses it to SetVerifyErrorClass Change-Id: I02f4adc51ac6da88d4969655fa828f93941c4c0a
* Adjust expected line numbers in tests to account for fixed copyright headersBrian Carlstrom2012-01-313-11/+11
| | | | Change-Id: Iac6305eaf67a6857c385b850104534860febbcd0
* Fix copyright headers.Elliott Hughes2012-01-30107-111/+1606
| | | | Change-Id: I5b7bc76a370238d810d78522bd5531600746700f
* Make the class loading behavior closer to the RI's.Elliott Hughes2012-01-262-17/+6
| | | | Change-Id: Ic2ab91dc5a455a97dbcbe1f2d7b464a888d5bb66
* Merge "Upgrade to latest dlmalloc. Refactor Heap and related APIs to use STL ↵Ian Rogers2012-01-261-6/+6
|\ | | | | | | like naming." into dalvik-dev
| * Upgrade to latest dlmalloc. Refactor Heap and related APIs to use STL like ↵Ian Rogers2012-01-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | naming. We fail assertions in the existing heap code, as does Dalvik. This refactoring is to clean the heap and space APIs and to reduce duplication of data and thereby solve a failing assertion in the card table. This change also wires up clearing of soft references including before out-of-memory errors are reported. In doing this change it was made clear that mspaces are buggy (and violating invariants with the garbage collector). This change upgrades to an un-Android molested version of dlmalloc-2.8.5 and implements a version of the mspace morecore routine under ART control. run-test 061-out-of-memory is updated for current heap sizes. Change-Id: I377e83ab2a8c78afb9b1881f03356929e2c9dc64
* | Be honest about our assertions implementation.Elliott Hughes2012-01-262-2/+2
|/ | | | Change-Id: Ida4512e2953a47df999a125fa417cb867e22d45b
* Fix test 046.Elliott Hughes2012-01-262-2/+6
| | | | | | | | Looks like a recent change put us on an untested code path, and we need to start distinguishing callers' intentions. We can also remove some unnecessary duplication. Change-Id: I950139e6fdc8656b89d8e1520e8b50f681c7f7b2
* This fixes several of the VM tests.Elliott Hughes2012-01-261-10/+2
| | | | Change-Id: I4140302914d2066d754c93ee511e51c8e5498cfd
* Fix thread hangBrian Carlstrom2012-01-251-1/+6
| | | | | | | | | - Primary problem was ScopedThreadListLock was releasing heap lock in constructor instead of destructor - Secondary problem was ScopedThreadListLock should not be used with Mutex::Wait - Added Thread.getStackTrace case to ThreadStress that reproduces YouTube problem - Added Mutex::GetDepth and related methods that were useful in diagnoising this issue Change-Id: I1bdc7245e9b411378b98f4dcf498ad66eb96366d
* Improve exceptions thrown during class loading.Elliott Hughes2012-01-243-0/+39
| | | | | | | | | | | | We've always gone to a lot of trouble to have good detail messages when something goes wrong during class loading, but none of those exceptions would ever make it to the calling code. This adds missing exception chaining, and also adds a test for the case where a subclass is missing its superclass; before we'd have reported that the subclass was missing, but now we make it clear that the real error was an inability to find the superclass. Change-Id: I07ebc011ccdaed16be82bf08b323393e1d790989
* Interface dispatch bugIan Rogers2012-01-1813-1/+88
| | | | | | | | | | | | Interface methods should bind to the lowest sub-interface. Only search declared methods in a class before trying to find the interface method via the iftables. Unit test that declares toString in an concrete class, where toString has been made an interface method in CharSequence. ecj compiles this method call into an invokeinterface (hence the custom build). Change-Id: Iefa394c9e7a22da9c6ea58f07a77880102c2f966
* Fix for issue 5884080: Loop formation regressionbuzbee2012-01-183-0/+23
| | | | | | | | | This CL is the art version of https://android-git.corp.google.com/g/#/c/159057/1 The basic problem had been partially fixed in the existing art code, but this CL is a more comprehensive fix. Change-Id: I59336ed4265a3535d6da7d51c9243430c68536bd
* Add GC map to oat fileBrian Carlstrom2012-01-172-2/+2
| | | | Change-Id: Ied0462c711a09e2542f231c3b2fa31239958bd28
* Fixes for 071-dexfileIan Rogers2012-01-111-3/+3
| | | | | | | | | | Ensure dex2oat has the correct process group. Don't unmap dex file in DexFile.open. Diagnostic warning messages in DexFile.open in particular as the class loader will swallow the IOExceptions without logging. Fix location of test-ex.jar for test 068-classloader. Change-Id: Ie54ebb98b687db1eb30091c86de9beb860c26c3d
* Fix 086-null-super and 087-gc-after-linkIan Rogers2012-01-102-2/+2
| | | | | | | | Parallel run-test means that the dex files for 086 and 087 are no longer always in test.jar. Correct the behavior of the class linker when Classloader.loadClass returns null to be the behavior of Dalvik. Change-Id: Icf6363e118d03a01060012ac558b5f1a484d74f9
* Fix for test 003-omnibus-opcodesIan Rogers2012-01-101-4/+7
| | | | | | | | The test is holding a string that is hoped to be cleared live in a dex register. Avoid this bug in the test by creating the weak reference in a separate method. Bug: 5771901 Change-Id: I8713e153ec0ce7e028d0587ac8132596d73e955b
* Rename SystemMethods to ReflectionTest.Elliott Hughes2012-01-091-60/+60
| | | | | | This test started out as one thing, but ended up as something else. Change-Id: Idf85693cf49acf0ed198a92c4f3c66db31214ac0
* Add installd support to dex2oatBrian Carlstrom2012-01-055-6/+6
| | | | Change-Id: Id1a64403ccea7dc2c1e8b8340d33d383d4045a33
* Ensure that 055 checks we don't cheat on the library side...Elliott Hughes2011-12-161-0/+20
| | | | | | | Class.isEnum is expensive, but we need to make sure that it's cached rather than skipped. Change-Id: I130c683e3b48ccb2fd93dfca8e6ae3e73c8393f6
* Improve the ThreadStress test to send SIGQUIT, and fix the bug that finds.Elliott Hughes2011-12-151-1/+9
| | | | | | | | | | | | I'd heard complaints of a system_server deadlock on crespo, but wasn't seeing it on mysid. I did see it soon after trying to use crespo, but system_server has way too many threads and adb is too damn unreliable for me to effectively debug that. This improves ThreadStress so we exercise that path lots, and catch the deadlock relatively quickly with relatively few threads. The fix is explained in a code comment that's larger than the fix. Change-Id: I593bc94cf1239065a604703568420986a03ce628
* Fix 088 the way the test's author intended.Elliott Hughes2011-12-141-2/+0
| | | | | | | | | Not only was some of the verification code disabled in dalvik, part of the test was too. This test was _intended_ to check that we fail gracefully when our monitor-enter stack overflows. Re-enable the test, and throw a verification error on overflow. Change-Id: Iaa973633ecc59c3c4810b97ada80eae1e4db3db5
* Knock 0.5s off the Calculator startup time.Elliott Hughes2011-12-131-1/+1
| | | | | | | | Down to 2.5s on mysid. We now only mess around with std::strings when we need to synthesize a descriptor. If we can just hand out a const char* straight from the dex file -- which most of the time we can -- we now do. Change-Id: Iddec7062d8bd578bd25f671eb4d597e9ed064d65
* Fix regression in vm tests 021 and 082Ian Rogers2011-12-125-6/+6
| | | | | | | | | dex2oat defaults to build.art for the image which includes the junit classes used by these tests. At runtime these tests are run with core.art and so the code is missing. Change dex2oat to specify the boot image is core.art. Change-Id: Icd80560ac06798634f47922cc9fb592966f2b511
* Revert dex2oat file lockingBrian Carlstrom2011-12-126-8/+14
| | | | | | | | Effectively "git revert 234da578a2d91ed7f2ef47b2ec23fb0033e2746b" Changed run-test to do dex2oat on the host to eliminate original motivation for dex2oat locking Change-Id: I58d64f9b2ad7cf137df865945dd31361ca57f675
* Reduce meta-data object sizes, introduce meta-data helper classes.Ian Rogers2011-12-062-11/+15
| | | | Change-Id: Id14ad218f1c74c659701352fdf1a45bf6444daa3
* Always compile tests with -g.Elliott Hughes2011-11-301-1/+1
| | | | | | | Although it was useful in shaking out one bug to be debugging without -g, it's not generally useful. Change-Id: Ie585e142d8a8171c9d1be636e96963a2a9d6f739
* Implement enough JDWP functionality that we can attach jdb.Elliott Hughes2011-11-161-2/+2
| | | | | | | | | You can also try "classes" and "classpath", though anything else deadlocks because we're suspended but jdb thinks we aren't. I don't think that's a new bug with this patch, though, so I'll look at that next. Change-Id: I54456b6a7fe72642be696c66aa485dc0c8a7f913
* Refactor the use of Method by the compiler.Ian Rogers2011-11-131-2/+2
| | | | | | | | | Remove the dependence on the Method object in dex2oat, allowing lazier resolution. Introduce new find and iterators in DexFile to simplify common operations and avoid misuse of class data items. Change-Id: I39fb8252190f543d89d8b233076355cec310fe08
* Added support for -XX:HeapGrowthLimit switchjeffhao2011-10-281-0/+57
| | | | | | | | | | | Runtime can now take in a growth limit for the heap, which can be smaller than the maximum size of the heap, and will prevent the heap from growing beyond that size. The growth limit can also be cleared to increase the size of the heap to the specified maximum size. This gives apps some control of the size of the heap, but should be removed when we have better ways to resize the heap. Change-Id: I338655bccd20bfd32e2318365f0f3283dbaaab1e
* Testing with the new verifier, fix comments as going through code.Shih-wei Liao2011-10-281-20/+149
| | | | | | Add helper functions for debugging GC map. Change-Id: I13fd4bbd5002bc1e9c8568be9ef3c0f16c2ab63f
* Fix the ReferenceMap test.Shih-wei Liao2011-10-271-108/+83
| | | | Change-Id: Ib580210b2b51f5cf4480843dbb6b939bc2584956
* Created --runtime-arg switch for dex2oat to pass arguments to runtime.jeffhao2011-10-254-24/+0
| | | | | | This replaces the -Xms, -Xmx, and -verbose options. Change-Id: Idc023b6d369bd8b5df932b9f2eb6dbc79d591ab1
* Fix the StackWalk unit test. SegFault was caused by wrong comparisons.Shih-wei Liao2011-10-241-3/+3
| | | | Change-Id: Ie2c6bc44cb171a73bc20968feabdba328e35de74
* Wire up enough of the pieces that we can connect ddms or jdb.Elliott Hughes2011-10-241-0/+8
| | | | | | (And die with an UNIMPLEMENTED as soon as they connect, of course.) Change-Id: I9abb25d581384361c215b3cd96b8278c751e79ea
* Verifier clean up.Ian Rogers2011-10-242-81/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part in trying to move to a more rigorous mode of asserting the validity of garbage collection maps. In the bring over of the verifier from Dalvik a large class had been created where all of the Dalvik/Dex functions were static methods of that class. This rewrite introduces 3 key classes, Verifier that orchestrates the verification of a method, RegisterLine which describes the types associated with registers for a particular PC and RegType which describes the current type of a register within a line. The functionality is brought over from Dalvik but cleaned up to not do things like goto. Failing within the verifier is also cleaned up. By virtue of having stateful objects the interfaces between different aspects of the verifier are greatly simplified. To save space, RegTypes are cached upto a maximum possible 2^16, and given an Id. As the number of RegTypes is typically small this means that we have a full OO implementation but at a lower space cost than the current convention that uses botched together enum values requiring 32bits of storage in a RegisterLine rather than 16bits (ie half the space requirement per register in a register line). To make use of this space more rigorous monitor verification is brought back, and ultimately I think we can work around bug 3215458 with richer RegTypes that are aware of literal objects. The code removes short cuts that had been added to Dalvik's verifier and appear illegitimate, it also fixes a large number of bugs in the description of the verifier. Where possible the spaghetti of code is replaced with straight line if-then-elsif.. code that clearly follows the ordering semantics of the specification. The code is also aiming toward having a more type rigorous description of the verification process, and when this isn't possible following the description convention of the specification. Change-Id: Id25b742018a2ad5ea95687973cca610d7e19513c
* dex2oat invoked by system if it can't find an oat file for a dex file.jeffhao2011-10-242-10/+0
| | | | | | | | This allows the old dalvik tests to be run without ever explicitly running dex2oat on anything. Just upload the jar files and the system will take care of generating the files it needs. Change-Id: Iad553bf6f57e28da4edb8eb0df47e62e08a0be44