summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Give proxy all of the return types. Part 2.Jesse Wilson2011-10-242-10/+6
| | | | Change-Id: I953144290307f46824642837530ac4deeb6a78b2
* Basic JDWP option parsing...Elliott Hughes2011-10-212-3/+3
| | | | | | | ...and just enough code to silence all the UNIMPLEMENTED warnings you get during normal usage. Change-Id: I56820ac971b88581c4cb1f462c13331d8fa04c43
* Fixes for ThreadStress testBrian Carlstrom2011-10-211-6/+8
| | | | | | | | | - Fix deadlock when ThreadGroup.remove(Thread) was run with thread_list_lock_ but needed to GC to allocate an iterator - Fix ~MonitorList to clean ownership of any locks that might be held by JNI or daemon threads on shutdown. Change-Id: I95e23c3b7c745f6a8387789949f3ec849458a27d
* Add ThreadStress test to try and exercise corner casesBrian Carlstrom2011-10-211-0/+235
| | | | Change-Id: I8d151e9ba935b8c76406483c6c276cc26896aabf
* Merge "Reuse SIRT for C++ references" into dalvik-devBrian Carlstrom2011-10-201-1/+1
|\
| * Reuse SIRT for C++ referencesBrian Carlstrom2011-10-201-1/+1
| | | | | | | | Change-Id: I8310e55da42f55f7ec60f6b17face436c77a979f
* | Add --invoke-with and -d to the dalvik tests.Elliott Hughes2011-10-195-21/+27
|/ | | | Change-Id: I358945fd2b41c1615441c1687a582a66e662eba9
* System calls dex2oat when opening a dex file with an output locationjeffhao2011-10-193-12/+2
| | | | | | | | | This fix addresses the old dalvik test 071. The test has 2 source jars, and one is loaded later. To support this, the other jar has to be run though dex2oat. Eventually, we want the system to invoke dex2oat on any jar files that need it. Change-Id: Ie8428004f397cdb56ee437d0b38c0670f14e77fa
* Implement -Xjnigreflimit.Elliott Hughes2011-10-182-23/+3
| | | | Change-Id: Iaa31cf4ea4f90fc76baa4472b67fe6c2cc0e0277
* Move test codes out of src/. They belong to the test/ directory.Shih-wei Liao2011-10-172-0/+284
| | | | Change-Id: Icd671cfef4026facef37c81aa67f4bed24e8f640
* Fix a heap lock/thread list lock deadlock.Elliott Hughes2011-10-171-3/+1
| | | | | | | | | We had an uncaught OOME whose uncaught exception handler -- running with the thread lock held -- was trying to cause a GC while some other thread had the heap lock and was waiting for the thread list lock. Change-Id: I22177129562268837127d9edcc63ef5e93054bdf
* Fix annotations test 004.Jesse Wilson2011-10-171-2/+2
| | | | | | | | | | We use the Java return type rather than looking the return type up from the dex file because we don't have a dex file to look it up in. The expected results were sorted statics first; now we're sorting them non-statics first. Change-Id: Id4ac52cdec9b472483ec055e47ca1bc3c6a2d885
* Add ParallelGC to reproduce system_server hangBrian Carlstrom2011-10-171-0/+49
| | | | Change-Id: Ie563663df5fc744755102719378446b9efa16cf3
* Clarify cause of 071 failure with an UNIMPLEMENTEDBrian Carlstrom2011-10-161-12/+17
| | | | Change-Id: I6b76a53a44bb2c26fc226ef32628a63944db3dbe
* art/test build fixesbuzbee2011-10-163-12/+12
| | | | | | | Some of the old Dalvik tests have custom build rules - changed to support new location of core.art in data/art-test. Change-Id: I4a84c299e99c3567d8afe4f76e23a35ae26b754e
* Merge "Add a unit test for ReferenceMap that involves try-catch-finally." ↵Shih-wei Liao2011-10-151-0/+33
|\ | | | | | | into dalvik-dev
| * Add a unit test for ReferenceMap that involves try-catch-finally.Shih-wei Liao2011-10-151-0/+33
| | | | | | | | | | | | | | Stress test the ReferenceMap when the program may have out-of-bound exception. Change-Id: Iec892d9564c501794571a7c52519ac539a792d6e
* | Proxy implementationIan Rogers2011-10-144-3/+225
|/ | | | | | | | | | This rounds out the proxy implementation by adding missing pieces to the class linker, extending tests and fixing issues in the runtime support. There are also some tweaks for performance and to clean up Method/Object a little. A unit test of the functionality is "art/test/run-test 044" Change-Id: Id94102d10b81cd9b12b95ba8618f6187490204c4
* Move art content to /dataBrian Carlstrom2011-10-123-26/+26
| | | | | | | oat tests, gtests, and run-test content to /data/art-test boot.oat and boot.art to /data/art-cache Change-Id: I68f9f6798bc4ea0596642ff5624f3e77dec6ccbe
* Add -Xzygote to suppress starting the signal catcher thread.Elliott Hughes2011-10-114-66/+2
| | | | Change-Id: Iae98ac9d362c71074befbc702f8cae96888211ec
* Fix a handful of reflection bugs.Elliott Hughes2011-10-102-4/+7
| | | | | | We now pass test 046. Change-Id: Ie605ed99e64038435608fe388c59526674af5489
* Setup AbstractMethodError and dlsym stub when loading from oatBrian Carlstrom2011-10-101-2/+0
| | | | Change-Id: Ie97fa6eb3cfb7d0c6224aa6914f28a7b137ae056
* Working ClassLoaderBrian Carlstrom2011-10-106-7/+1
| | | | Change-Id: Ia1122165e47f846a1d4506111849f830d9f14c1b
* "Fix" racy test 030.Elliott Hughes2011-10-061-1/+1
| | | | | | | | Dalvik fails this test too. I think two waits of 5s on one side and a 10s wait on the other is too racy. This is a quick hack that brings one side down to two lots of 4s. Change-Id: I1176e21a3c31832f899d9423a89124c24dfd962d
* Fix the thread test to not be racy.Elliott Hughes2011-10-062-522/+19
| | | | | | | | We shouldn't assume we know what order threads will be started in. Running a debug build, it sometimes takes > 1ms to start the next thread. Change-Id: Icb7792f83809ad414cfcdf0828cdc198698deaf1
* Update test 031 to track the libcore annotations implementation changes.Elliott Hughes2011-10-061-11/+4
| | | | Change-Id: I22c6954dfff28d3c9a1faa193bc42b527a142f85
* Fix the expectations for test 007 to match the RI's output.Elliott Hughes2011-10-062-4/+6
| | | | | | Also distinguish between building and running in run-test. Change-Id: I4ca1a8b86839995959dd86b341086eb962e6f094
* Use a test-specific name for each generated file.Elliott Hughes2011-10-048-63/+71
| | | | | | | This lets us run multiple tests in parallel (and know what we've got lying around on our devices). Change-Id: I90ecc4ceaae0ee4b323d861c2b408e2944a2f8c1