summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Incorrect result of compareTo between empty and non-empty stringsAlexei Zavjalov2014-02-271-0/+4
| | | | | | | | | | Current implementation of the Strings.compareTo() handles the case when empty string compares to non-empty string in the wrong way. This patch adds handler for such cases. Change-Id: I35cc2cfd5141551d6da65748c44b59e64a3f8117 Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
* Add tests for null check elimination by local value numbering.Vladimir Marko2014-02-212-1/+51
| | | | Change-Id: I0c3355b3c38b8830fffe2233ede7f6a35488b6fe
* Make 030-bad-finalizer less flaky by removing timing dependent outputBrian Carlstrom2014-02-203-56/+35
| | | | | Bug: 13108062 Change-Id: If4b0efc70b39690b6cbacc2205853a06e0df8f53
* Merge "Try to make 036-finalizer less flaky by moving output to one thread"Brian Carlstrom2014-02-203-48/+35
|\
| * Try to make 036-finalizer less flaky by moving output to one threadBrian Carlstrom2014-02-203-48/+35
| | | | | | | | | | Bug: 13108062 Change-Id: I946044d007dda4efa85794e2361ecb2ce102be64
* | Remove test 048-server-socketBrian Carlstrom2014-02-203-76/+0
|/ | | | | | | ServerSocket is tested by libcore CTS tests Bug: 13108062 Change-Id: Icf59bf870b783bc638e67f2e485b8658027ba036
* Do not FixupStaticTrampolines of uninitialized classesBrian Carlstrom2014-02-192-0/+32
| | | | | Bug: 13027732 Change-Id: I5966d63afd8fbcd091801297290f117f3c9cb44c
* Fixes to allow test-art-host to run via build serverBrian Carlstrom2014-02-193-4/+11
| | | | Change-Id: Ifc4259ab03cb3867b625c2e1edf4352398c8a8e8
* Remove blacklistSebastien Hertz2014-02-175-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the class initialization blacklist and use transaction to detect and revert class initialization attempting to invoke native method. This only concerns class initialization happening at compilation time when generating an image (like boot.art for the system). In transactional mode, we log every object's field assignment and array update. Therefore we're able to abort a transaction to restore values of fields and array as they were before the transaction starts. We also log changes to the intern string table so we can restore its state prior to transaction start. Since transactional mode only happens at compilation time, we don't need to log all these changes at runtime. In order to reduce the overhead of testing if transactional mode is on/off, we templatize interfaces of mirror::Object and mirror::Array, respectively responsible for setting a field and setting an array element. For various reasons, we skip some specific fields from transaction: - Object's class and array's length must remain unchanged so garbage collector can compute object's size. - Immutable fields only set during class loading: list of fields, method, dex caches, vtables, ... as all classes have been loaded and verified before a transaction occurs. - Object's monitor for performance reason. Before generating the image, we browse the heap to collect objects that need to be written into it. Since the heap may still holds references to unreachable objects due to aborted transactions, we trigger one collection at the end of the class preinitialization phase. Since the transaction is held by the runtime and all compilation threads share the same runtime, we need to ensure only one compilation thread has exclusive access to the runtime. To workaround this issue, we force class initialization phase to run with only one thread. Note this is only done when generating image so application compilation is not impacted. This issue will be addressed in a separate CL. Bug: 9676614 Change-Id: I221910a9183a5ba6c2b99a277f5a5a68bc69b5f9
* Don't hardcode object layout in Unsafe and space_test.Hiroshi Yamauchi2014-02-113-1/+120
| | | | | | Add a test for Unsafe.arrayBaseOffset() and Unsafe.arrayIndexScale(). Change-Id: I9cbdb79a4a7ee055129f41811a117910c8b2febd
* Add regression test for Thread.interruptedBrian Carlstrom2014-02-102-49/+64
| | | | | Bug: 12929305 Change-Id: Ic896e164da0f67babdd423d5adb6e84aaa80cab2
* Add wide setter test with preceding parameters as int.Vladimir Marko2014-02-101-2/+27
| | | | Change-Id: Ieeef0318d140aad963f75e5d14938e5e7a9eec41
* Tweak test to better expose codegen bug.Ian Rogers2014-02-071-4/+4
| | | | | | Place a non-zero value in high 32bits. Change-Id: I6ff42de39d56c4e4d6f44eb0001460ba6d58aa75
* Update ART tests to handle new System.gc behaviorMathieu Chartier2014-02-0412-20/+21
| | | | | | | | | | Changed calls from System.gc to Runtime.getRuntime.gc where it was necessary. Required for: https://android-review.googlesource.com/#/c/80253/ Change-Id: I2b0622585da54229a6248e95d40134b6d18598a9
* Disable LOCAL_DEX_PREOPT for non-default LOCAL_DEX_PREOPT_IMAGEBrian Carlstrom2014-01-271-0/+2
| | | | Change-Id: Id5634250422138195218463e731b2d3772cba48f
* Merge "Work around 103-string-append slowness by not running debug build"Brian Carlstrom2014-01-251-0/+18
|\
| * Work around 103-string-append slowness by not running debug buildBrian Carlstrom2014-01-241-0/+18
| | | | | | | | | | | | Based on 055-enum-performance/run. Change-Id: Iaae81f070b84e044999f126821752c6df8b30bfd
* | Fix test-art-host to work with latest build project that does not set ↵Brian Carlstrom2014-01-241-2/+2
|/ | | | | | LOCAL_MODULE_PATH Change-Id: I75034005d77c6e6a901ca327d7b5ea348cff23dc
* Inline codegen for long-to-double on ARM.Ian Rogers2014-01-081-0/+18
| | | | Change-Id: I4fc443c1b942a2231d680fc2c7a1530c86104584
* Fix run-test 303-verification-stress.Sebastien Hertz2014-01-081-0/+30
| | | | | Bug: 12439831 Change-Id: I3d3fc0978543ae8c6fc76d88b9edece1e17bc7ce
* Merge "Add verification stress test."Sebastien Hertz2014-01-075-0/+138
|\
| * Add verification stress test.Sebastien Hertz2013-12-135-0/+138
| | | | | | | | | | | | | | | | This is more a benchmark than a real test. It highlights a pattern where Art's verifier is currently slower than Dalvik's verifier. Bug: 12126841 Change-Id: I1ed6466798696b0aa04b94edac2d2b9d0015c6a2
* | Merge "Fix host-run-test-jar to be legal for /bin/sh"Elliott Hughes2013-12-201-1/+3
|\ \
| * | Fix host-run-test-jar to be legal for /bin/shMark Mendell2013-12-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | At least on my machine, /bin/sh complains about the [[ line. Rewrite as a standard shell 'if' Change-Id: I68efc4ceab8e2eb5636fa04ce8877883a4d76998 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* | | JNI: NewDirectByteBuffer should allow 0 length buffers.Narayan Kamath2013-12-202-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | This makes the implementation symmetric with direct buffers allocated from java. - GetDirectBufferAddress returns the address of the buffer passed in to NewDirectByteBuffer (and not NULL). - GetDirectBufferCapaticy returns 0. bug: https://code.google.com/p/android/issues/detail?id=63055 Change-Id: I55b24623ec4f7670972fed898ea097934c6c0b5f
* | Move boot image generation to the build projectBrian Carlstrom2013-12-171-1/+0
| | | | | | | | Change-Id: I1c87640baa681ed5f0bc10bca8dc130895bb6a95
* | Fix FindFieldID to use class's classloader to find field type.Jeff Hao2013-12-102-0/+48
| | | | | | | | | | | | | | | | | | Also includes a test case, though the test case does not recreate this exact issue because the attached native thread would need to have a null context classloader. Bug: 11737351 Change-Id: Ieb7536702a556485d667361124cd7985b712b093
* | Fix races in thread list Unregister.Mathieu Chartier2013-12-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First race: We were releasing the thin_lock_id in Unregister before the thread was not suspended. This could cause problems in SuspendThreadByThreadId since there was a small window of time where two threads could share the same thread id. This race caused an occasional check failure in SuspendThreadByThreadId. Second race: We were setting the thin_lock_thread_id_ to 0 in Unregister before waiting to not be suspended. This caused another race in SuspendThreadByThreadId where we modified the thread suspend count, busy waited, but didn't find the thread the next iteration. This meant that we were returning null even though we had modified the suspend count. This caused the suspend count to not get decremented since the caller didn't know that the suspend count had been increased. Removing the self->thin_lock_thread_id_ = 0 in ThreadList::UnRegister fixes this race. Added a bit of additional checks and logging to prevent these issues from resurfacing, other misc cleanup. Added thread names to threads in ThreadStress. Bug: 11319866 Change-Id: I48e3a0700193b72079e450be1e924a2f88cf52e2
* | Fix stack trace for proxy methods and added test case.Jeff Hao2013-12-042-3/+24
|/ | | | | | Bug: 11861564 Change-Id: I9513359ff9e5d345ee71d84388afed02bd114ecf
* am 8250232f: Update test/044-proxy/expected.txtBrian Carlstrom2013-11-251-1/+1
|\ | | | | | | | | * commit '8250232f44cd3ec85d4832174197d9b8287b70fe': Update test/044-proxy/expected.txt
| * Update test/044-proxy/expected.txtBrian Carlstrom2013-11-241-1/+1
| | | | | | | | Change-Id: If2b2aaac869ebfba3abb0f167bbd381054688a97
| * Fix BUILD_DALVIK_HOST_JAVA_LIBRARY to BUILD_HOST_DALVIK_JAVA_LIBRARYBrian Carlstrom2013-11-081-1/+1
| | | | | | | | Change-Id: I69f74e7207b19caae376746dc2dce102cbfde186
| * Merge "Merge remote-tracking branch 'goog/dalvik-dev' into merge-art"Brian Carlstrom2013-11-075-5/+59
| |\
* | | Search for miranda methods in virtual methods instead of interface.Jeff Hao2013-11-215-10/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also added tests that get miranda methods via reflection and jni. Miranda methods can't be found via reflection, and have the interface class as their declaring class when found via jni. Bug: 11736932 Change-Id: I92b4fdf31be64269898ed2686a28dfb6008b213a
* | | Fix BUILD_DALVIK_HOST_JAVA_LIBRARY to BUILD_HOST_DALVIK_JAVA_LIBRARYBrian Carlstrom2013-11-081-1/+1
| | | | | | | | | | | | Change-Id: I69f74e7207b19caae376746dc2dce102cbfde186
* | | am 91b81daa: Merge "Remove usage of LOCAL_BUILD_HOST_DEX"Narayan Kamath2013-11-071-2/+1
|\ \ \ | |/ / | | / | |/ |/| * commit '91b81daa60b50c915d5ac032bda4a3d8050695b9': Remove usage of LOCAL_BUILD_HOST_DEX
| * Remove usage of LOCAL_BUILD_HOST_DEXNarayan Kamath2013-11-011-2/+1
| | | | | | | | Change-Id: Id6745578e7ecc4899a52df5de2e81a915cdbb5e0
* | Merge "Avoid verifier crash for quickened invoke on null." into dalvik-devSebastien Hertz2013-10-301-8/+4
|\ \
| * | Avoid verifier crash for quickened invoke on null.Sebastien Hertz2013-10-291-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When verifying an invoke-virtual-quick on a "null" instance, we can't infer the class of the method being invoked. This CL handles this case and avoid a crash due to a failed check in RegType::GetClass. Also revert changes made to test 082-inline-execute since it succeeds with this CL now. Bug: 11427954 Change-Id: I4b2c1deaa43b144684539acea471543716f36fb3
* | | Implement Interface Method Tables (IMT).Jeff Hao2013-10-293-1/+55
| | | | | | | | | | | | Change-Id: Idf7fe85e1293453a8ad862ff2380dcd5db4e3a39
* | | am 661cc989: Merge "Make ART\'s run-test support Dalvik so we can remove ↵Brian Carlstrom2013-10-294-16/+76
|\ \ \ | |/ / |/| / | |/ | | | | | | dalvik/tests" * commit '661cc989b99e8eed3929a79aee9e10cfb5aa4f1d': Make ART's run-test support Dalvik so we can remove dalvik/tests
| * Make ART's run-test support Dalvik so we can remove dalvik/testsBrian Carlstrom2013-10-284-16/+76
| | | | | | | | Change-Id: Iba4ddf39169346573c97b443d5d65c6b8963fd4b
* | Fix test failure in SMART mode.Sebastien Hertz2013-10-291-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Update test 082-inline-execute to avoid a verifier issue with quickening. An invoke-virtual is quickened into an invoke-virtual-quick. However it is made on a "null" instance. During verification, we can't infer the method being invoked from the vtable index since we have no access to the class. This leads to fail on a check and abort. Bug: 11427954 Change-Id: I740d67c72abb617db67a2c35d9be8346358f78ce
* | am 67fe2b41: Fix backwards check in CheckStaticMethodBrian Carlstrom2013-10-162-0/+37
|\ \ | |/ | | | | | | * commit '67fe2b41a6afccf6ab1a58879eae3e0e8f3d6c7a': Fix backwards check in CheckStaticMethod
| * Fix backwards check in CheckStaticMethodBrian Carlstrom2013-10-162-0/+37
| | | | | | | | | | Bug: 11243757 Change-Id: I559d1163ce72ab7831bd328c621519acb72975e0
* | resolved conflicts for merge of b926b3c6 to dalvik-devBrian Carlstrom2013-10-113-0/+92
|\ \ | |/ | | | | Change-Id: Ic56131b49ddfa1ffbc9b50f15e79a0210bd07a41
| * Have JNI FindClass fall back to system ClassLoaderBrian Carlstrom2013-10-103-0/+92
| | | | | | | | | | | | Bug: 10994325 Change-Id: Id0a46e78eecfe8a9eb91008765c4fff48697cc58
| * Use class def index from java.lang.Class.Ian Rogers2013-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | Bug: 10244719 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. (cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69) Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
* | Introduce Signature type to avoid string comparisons.Ian Rogers2013-09-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Method resolution currently creates strings to then compare with strings formed from methods in other dex files. The temporary strings are purely created for the sake of comparisons. This change creates a new Signature type that represents a method signature but not as a string. This type supports comparisons and so can be used when searching for methods in resolution. With this change malloc is no longer the hottest method during dex2oat (now its memset) and allocations during verification have been reduced. The verifier is commonly what is populating the dex cache for methods and fields not declared in the dex file itself. Change-Id: I5ef0542823fbcae868aaa4a2457e8da7df0e9dae
* | Use class def index from java.lang.Class.Ian Rogers2013-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 10244719 Depends on: https://googleplex-android-review.git.corp.google.com/362363 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c