History log of /art/test/run-test
Revision Date Author Comments
1c951926e1d3e732eaa76d489ca35e80bec0e890 06-May-2016 Dimitry Ivanov <dimitry@google.com> Fix libart tests on target

1. Add libart/d.so to the list of additional public libraries
2. Fix java.library.path to include /system/lib(64)? for tests
run by dalvikvm

Bug: http://b/28449304
Change-Id: I11f2dc22e445389160d6f7ed6743bb9664cf3745
(cherry picked from commit 90d48f28af67ab44d755363bf92d57a1b3e72a29)
1153ae16f243adb30fc8509c619025d30408c74a 04-Apr-2016 Richard Uhler <ruhler@google.com> Restore fallback behavior in the no-image stripped-dex case.

Add --strip-dex option to run-test to test this case.

Bug: 27599626

(cherry picked from commit 76f5cb6026b9c83bf00fd1007703503a327f704d)

Change-Id: I96bd2b013dd11ca1256f259181ea9c6087f16287
f0fe04cbaf189702e9dad7252ed834cb4735c877 13-Apr-2016 Alex Light <allight@google.com> Allow private methods in interfaces.

Private methods may be generated in interfaces during compilation of
some default methods. Change the verifier to allow these methods.

Bug: 27999840

(cherry picked from commit b55f1ac873f9541f391625c13fe9129fbd38e74c)

Change-Id: Ib8120a8f6cb036021334d9af0ed78ae372974ecb
7bcfcb80a31f57a84d754e00bca8698829365208 23-Mar-2016 Andreas Gampe <agampe@google.com> Revert "Revert "Use compiler filter to determine oat file status.""

This reverts commit 845e5064580bd37ad5014f7aa0d078be7265464d.

Add an option to change what OatFileManager considers up-to-date.
In our tests we're allowed to write to the dalvik-cache, so it
cannot be kSpeed.

(cherry picked from commit 29d38e77c553c6cf71fc4dafe2d22b4e3f814872)

Bug: 27689078
Change-Id: I6274188610f31dcd9d086fc080b2be93afae5a6b
29d38e77c553c6cf71fc4dafe2d22b4e3f814872 23-Mar-2016 Andreas Gampe <agampe@google.com> Revert "Revert "Use compiler filter to determine oat file status.""

This reverts commit 845e5064580bd37ad5014f7aa0d078be7265464d.

Add an option to change what OatFileManager considers up-to-date.
In our tests we're allowed to write to the dalvik-cache, so it
cannot be kSpeed.

Bug: 27689078
Change-Id: I0c578705a9921114ed1fb00d360cc7448addc93a
7db00cdc25a1a68cbc3d942834b08043ef1253c2 22-Mar-2016 Nicolas Geoffray <ngeoffray@google.com> Update Makefile and scripts after Quick removal.

Change-Id: I7610b34da337d81d9176ceca74e55ab85642a72b
97acf19053813bbfb5b957e51b9dd6efc16351b6 17-Mar-2016 Alex Light <allight@google.com> Make run-test give extra time when doing gc-stress runs.

Some tests (such as 968-default-partial-compile-generated) are running
up against the current timeout when run with gcstress. This increases
the timeout to allow the tests to run fully.

Change-Id: I89ada3affefd09d07c770a83d849f280293cc8ed
1c5b6da7a2ffef1bb14f30f41a3bbd78d3db7b18 16-Mar-2016 Nicolas Geoffray <ngeoffray@google.com> Set USE_JACK to true.

This fixes running checker when just doing art/test/run-test.

Change-Id: Icfac5896cdfd64eb16b0127d5f16f552b93ad03e
f02c3cf66c2c24533f6da43970e7b766b2ca9938 29-Feb-2016 David Brazdil <dbrazdil@google.com> ART: Switch Checker run-tests to Jack

Bug: 25635944
Change-Id: Ic6774028025b51f54589e9625003e8f69cf39dea
32ae80251b6967cfc83461ece771f9f7e5c202bc 23-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Compile checker run-tests with Jack"

Tests still faill.

Bug: 25635944
Bug: 19467889

This reverts commit fbeeb47fc63ec85891198b51b2309bb15f26527e.

Change-Id: I8f49dc6e8d3eb5f0de10636ef2685b7a2e08f297
fbeeb47fc63ec85891198b51b2309bb15f26527e 19-Feb-2016 Sebastien Hertz <shertz@google.com> Compile checker run-tests with Jack

Bug: 25635944
Bug: 19467889
Change-Id: I3c3fcbcbd2f6c142dbea279a9ecd9d372e79b3b9
51e4d44178919bf717e58365ce52a3c852d28465 19-Jan-2016 Yohann Roussel <yroussel@google.com> Remove usages of jill.jar, use jack instead

(cherry picked from commit aaa779a0a5f7afc23814728de68c6fe3ae1450bf)

Change-Id: I87fc0cdd34cf8107601af38f2559597200908173
aaa779a0a5f7afc23814728de68c6fe3ae1450bf 19-Jan-2016 Yohann Roussel <yroussel@google.com> Remove usages of jill.jar, use jack instead

Change-Id: Icb403ee6fb5bf287d2b72bb253b683b1d95f4e07
4694e82d0062fa6fabb18f3ada5c4e32499f7078 22-Jan-2016 Alex Light <allight@google.com> Raise ulimit for run-test 961.

Run-test 961 was rubbing against the ulimit, causing spurious
failures. This raises the ulimit the test runs under.

Bug: 26733951

Change-Id: I43f7c5f8e5e9e23ed139bd1fcc6bf24c526c546b
705ad49f353d3f90d8b63625aca2c2035bacdbef 21-Sep-2015 Alex Light <allight@google.com> Support directly invoking interface default methods

With the Java 8 Language one is allowed to directly call default
interface methods of interfaces one (directly) implements through the
use of the super keyword. We support this behavior through the
invoke-super opcode with the target being an interface.

We add 3 tests for this behavior.

Currently only supports slow-path interpreter.

Invoke-super is currently extremely slow.

Bug: 24618811

Change-Id: I7e06e17326f7dbae0116bd7dfefca151f0092bd2
57e863c3739c310380e19252ad5746ff08d219c7 11-Jan-2016 David Brazdil <dbrazdil@google.com> ART: Do not build Checker tests with `dx --no-optimize`

Change-Id: Ice9298b92cde5486db40ccdef43cca6d36179d2c
50be66fedd7575c58f419f013b1499845a41112a 28-Dec-2015 Andreas Gampe <agampe@google.com> ART: Remove core-junit from test boot classpath

Remove core-junit, which isn't used. Follow-up to commit
0ad65a3c794b18101def5096d8ed151382c9d5aa.

Change-Id: Ibac1c16e8b72688405dc59289dd22c1d9de69bb3
dcdc85bbd569f0ee66c331b4219c19304a616214 04-Dec-2015 Jeff Hao <jeffhao@google.com> Dex2oat support for multiple oat file and image file outputs.

Multiple changes to dex2oat and the runtime to support a --multi-image
option. This generates a separate oat file and image file output for
each dex file input.

Change-Id: Ie1d6f0b8afa8aed5790065b8c2eb177990c60129
f45c3f897286b464223477130a918092f4569b2e 15-Dec-2015 Vladimir Marko <vmarko@google.com> ART: Compile run-tests with Java 7.

This fixes run-tests with EXPERIMENTAL_USE_JAVA8=true.

Change-Id: I269664fc65a1d6c244c3f6191e332eb2751b5c0e
22ccc3a93d32fa6991535eaebb17daf5abaf4ebf 24-Nov-2015 Roland Levillain <rpl@google.com> ARM64 read barrier support for concurrent GC in Optimizing.

This first implementation uses slow paths to instrument heap
reference loads and GC root loads for the concurrent copying
collector, respectively calling the artReadBarrierSlow and
artReadBarrierForRootSlow runtime entry points.

Notes:
- This implementation does not instrument HInvokeVirtual
nor HInvokeInterface instructions (for class reference
loads), as the corresponding read barriers are not stricly
required with the current concurrent copying collector.
- Intrinsics which may eventually call (on slow path) are
disabled when read barriers are enabled, as the current
slow path infrastructure does not support this case.
- When read barriers are enabled, the code generated for a
HArraySet instruction always go into the array set slow
path for object arrays (delegating the operation to the
runtime), as we are lacking a mechanism to keep a
temporary register live accross a runtime call (needed for
the instrumentation of type checking code, which requires
two successive read barriers).

Bug: 12687968
Change-Id: Icfb74f67bf23ae80e7723ee6a0c9ff34ba325d48
3b359c71f2fb784589be113206932e76807787bb 17-Nov-2015 Roland Levillain <rpl@google.com> ARM read barrier support for concurrent GC in Optimizing.

This first implementation uses slow paths to instrument heap
reference loads and GC root loads for the concurrent copying
collector, respectively calling the artReadBarrierSlow and
artReadBarrierForRootSlow runtime entry points.

Notes:
- This implementation does not instrument HInvokeVirtual
nor HInvokeInterface instructions (for class reference
loads), as the corresponding read barriers are not stricly
required with the current concurrent copying collector.
- Intrinsics which may eventually call (on slow path) are
disabled when read barriers are enabled, as the current
slow path infrastructure does not support this case.
- When read barriers are enabled, the code generated for a
HArraySet instruction always go into the array set slow
path for object arrays (delegating the operation to the
runtime), as we are lacking a mechanism to keep a
temporary register live accross a runtime call (needed for
the instrumentation of type checking code, which requires
two successive read barriers).

Bug: 12687968
Change-Id: I92e8db414d029f952c07f3d3a98069e46dfdbc2a
d50687efe56a0516e0df17f65e8fce43681b3c42 17-Nov-2015 Narayan Kamath <narayan@google.com> Fix a few art-test related issues.

- Add core-oj to the list of sync targets.
- Fix --no-image by setting the boot classpath properly.
- Demonstrate T7-9 vision.

Change-Id: I84b6afbbcf09a70c7afe6a35cb9782c86137db84
0d5a281c671444bfa75d63caf1427a8c0e6e1177 13-Nov-2015 Roland Levillain <rpl@google.com> x86/x86-64 read barrier support for concurrent GC in Optimizing.

This first implementation uses slow paths to instrument heap
reference loads and GC root loads for the concurrent copying
collector, respectively calling the artReadBarrierSlow and
artReadBarrierForRootSlow (new) runtime entry points.

Notes:
- This implementation does not instrument HInvokeVirtual
nor HInvokeInterface instructions (for class reference
loads), as the corresponding read barriers are not stricly
required with the current concurrent copying collector.
- Intrinsics which may eventually call (on slow path) are
disabled when read barriers are enabled, as the current
slow path infrastructure does not support this case.
- When read barriers are enabled, the code generated for a
HArraySet instruction always go into the array set slow
path for object arrays (delegating the operation to the
runtime), as we are lacking a mechanism to keep a
temporary register live accross a runtime call (needed for
the instrumentation of type checking code, which requires
two successive read barriers).

Bug: 12687968
Change-Id: I14cd6107233c326389120336f93955b28ffbb329
6484b80d5024a079e700eb95ed79dec0c4815aa0 13-Nov-2015 Alex Light <allight@google.com> Fix bug with test 964.

An indentation error meant that some test cases would not be
generated. Also fixed run-test script since fixing this causes the
output to be larger than the default ulimit.

Change-Id: I454f89078f8307f400b66627fdab13feaf492512
91de25fd88ed755be5d72db80c93da364d97e16f 29-Oct-2015 Alex Light <allight@google.com> Make things generally quieter.

* Give run-test a --quiet flag that causes it to only print on errors.
* Give cpplint a --quiet flag that causes it to not print anything
when there are no errors.
* Add a ART_TEST_QUIET flag to build/Android.common_test.mk which
makes run-test targets much quieter when true (the default). With
this flag only failures will be printed.
* Make build/Android.cpplint.mk pass the new cpplint --quiet flag so
that only failures will be printed.

Before:
[ 96% 5715/5906] build test-art-host-run-test-debug-prebuild-interpreter-relocate-ntrace-cms-checkjni-image-npictest-ndebuggable-461-get-reference-vreg32
test-art-host-run-test-debug-prebuild-interpreter-relocate-ntrace-cms-checkjni-image-npictest-ndebuggable-448-multiple-returns32 RUNNING
/usr/local/google/buildbot/src/googleplex-android/master-art-host/art/test/448-multiple-returns: building...
/usr/local/google/buildbot/src/googleplex-android/master-art-host/art/test/448-multiple-returns: running...
/usr/local/google/buildbot/src/googleplex-android/master-art-host/art/test/448-multiple-returns: succeeded!
test-art-host-run-test-debug-prebuild-interpreter-relocate-ntrace-cms-checkjni-image-npictest-ndebuggable-448-multiple-returns32 PASSED

After:
[ 96% 5715/5906] build test-art-host-run-test-debug-prebuild-interpreter-relocate-ntrace-cms-checkjni-image-npictest-ndebuggable-461-get-reference-vreg32

Change-Id: Idf6fce7f48a619f83254b48861dbd7f8eb4ebdbf
6a439bc85bbe4076c152ebf86a721d5c827384f8 27-Oct-2015 Alex Light <allight@google.com> Made run-test 960-964 support being run with jack compiler.

They will explicitly check that the jack compiler being used is
capable of compiling them before they do however (just to make
test-art work better).

Change-Id: I6b30c50d4159c2924886886d161479cbe869f4b0
fadfee95bca395989b63f9befcb5ed8ef8528859 28-Oct-2015 Alex Light <allight@google.com> Fix up run-test.

Made its help message actually list all of its options. Made
run-all-tests take more of the run-test options.

Change-Id: I213995eeea9052392f722897021e74c2a89d41f8
8a0e0330c35a92262717b63ed53b7c604b02ea07 26-Oct-2015 Alex Light <allight@google.com> Cleanup some of the run-test system

Make run-test cleaner when using experimental default methods and
lambdas. Adds a --experimental <type> flag that adds the required
experimental compiler and runtime flags.

Change-Id: Ia9327b44e14597a400bf279fc946a43619f1355c
30486987cf93ef76a725a5761c5153c230e9079e 21-Jul-2015 Yohann Roussel <yroussel@google.com> Fix art-run-tests dependencies

Their classpath dependency was missing

(cherry picked from commit 6c8d5962573e2df393594bbcee80d07f16edafe3)

Change-Id: Id4f489c140585c62b6c105533b97837612c6199c
eb7c144a6aff7da673ba53d501c46f00311d4d7f 31-Aug-2015 Alex Light <allight@google.com> Add initial default method support to Art

This commit starts the process of adding default methods and their
associated pieces to ART.

This adds full support for calling default methods using
invoke-interface and invoke-virtual on objects implementing the
interfaces. Verifier is changed to allow this when the runtime is
started with -Xexperimental:default-methods.

This also adds support for defining and calling static methods on
interface classes with invoke-static.

Directly calling overridden default methods using invoke-super is not
yet supported.

This adds 5 new run-tests for this functionality.

Bug: 24618811

Change-Id: I35ca800d99d3329348b277789b70ceeeba6e7f03
5cc343d7239f9b1faf3ddf592cd5172a1371d276 08-Oct-2015 David Brazdil <dbrazdil@google.com> ART: Checker tests for --debuggable

Checker was disabled for --debuggable because the code was not compiled
with Optimizing. Now that it is, we might want to write Checker tests
only for this mode. With this patch, CHECK-START(-ARCH)-DEBUGGABLE
tests will only be invoked on output of debuggable compilation.
Existing CHECK-START(-ARCH) tests will not be invoked.

Change-Id: I00c864f77b038af913d0d22ba7cf5655687f7c7c
853a4c3a165380544ddbaaf6e6e092f2b7ed539b 28-Sep-2015 David Brazdil <dbrazdil@google.com> ART: Run arch specific Checker tests on host

The run-test script would not pass an architecture to Checker when
not in target mode and tests specific to x86(_64) would therefore not
be run.

Change-Id: Ibcbad0135e7a870e6ad3f09ab612fe276c97bcb8
8a159fdc17d478b2a3e49705045e51ab19842a34 22-Sep-2015 Andreas Gampe <agampe@google.com> ART: Use JIT image for JIT run tests

Don't use interpreter image anymore. That was a stop-gap measure.

Change-Id: If4b43bc20026b1ed89e59690fe35771746e354e6
d630fd68491a0a59831d9822e9f5ecef250a7af5 04-Sep-2015 Hiroshi Yamauchi <yamauchi@google.com> Increase the run test failure output diff line count.

If there are a lot of threads and deep stacks, we may not see the
beginning of the crash with the failure message.

Bug: 23485091
Change-Id: I854a05d9d9840f0ba10d6317396eb34e1da58c4d
031768a340634e2dbdec1aebb2bb3fe509b2f1f6 27-Aug-2015 Mathieu Chartier <mathieuc@google.com> Add non debug version of libarttest

We now pass the libarttest as an argument to the java program. This
enables using libarttestd by default and libarttest when -O is
specified.

Change-Id: I0de1ae01e2bb5f7b9c7fd7487b6cb55051f60657
5e2c8d323fbab4db8a71041ff94b6baf3953bca9 06-Aug-2015 Alexandre Rames <alexandre.rames@linaro.org> Introduce arch-specific checker tests.

- The '.cfg' output is now created on target.
- Arch-specific checker tests can be created by inserting a
suffix. For example:
/// CHECK-START-ARM64: int Main.foo(int) register (after)
/// CHECK-DAG: <<Arg:i\d+>> ParameterValue

Change-Id: I55cdb37f8e806c7ffdde6b676c8f44ac30b59051
4d2ef33723c1d7df269ee82cdfac98e59d95b53d 05-Aug-2015 Andreas Gampe <agampe@google.com> ART: Extend ISA features option for (host) run tests

To allow to test advanced intrinsics only available on (fairly)
modern processors, and because our build requirements are still
too low to enable them in the build system, pipe through the
existing make variables to the run-tests to allow to override
the dex2oat autodetection scheme.

Usage (standalone run-test): use the new --instruction-set-features
command line parameter to set the value for dex2oat (in the prebuild
configuration) or as an -Xcompiler-option (for no-prebuild). Note:
this is general and also works for target tests.

Usage (through make): set DEX2OAT_HOST_INSTRUCTION_SET_FEATURES and
2ND_DEX2OAT_HOST_INSTRUCTION_SET_FEATURES to set instruction set
features, as was possible before for the compilation of core files.
This option is now forwarded to host run-tests.

Change-Id: I9d89c82b6a5c8853748e5d1c153dde5d4050757a
825570c844b447beabfc7497d04fbd61c69cf28b 26-Jul-2015 Andreas Gampe <agampe@google.com> ART: Abbreviate interpreter-access-checks

Tag is too long.

Change-Id: I49febb97cec1172bcf06438fe8e0605f266e3fde
80fb394091879a4d278b86f2c83d50a4addf411a 23-Jul-2015 David Brazdil <dbrazdil@google.com> Disable Checker for tests that don't invoke the compiler.

Running tests in no-prebuild mode will resort to running the
interpreter when either dex2oat or patchoat are not available, thus
not producing the CFG dump tested by Checker. This patch disables
Checker under such configurations.

Bug: 22552692

Change-Id: I23c97aa0aa627675861ef84f8c570303b614d9af
6c8d5962573e2df393594bbcee80d07f16edafe3 21-Jul-2015 Yohann Roussel <yroussel@google.com> Fix art-run-tests dependencies

Their classpath dependency was missing

Change-Id: I38f4667723a41d5c6ceb5b4ee6f5cf1f06405145
40bceaffc7b15c8a87f78e86a8f58d98fad26c14 21-Jul-2015 Yohann Roussel <yroussel@google.com> Revert "Fix art-run-tests dependencies"

This reverts commit 2a39d9c50d2fa3f078bc1edfedac2cb6995f8d3e.

Change-Id: I06ae1644a6fe58d7f85ab77e0b5b23cef4ad8002
2a39d9c50d2fa3f078bc1edfedac2cb6995f8d3e 21-Jul-2015 Yohann Roussel <yroussel@google.com> Fix art-run-tests dependencies

Their classpath dependency was missing

Change-Id: I1e9386c2f25e8a108872bebcf8302fd17dff7018
7617abdb402fd0419daa3eefb2ad059ccbb8b6db 11-Jul-2015 Igor Murashkin <iam@google.com> runtime: Add -Xverify:softfail and ART_TEST_INTERPRETER_ACCESS_CHECKS

Use ART_TEST_INTERPRETER_ACCESS_CHECKS=true to run all the tests through
the interpreter with access checks enabled. The normal interpreter tests
do not currently enable access checks, which means that a large part of
the interpreter codebase is untested.

The verifier will force every class into a soft fail mode if
-Xverify:softfail is used, thereby ensuring that if used along with the
interpreter (-Xint) that the interpret is always in access checks mode.

This is used alongside with --compile-filter=verify-at-runtime to
prevent the AOT compiler from putting down any code.

Change-Id: I35a10ed8c43d76fa96133cf01fdad497da387200
1d4184d65dc199a5ba720245632493b7520d9edf 14-Jul-2015 Hiroshi Yamauchi <yamauchi@google.com> Add an option to run art tests with strace.

Bug: 19894268
Change-Id: I0a315a30e4e7d6d497b21205dc2a2b18b2170328
5ee9454dfee08a70dec62b0ed0fd4ad274274937 24-Feb-2015 Sebastien Hertz <shertz@google.com> Support compiling run-tests with jack

This CL adds support to compile run-test source files with jack. When
a test needs to rely on class files, we use jill to convert them to a
jack library.

We need to pass the full classpath to jack containing at least core
classes (like java.lang.Object). This means the Android tree must
have been compiled with jack first so we find all the necessary
classes.jack files.

Some tests still rely on dex files generated with the old toolchain.
We keep building them this way for the moment and will update them
later, when they get ready for Jack.

Also updates a few tests dealing with garbage collection to avoid a
situation where a reference can be retained by a local DEX register.

Bug: 19467889

(cherry picked from commit 19ac0276208f0afef6ba8a4ab34b74a59b8d11d7)

Change-Id: Ia5a989b83430ffe8298a869a1da970b756721bb0
19ac0276208f0afef6ba8a4ab34b74a59b8d11d7 24-Feb-2015 Sebastien Hertz <shertz@google.com> Support compiling run-tests with jack

This CL adds support to compile run-test source files with jack. When
a test needs to rely on class files, we use jill to convert them to a
jack library.

We need to pass the full classpath to jack containing at least core
classes (like java.lang.Object). This means the Android tree must
have been compiled with jack first so we find all the necessary
classes.jack files.

Some tests still rely on dex files generated with the old toolchain.
We keep building them this way for the moment and will update them
later, when they get ready for Jack.

Also updates a few tests dealing with garbage collection to avoid a
situation where a reference can be retained by a local DEX register.

Bug: 19467889
Change-Id: I9eedd0705d1186d28a2acd37ea42a1762cd0ace2
eb19362bae3dc12275c1a3b3aff20e9e8965ead8 28-Jun-2015 Mathieu Chartier <mathieuc@google.com> Change ART_TEST_GC_STRESS to use new gcstress mode

Enable new gcstress mode that checks at each allocation site
(with some tracking of stack traces to only do one check per
unique site).

Disable 137-cfi for gcstress, as it's sleeping to "synchronize"
with a forked process, which doesn't work with the slower mode.

Bug: 22014525
Change-Id: Ife70308e45b04f5d97267b4d98f8c75fa96492a1
7526d783ab68ed1dd53c763c75895cb432532b0f 23-Jun-2015 Andreas Gampe <agampe@google.com> ART: Fix streaming tracing issues

Fix a lock ordering issue in streaming-mode tracing.

Fix a moving-GC issue in streaming-mode tracing. DexCache
objects are not good keys for a map.

Expose streaming mode for testing in run-tests.

Bug: 21760614

(cherry picked from commit b91205e40fe692061edde19ecb87d51414a7fcee)

Change-Id: Idcd0575684ee3cc0cec3f81b4fdd0d5988c11e8c
b91205e40fe692061edde19ecb87d51414a7fcee 23-Jun-2015 Andreas Gampe <agampe@google.com> ART: Fix streaming tracing issues

Fix a lock ordering issue in streaming-mode tracing.

Fix a moving-GC issue in streaming-mode tracing. DexCache
objects are not good keys for a map.

Expose streaming mode for testing in run-tests.

Bug: 21760614
Change-Id: Idcd0575684ee3cc0cec3f81b4fdd0d5988c11e8c
05f30e1e4b62bec72d3d3f90f5e87210cc5067c8 11-Jun-2015 Igor Murashkin <iam@google.com> run-test: add --never-clean option

The --never-clean option forces the temporary directory created for
running the test to be retained after run-test finishes execution.

This is useful to help with debugging problems in your run, build,
run-test-jar, etc scripts.

Change-Id: Idc6c767521581deaa80674b583834af05bf027da
24128c663fb4d34c36cc3134e2c7e53cd99ab9e5 21-May-2015 David Brazdil <dbrazdil@google.com> ART: Rename graph dump file name to 'graph.cfg'

Change-Id: I91f6a6bf5efac5b3bba92b9a89e22e1b7be6e02f
82566091466b5b3f529168681ecfe3e739ef08b5 19-May-2015 Andreas Gampe <agampe@google.com> ART: Fix RegisterNative order

First check for both direct and virtual methods in the current class,
then move to the parent.

Optimize registration by checking first whether the current method
under test is native. This slows down registering implementations
in parent classes. Add a CheckJNI warning for this.

Add a run-test to check the behavior. Fix host comparison testing.

Bug: 19569721

(cherry picked from commit 3f1dc56914177993b1b018bf21ce7d39d7feecda)

Change-Id: I61e77117d96310632aad123d7f1279d0f834dc99
3f1dc56914177993b1b018bf21ce7d39d7feecda 19-May-2015 Andreas Gampe <agampe@google.com> ART: Fix RegisterNative order

First check for both direct and virtual methods in the current class,
then move to the parent.

Optimize registration by checking first whether the current method
under test is native. This slows down registering implementations
in parent classes. Add a CheckJNI warning for this.

Add a run-test to check the behavior. Fix host comparison testing.

Bug: 19569721
Change-Id: I61e77117d96310632aad123d7f1279d0f834dc99
c66671076b12a0ee8b9d1ae782732cc91beacb73 15-May-2015 Zheng Xu <zheng.xu@arm.com> Opt compiler: Speedup div/rem by constants on arm32 and arm64.

This patch also includes:
1. Add java test for div/rem negative constants.
2. Fix a thumb2 encoding issue where the last operand is
"reg, shift #amount" in some instructions.
3. Support a simple filter in arm32 assembler test to filter out
unsupported cases, such as "smull r0, r0, r1, r2".
4. Add smull arm32 assembler test.
5. Add smull/umull thumb2 test.
6. Add test for the thumb2 encoding issue which is fixed in this
patch.

Change-Id: I1601bc9c38f70f11909f2816fe3ec105a158951e
2c27f2ccf316aebf96cf365d33d2834a8206444d 12-May-2015 David Brazdil <dbrazdil@google.com> ART: Split Checker into smaller files

Checker code has become too messy and incomprehensible. This patch
splits it into more manageable and better structured units.
Functionality remains unchanged.

Resubmission of change I870c69827d2be2d09196a51382a3f47f31cd2ba3 due
to omission of file 'tools/checker/file_format/common.py'.

Change-Id: I277a4aa65a2e3b54f0e89901fdb9f289f55a325f
258802399dfc34ce4c628f386defa5bfdf8cf2f0 12-May-2015 David Brazdil <dbrazdil@google.com> Revert "ART: Split Checker into smaller files"

This reverts commit a490be5dd95982f77ff1447bea9ee06604038a96.

Change-Id: Ic3b7cf172200caced9ae2f10d2f200447e6801ee
a490be5dd95982f77ff1447bea9ee06604038a96 28-Apr-2015 David Brazdil <dbrazdil@google.com> ART: Split Checker into smaller files

Checker code has become too messy and incomprehensible. This patch
splits it into more manageable and better structured units.
Functionality remains unchanged.

Change-Id: I870c69827d2be2d09196a51382a3f47f31cd2ba3
0e071250e1291656f2211c5869c649fb459d5c9b 21-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> Update script now that optimizing is default.

bug:19872972

Change-Id: I648078483af5a0db3a13b0f94c36d083cbc4d2df
e7307294211caaef0c9cc441d52a2e186e359706 17-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> Unbreak checker.

Change-Id: Idabb8c04c29d265330ef9ae28c1df01129abe9dd
a3d90fb449e2fba87211a7de323faff63cba41fc 16-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> [optimizing] Use baseline when debuggable is set.

SSA form conflicts with JDWP's SetValue functionality. Because
we do not deopt all the call stack, we may call SetValue on a
compiled frame, which doesn't work with optimizing. Simplest
solution for now is to just use baseline.

Change-Id: I91738b363eec8fef145486bd96681aea73a1baa8
43c162f059e6463119aa1efd0841374ca7b4f789 09-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Revert "More Makefile fun for --debuggable.""

This reverts commit 9728a930fdf717cca60b48d9c2b715d0eed497fd.

Change-Id: Ieca964a793e58f11931f78f50be47a4a9f0dc21f
9728a930fdf717cca60b48d9c2b715d0eed497fd 09-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "More Makefile fun for --debuggable."

This reverts commit bd648cd3aef1ce82aaaa85924b1178a7f499cc29.

Change-Id: I9be508730dc5c25b9d08f914c5628e88bc4aa15b
bd648cd3aef1ce82aaaa85924b1178a7f499cc29 06-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> More Makefile fun for --debuggable.

Change-Id: Icd4a4cf53907bf04b0d45211e264c9985045b55c
e2a12c0504cdd75e27c9c6567ceebdc124d344d6 27-Feb-2015 Mathieu Chartier <mathieuc@google.com> Change JIT tests to use interpreter image

Bug: 19528920
Change-Id: I079cfcca7bb57e492c82a44f104e41228cb33b4f
721f3a817884c1c4cf30cea2bbb337738745a74d 27-Feb-2015 Mathieu Chartier <mathieuc@google.com> Fix jit tests

Missing image suffix was missing causing tests to fail.
Also added missing phony targets.

Bug: 19524713
Change-Id: Ib40d39b1fc16e1adfdc01744a199ae9b0b562664
e5f13e57ff8fa36342beb33830b3ec5942a61cca 24-Feb-2015 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Add JIT""

Added missing EntryPointToCodePointer.

This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399.

Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
a5ca888d715cd0c6c421313211caa1928be3e399 24-Feb-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Add JIT"

Sorry, run-test crashes on target:
0-05 12:15:51.633 I/DEBUG (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000'
10-05 12:15:51.633 I/DEBUG (27995): r0 00000000 r1 0000542b r2 00000006 r3 00000000
10-05 12:15:51.633 I/DEBUG (27995): r4 00000006 r5 b6f9addc r6 00000002 r7 0000010c
10-05 12:15:51.633 I/DEBUG (27995): r8 b63fe1e8 r9 be8e1418 sl b6427400 fp b63fcce0
10-05 12:15:51.633 I/DEBUG (27995): ip 0000542b sp be8e1358 lr b6e9a27b pc b6e9c280 cpsr 40070010
10-05 12:15:51.633 I/DEBUG (27995):

Bug: 17950037
This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.

Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
2535abe7d1fcdd0e6aca782b1f1932a703ed50a4 17-Feb-2015 Mathieu Chartier <mathieuc@google.com> Add JIT

Currently disabled by default unless -Xjit is passed in.

The proposed JIT is a method JIT which works by utilizing interpreter
instrumentation to request compilation of hot methods async during
runtime.

JIT options:
-Xjit / -Xnojit
-Xjitcodecachesize:N
-Xjitthreshold:integervalue

The JIT has a shared copy of a compiler driver which is accessed
by worker threads to compile individual methods.

Added JIT code cache and data cache, currently sized at 2 MB
capacity by default. Most apps will only fill a small fraction of
this cache however.

Added support to the compiler for compiling interpreter quickened
byte codes.

Added test target ART_TEST_JIT=TRUE and --jit for run-test.

TODO:
Clean up code cache.
Delete compiled methods after they are added to code cache.
Add more optimizations related to runtime checks e.g. direct pointers
for invokes.
Add method recompilation.
Move instrumentation to DexFile to improve performance and reduce
memory usage.

Bug: 17950037

Change-Id: Ifa5b2684a2d5059ec5a5210733900aafa3c51bca
3cf4877c66f84a7ba524732e66adcfa5296e07c1 26-Jan-2015 Calin Juravle <calin@google.com> run-test: enable checker in dev mode

Also, use explicit flush (instead of passing flush parameter to print)
to enable better compatibility across python versions.

Change-Id: Iaf294d88e932b778d5dce7f3c2b8eca775849973
4846d13744f07e82571d2882acc823d811ec942d 15-Jan-2015 David Brazdil <dbrazdil@google.com> ART: Invoke Checker from run-test scripts

This patch moves Checker-based tests of the optimizing compiler into
the art/test directory and modifies the run-test scripts to dump
the CFG during compilation and to verify the graph using Checker as
part of the "running" stage. Outputs generated by running the test
and running Checker are concatenated and compared with expected.txt.

Checker is invoked only if the test's name name matches the format
"<number>-checker-*" and it's currently enabled only for optimizing +
host configs. The tests are still invoked on other configs but
without Checker.

Change-Id: Ib24da808cd4bca66f07e0dbeb913a418065f2859
1a5c40672783fac98aca5a04ac798a0a0014de65 15-Jan-2015 Andreas Gampe <agampe@google.com> ART: Mips64 runtime support

Interpret-only Mips64 runtime support.

Change-Id: Iee22d0c8c77105d9b2f03a67dc4e09957fe0ab0a
15a33b3f88546bce85dcb9d28caf200da51154d7 07-Nov-2014 Andreas Gampe <agampe@google.com> ART: Simple structural class check

Adds a simple check to class-loading when the embedded dex file in
an oat file and the dex file on the class path where we found the
class do not match.

We require that the number of methods and fields do not change, as
that will almost certainly mean that quickened and other compiled
offsets are wrong now. This is a reasonably lightweight change, but
we should investigate a full comparison including name and type of
members.

Bug: 17937814
Bug: 18708951
Change-Id: Icb9638bebd369ab23822817f4a97c8dd8625fea5
312baf19603ff7d2b223fd7b1ef817171a97f9d0 12-Jan-2015 Hiroshi Yamauchi <yamauchi@google.com> Follow up on CL 122665.

We now do the two-step memory protection strategy (first protect the
from space with PROT_READ and later protect it with PROT_NONE) only if
the from space is a rosalloc space (excluding the more common bump
pointer space case). This strengthens the GC verification for the bump
pointer space case as we avoid the case where mutators run while the
from space is PROT_READ rather than PROT_NONE.

Add a command line flag to override the minimum interval for the
hspace compaction for OOM and set it to zero in the gcstress/gcverify
run-tests to run the hspace compaction more frequently in tests.

Fix some comments.

Bug: 18960494
Change-Id: I518b011e026f578e53c4ec269cfb82865b0fae68
e21dc3db191df04c100620965bee4617b3b24397 09-Dec-2014 Andreas Gampe <agampe@google.com> ART: Swap-space in the compiler

Introduce a swap-space and corresponding allocator to transparently
switch native allocations to memory backed by a file.

Bug: 18596910

(cherry picked from commit 62746d8d9c4400e4764f162b22bfb1a32be287a9)

Change-Id: I131448f3907115054a592af73db86d2b9257ea33
62746d8d9c4400e4764f162b22bfb1a32be287a9 09-Dec-2014 Andreas Gampe <agampe@google.com> ART: Swap-space in the compiler

Introduce a swap-space and corresponding allocator to transparently
switch native allocations to memory backed by a file.

Bug: 18596910
Change-Id: I131448f3907115054a592af73db86d2b9257ea33
c9338b97c70d1b734695ccf9cb667708ac288b9d 03-Dec-2014 Nicolas Geoffray <ngeoffray@google.com> Explicitly give compiler options to test scripts

This makes tests pass when ART_USE_OPTIMIZING_COMPILER=true.

Change-Id: I579c0371033435ead6b06830f15c00dbf7e98005
c0a8a80a3d45aa6040ce6c10108bcb96a14dc9c6 18-Oct-2014 Mathieu Chartier <mathieuc@google.com> Add a way to pass GDB commands

Passing --gdb-arg to run-test sends the arg to GDB, example:
test/run-test --host --gdb --gdb-arg "--command=command.txt" 001-HelloWorld
Would run the test with the GDB script at command.txt on the host, this is
useful for running tests in GDB in a loop.

Bug: 17387969

Change-Id: I5ad455159a6d92783eacb17eecbb0f1e670cb4a3
75deec0b46d4e8260ca24848f11c006dcc815a69 24-Nov-2014 Ian Rogers <irogers@google.com> Increase run-test output on error.

On the host with many cores its possible for the message of an abort to be lost
due to the amount of debug output.
Bug: 18469797

Change-Id: Ibf210fc113166b8cc06ee9aed206780c981d236c
1ed097d4bc3fad0bf0d27172213ce1928b1f054e 13-Nov-2014 Nicolas Geoffray <ngeoffray@google.com> Fix failure in --no-dex2oat invocation of 425-invokesuper.

We had two issues:
- dexmerger is broken and sometimes produces invalid dex files,
thus the test was always failing. b/18051191.
- The reason only no-dex2oat caught it is because it doesn't prebuild,
and our scripts just do not report an error when the prebuild failed.

I also gave up trying to emit the dex2oat error output in the console.
I clearly don't speak bash.

Change-Id: I34c40902855452ea0f3e0d4733e4149c87236cfe
c8f23fc19726245da6a11fa2d92e319b9d26c019 28-Oct-2014 Nicolas Geoffray <ngeoffray@google.com> Provide an option to run run-tests with a local dalvikvm.

Instead of overwriting /system, use a temporary directory
to push the binaries and libraries, and use them for
running the tests.

Change-Id: I45fa2ac51f836686d8e8676907eb26629f7ab2ab
c23c9c93aade8dd99d23ad796888cbf2f7f96a47 28-Oct-2014 Andreas Gampe <agampe@google.com> ART: PIC testing

Adds run-test support for PIC testing.

For the core image, enable with ART_TEST_PIC_IMAGE=true.
For the tests themselves, enable with ART_TEST_PIC_TEST=true.
Off by default.

Bug: 18035729
Change-Id: I23e396a2fa47b9471145f45b3c63f447871ebebf
63fc30e201a74dbad9422a6dbd4c39e4b60ac4c5 25-Oct-2014 Andreas Gampe <agampe@google.com> ART: Create and use multiple core images

Update test infrastructure to understand several core variants.
Now compiles three core.art/oat variants:

* core.art/oat, default-compiled
* core-interpreter.art/oat, interpret-only
* core-optimizing.art/oat, optimizing compiler

The run-test variant implies which core variant is used.

Change-Id: Ieeaf2df90faee2b04c209b950897e77806205fe4
602fbcd1ce68a72098eb45ae462b6cc84f218763 28-Oct-2014 Andreas Gampe <agampe@google.com> ART: Typo fix

Change-Id: If544f02117b6f1bbc1279444c70cb9f2a0534c6f
5c1149048868f14188a4ff2907fab578c7e012b1 28-Oct-2014 Andreas Gampe <agampe@google.com> ART: Fix test 089

Another two lines of build failure output that need to be stripped.

Change-Id: I85c2a3b3e8553b2f5da8e043dd561ada380ef2fe
d9ad27db226f1ed3604a99cc33bf6ab84b5dfcfa 27-Oct-2014 Ian Rogers <irogers@google.com> Extra debug output in run-test.

Dump PATH_MAX and NAME_MAX on failure.
Also fix typo in dumping args.

Change-Id: I3df0dbc45db0659c975ac86a12f338df2a7291dc
cf7f19135f0e273f7b0136315633c2abfc715343 23-Oct-2014 Ian Rogers <irogers@google.com> C++11 related clean-up of DISALLOW_..

Move DISALLOW_COPY_AND_ASSIGN to delete functions. By no having declarations
with no definitions this prompts better warning messages so deal with these
by correcting the code.
Add a DISALLOW_ALLOCATION and use for ValueObject and mirror::Object.
Make X86 assembly operand types ValueObjects to fix compilation errors.
Tidy the use of iostream and ostream.
Avoid making cutils a dependency via mutex-inl.h for tests that link against
libart. Push tracing dependencies into appropriate files and mutex.cc.
x86 32-bit host symbols size is increased for libarttest, avoid copying this
in run-test 115 by using symlinks and remove this test's higher than normal
ulimit.
Fix the RunningOnValgrind test in RosAllocSpace to not use GetHeap as it
returns NULL when the heap is under construction by Runtime.

Change-Id: Ia246f7ac0c11f73072b30d70566a196e9b78472b
deb48a0b5bd1da4d5dce64454d2ff44e3fca875a 22-Oct-2014 Andreas Gampe <agampe@google.com> ART: Print args in case of run-test build failure

Bug: 17959926
Change-Id: If1a6bf0341248818bef6c2a11e0677803c07ad3f
f6930a83c925507a63d0b2c86429a4d93fa83a72 21-Oct-2014 Andreas Gampe <agampe@google.com> ART: Fix run-test script

Correctly pipe error information to the output file.

Bug: 17959926
Change-Id: Ifccf2a2a22517b2523228718be6d2a57250847c2
8fda9f2aec6820ebf1bd550412ec99d9eb3ffa9e 04-Oct-2014 Andreas Gampe <agampe@google.com> ART: Add smali-based run-test

Add run-test 800 for smali-based tests. To use, drop a smali file
into the src/ directory and add a TestCase in src/Main.java.

Bug: 17814475

Change-Id: Ica9eb830689862cb3a4ffa0019fbc447c01af744
288a4a2bff0ba8840c6fa0dee3c7c9f1934fa530 07-Oct-2014 Nicolas Geoffray <ngeoffray@google.com> Merge reference-run-test-classes and run-test-jar.

Change-Id: Ic35e87ffe6ac2d86d8bab89b2dd954ec632df1ea
1a58b7f6f14a5ed9355e8e447cae25fb41467f09 06-Oct-2014 Nicolas Geoffray <ngeoffray@google.com> Merge host-run-test-jar and push-and-run-test-jar.

- Too many code duplication between the two files.
- Also fix --zygote and --gdb invocations.

Change-Id: I1f99320e63a7a0f19ad1ad2b12693901b8c6bb43
01afdbab72f5e8c230f3d73a3a61d630670db9ab 03-Oct-2014 Brian Carlstrom <bdc@google.com> Add test for getDeclaredClasses of with missing class

Bug: 17782530
Change-Id: I399621344c3835226c9df9678217fca62cbd5c92
5fd18ba0902df62c4e1237712f03c44b8109ce8a 03-Oct-2014 Nicolas Geoffray <ngeoffray@google.com> Merge push-and-run-{prebuilt}-test-jar files.

Can't find a reason why those two files forked...

Change-Id: I5ef3dd76aa3b2d843c8b4b57365edec3bf2c3f3b
c580e04a861699d8a359e4464905b81d9cf5b926 09-Sep-2014 Brian Carlstrom <bdc@google.com> Fix darwin run-test problems

Bug: 17428908

(cherry picked from commit 8a4064e2c0987637b11afcc656478d3113d81618)

Change-Id: Ica403bef3e7d93bf6e9197c44b77e39683e04d55
8a4064e2c0987637b11afcc656478d3113d81618 09-Sep-2014 Brian Carlstrom <bdc@google.com> Fix darwin run-test problems

Bug: 17428908
Change-Id: Id74a0383fdae6753558e27cd447c1ca349819c91
1ef4ce87e54a595a67263e550916b97a1b468b99 27-Aug-2014 Alex Light <allight@google.com> Really fix tests.

Remove extra line in Android.run-test.mk.
Update junit code in 082 and 021.
Set correct bootclasspath for --no-image.
Make host core.art depend on dex files being installed.
Make 118 pass in the correct bootclasspath.

Bug: 17290452

Change-Id: I415eddfa3632ec7eda927abe95925202de193749
03a112d23694afffe9808082e7144b7e8744a4bd 25-Aug-2014 Alex Light <allight@google.com> Add run-test support for running without a working patchoat/dex2oat

Also add it to the test-art target.

Bug: 17262039

Change-Id: Id31130194c46df66fc48852d6f8884f14cb08db4
907b699026d5558df43fdf48541278dc9b110a8e 19-Aug-2014 Andreas Gampe <agampe@google.com> ART: More failure output on run-test

Change-Id: Ifdf1516e950117069b3cfa58c4bda03281dad661
f8b9bbb9680fff693d1056d884c96eaf5360d0d6 14-Aug-2014 Andreas Gampe <agampe@google.com> ART: Fix run-test in case of relative TMPDIR

Relative paths should be resolved to absolute paths, as we are
chdir-ing in the test.

Bug: 16499668
Change-Id: Ic7db35e21f519ced77c4ac468d8e909bcb40b24d
3a12cfeb539b64ae116eb6313adca802457ba6fb 14-Aug-2014 Andreas Gampe <agampe@google.com> ART: Fix run-test in case of relative TMPDIR

Relative paths should be resolved to absolute paths, as we are
chdir-ing in the test.

Bug: 16499668

(cherry picked from commit f8b9bbb9680fff693d1056d884c96eaf5360d0d6)

Change-Id: Ic7db35e21f519ced77c4ac468d8e909bcb40b24d
e7873ecb240aef520f7a7933028fa58708baf761 12-Aug-2014 Alex Light <allight@google.com> Added --gcstress and --gcverify shortcut flags to run-test

Change-Id: Ia11fcbc71488710ca32f397c3c1b19613e294d1e
2994e29b57ff57ce3d59a26a01e27e674bd6238b 06-Aug-2014 Andreas Gampe <agampe@google.com> ART: Use TMPDIR for test directories

Bug: 16499668

(cherry picked from commit 5a79fdecffbea657ebecd4cf19078925239eb1c3)

Change-Id: I6981f707862bf4a9cc79800db85b0416f30115af
5a79fdecffbea657ebecd4cf19078925239eb1c3 06-Aug-2014 Andreas Gampe <agampe@google.com> ART: Use TMPDIR for test directories

Bug: 16499668
Change-Id: I0d3db4697ef7b1706807e7daa5e000bb89df14e0
bfac14acef0c2327ef8c28f146dd17d009aa8669 30-Jul-2014 Alex Light <allight@google.com> Add --always-clean flag to run-test.

This flag makes run-test remove the test-artifacts even if it fails. Also
enable this option by default when doing run-tests with make. Add
a ART_TEST_RUN_TEST_ALWAYS_CLEAN environment variable to control this
option.

Change-Id: I7867b400d570d8d679d9822d1fa65f49eb3522ae
855564b83db7b106d2995d0e784f1f4b62e52371 25-Jul-2014 Andreas Gampe <agampe@google.com> ART: Native bridge command-line parameter

Add a command-line parameter for the native bridge library, slight
refactor/cleanup.

Add run-test 115 to test the native bridge interface. Currently the
tests are black-listed for the target, as the setup for the test
is too complicated in the current infrastructure.

Change-Id: I6ccf19485e8c30b96e9f2fd5425278cb1ebd403f
6fbcc12a1e8c2b98ed89a290becd23e5eb38692d 24-Jul-2014 Nicolas Geoffray <ngeoffray@google.com> Use a (somewhat) more documented environment variable.

I believe OUT is not mandatory to define, whereas
ANDROID_PRODUCT_OUT is. Not sure our continuous tests define it.

Change-Id: I7cd23971384df265e59587b49760aba29133a59c
85139a3b78d942c810a157687dee0fb6a67207ae 23-Jul-2014 Jeff Hao <jeffhao@google.com> Fix run-test --trace option if --host is specified after.

Change-Id: I3911428ba762657c4433ab23e60f1771c9ddb2fe
2c240f7972dc4e6c7cbfb5d4ddcae64720230109 23-Jul-2014 Jeff Hao <jeffhao@google.com> Fix x86 instrumentation exit entrypoint and trace size limit.

The x86 instruction movd only copies a 32-bit value when used with a
memory location. movsd properly copies 64-bits.

Bug: 16386215

(cherry picked from commit cf2e7b0621dfe7fcacd56555dffabab65d1130e7)

Change-Id: I102db8aaa5e8a6b3a88f01e545d1bb51b4f3d5d4
1c83cbc4a817acbd7f9abb5b29a2d418a958e6a1 23-Jul-2014 Andreas Gampe <agampe@google.com> ART: Make run tests out of oat tests

Transforms all former oat tests into run tests.

Change-Id: I190dd39456454c36e5538a2c044d993965a67533
cf2e7b0621dfe7fcacd56555dffabab65d1130e7 23-Jul-2014 Jeff Hao <jeffhao@google.com> Fix x86 instrumentation exit entrypoint and trace size limit.

The x86 instruction movd only copies a 32-bit value when used with a
memory location. movsd properly copies 64-bits.

Bug: 16386215

Change-Id: Ia59b2c2af72ce5202c7b62413687aedb48cfd25e
9d722533b0ef6547ee0ab5286f65af98451c36e4 23-Jul-2014 Alex Light <allight@google.com> Changed default non-full tests to be prebuild.

Also added ability to turn off non-prebuild manually.

Change-Id: I0315ac43703a9c7e79812658523013799fb5d5dd
a59dd80f9f48cb750d329d4d4af2d99d72b484d1 03-Jul-2014 Alex Light <allight@google.com> Runtime can now be set to require relocation

Add a pair of runtime flags -Xrelocate and -Xnorelocate that can force
the runtime to require that all files that are run are relocated, to
prevent attacks based on the known art base address.

Add support for running patchoat on oat files compiled without an image.

Change run-test to have new --prebuild and --relocate flags.

Bug: 15358152

Change-Id: I91166c62dd1ab80e5cbcb7883a2cd0d56afca32d
701aa645a3e61fe8866000bb66b1287196a5536a 18-Jul-2014 Ian Rogers <irogers@google.com> Add GC verification test rules.

Change-Id: I7469ecaf98f680e7e642035f3536b00bdd97b486
07aaac812c5935fc5c4023f843697fc96a42ea87 09-Jul-2014 Sebastien Hertz <shertz@google.com> Allow method tracing for run-test

Adds "--trace" option to enable method tracing.

Bug: 11683397
Change-Id: I20a6b25c71067eafd848db26f13d62cfdb9a6159
997f0f9e69ce7aee73cebd64be8dc40af9164257 22-Jun-2014 Ian Rogers <irogers@google.com> Limit the size of files created by run-test to 2MB.

In MemMap::MapAnonymous on the host, avoid creating ashmem regions that are
backed by files, when the size of the file will be greater than the ulimit.

Change-Id: I7cbf2ac59bf5869ed85850bea8d71898f3b7e1c7
769a5ad7d2caee5eb4c0ed382ac79cc8c4b9bd23 19-May-2014 Mathieu Chartier <mathieuc@google.com> Add DALVIKVM_FLAGS to test invocation.

Now, only gtest don't use these flags.

Running tests with GC options e.g:
DALVIK_VM="-Xgc:GSS" mm test-art-host-oat

Added a --runtime-option to test/run-test which passes the args to
the test:
test/run-test --runtime-option -Xgc:GSS --runtime-option -XX:UseTLAB 080

Change-Id: Ic928df32cb5aa36d3b0b55456e8b535e82ee9e97
0e12bdc49744eb6d5c29b9611a8dbe10bac4cd53 15-May-2014 Brian Carlstrom <bdc@google.com> Add ISA directory to image and odex pathnames.

Bug: 14882223
Bug: 14694978
Change-Id: Ic1b5ae836b8e91ea461dcd4f3da8e38dc3bec00f
81c56e73558dee0a8e537a12a210d4bc0ef01a62 05-Mar-2014 Dmitry Petrochenko <dmitry.petrochenko@intel.com> art/test: support sequential run

Introduce --seq option for art/test/run-all-tests.
This option runs tests one-by-one, avoiding failures
caused by busy CPU

Change-Id: Ibe29f749d267fb05dff4617787c7afcbdbeb43c0
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
2fe07927610177e9b83809e5bdb6d2b3d835a076 21-Apr-2014 Andreas Gampe <agampe@google.com> Fix dependencies in the test suite for multi-target tests

Change-Id: I94dd767490a7cd8cceddc158d90f56f5bd3fef26
afbaa1aab02cfe519d00336870b1bcd24b61378d 26-Mar-2014 Andreas Gampe <agampe@google.com> Build changes to build multilib tests

Test files will be emitted into directories for both first and second
target architectures. Going with the naming scheme for binaries,
single-architecture and 32b cases have the standard name, and
64b goes into a directory with "64" suffix.

In multi-architecture setups, the default concrete test targets are
extended with a "32" and "64" suffix, e.g., test-art-target-oat-JniTest64.
The suffix-less form is linked to the primary architecture target (usually 64).
That means running combined targets, e.g., test-art-target-oat, will only
test the primary architecture right now.

Fixed target run tests calling the right dalvikvm. Fixed library search
path for tests derived from CommonRuntimeTest.

Missing in this work-in-progress is correct handling of dex2oat for the
secondary architecture. To make it work on 64b, comment out line 101
in build/Android.executable.mk

Change-Id: I3d260994e6efe8b73b56c71994053cc9392943a9
a1289ada8138efaf638548b414a45437c2bbbdef 31-Mar-2014 Brian Carlstrom <bdc@google.com> No longer restrict to -source 1.5 since it causes a warning with 1.7

(cherry picked from commit e17838ffedee1796920636c2f99c933aa1ce4b3c)

Change-Id: I25de5bf2f49bcf831a572af799fd718c32c907c5
5103ce6cb3ed3fbf5c6cb90987e8ebe3d848dc91 31-Mar-2014 Brian Carlstrom <bdc@google.com> No longer restrict to -source 1.5 since it causes a warning with 1.7

(cherry picked from commit e17838ffedee1796920636c2f99c933aa1ce4b3c)

Change-Id: Ied11738da9621280185a62f267a5d527e6ed927b
e17838ffedee1796920636c2f99c933aa1ce4b3c 31-Mar-2014 Brian Carlstrom <bdc@google.com> No longer restrict to -source 1.5 since it causes a warning with 1.7

Change-Id: I6066c2ee716638774420414f1b2affcc63de754c
92cf83e001357329cbf41fa15a6e053fab6f4933 18-Mar-2014 Nicolas Geoffray <ngeoffray@google.com> Run Java tests with the optimizing compiler.

Also fix a vector.reserve -> vector.resize braino, and build
a GC map that dex2oat expects.

Change-Id: I6acf2f90a4c32f90b79bf7709bf2e43931b98757
435348618590b0d5674fb4d9bbc022c6488e11b3 19-Feb-2014 Brian Carlstrom <bdc@google.com> Fixes to allow test-art-host to run via build server

Change-Id: Ifc4259ab03cb3867b625c2e1edf4352398c8a8e8
201803fb1acd15b9daae51d816e1b08aededdc41 21-Nov-2013 Jeff Hao <jeffhao@google.com> Search for miranda methods in virtual methods instead of interface.

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
dc959ea822b100740424fc2eee4037512bde82c2 28-Oct-2013 Brian Carlstrom <bdc@google.com> Make ART's run-test support Dalvik so we can remove dalvik/tests

Change-Id: Iba4ddf39169346573c97b443d5d65c6b8963fd4b
0160d991571fedc4c1c252a8865c59a7c8cd4973 13-Sep-2013 Tsu Chiang Chuang <tsu@google.com> Keep the right output file for tests.
Bug: 10748067

Change-Id: I732fe23d53f27e7bb030d10c5e4955d9d78b4024
379e2f5996b38d9f67b9c334c232cb315a5390ad 20-Aug-2013 Tsu Chiang Chuang <tsu@google.com> Clean up unnecessary files after build-only.
Bug: 9482191

Change-Id: Ida5d742c8a341df3946635424d996de6e19dd795
fa42b4410d49134a8e63dc2196be4013d286f2d6 17-Jun-2013 Brian Carlstrom <bdc@google.com> Move to new art dalvikvm

Change-Id: Ib04bc9853b7084965fa0c9899c3e5f5ac42d4ce7
0e033673670733c0809815e3662bb5a501cdb492 19-Apr-2013 Ian Rogers <irogers@google.com> Allow passing of multitple --invoke-with.

Also fix usage message.

Change-Id: I67f2168ed22ccef999c798585d73ad25c8885716
9829e330166e19dbd0d35b3e5964bb23b3bc924c 21-Mar-2013 Elliott Hughes <enh@google.com> Always supply matching -source and -target to javac.

Change-Id: I74954e78ccd11b3458113387b297714004fc03be
700c8d31733534a3d978b75a03f6f7e177dc7e81 05-Nov-2012 Brian Carlstrom <bdc@google.com> Move .oat files to ELF format

Generates .oat in ELF file format using MCLinker
- Uses MCLinker IRBuilder to create a synthetic .o from OatWriter output.
- Uses new ElfFile for prelinking to support art image optimizations.

Adapted OatFile to load using dlopen, ElfFile, or memory, removing raw MemMap mechanism.

Changed image code to not assume oat data will be immediately after
image to allow space for ELF headers.

Passes test-art and works with installd.

Change-Id: Idc026eddb5de93f4b97490c405f3ed7b39589749
6674f8ae6bb390e61cfdccb6e5825ac952584f2d 17-Jan-2013 Tsu Chiang Chuang <tsu@google.com> add jasmin dependency so that it can be used when building the tests.

Change-Id: I9c4756341b9f4cbc764ac034f0c9ad4dcd13a40b
4c1bf1a86cc0ca1323c317597583c01b3f7f8cf0 11-Dec-2012 Ian Rogers <irogers@google.com> Support for --gdb for target run-test.

Add a --gdb option for target run-test that starts the test with
gdbserver. So that this is clear it forces the test to be run in dev
mode too.

Change-Id: I539e30d49b6e0beea38c6e9c60abb16e3f4062f7
2bfc67361026722e2f83abf06bd3fb364161a2ed 28-Nov-2012 Elliott Hughes <enh@google.com> Fix run-test to tell the truth.

Previously it claimed to be "running" long before it ran anything, even in
cases where it wasn't _going_ to run anything.

Change-Id: I86c6d915ca75c20d9ae9027d2ae52e5deca2809c
0dff3f4d41ce8308d1973f317463941abbf79b81 21-Nov-2012 jeffhao <jeffhao@google.com> Add -interpreter to run-test to test interpreter only mode.

Change-Id: I0addb26d22d3e7d486b40119ad35639dd15b9d53
22469aa00c883dad72f0da1f6925093e4776cf8f 07-Sep-2012 Brian Carlstrom <bdc@google.com> Make run-test report missing files by name

Change-Id: I585f0a99cca8fc0dbb326ef1f2f29db7263166c4
4407e61aa4cd75e6f31919cfca6a544d18b88c53 20-Jul-2012 Tsu Chiang Chuang <tsu@google.com> fix missing dx in build server.

Change-Id: I18c49c5cc1efc97199cb076dc258c4b9b7a46e8a
011fade82899fe3607789ca061e3a6c7fa4c71f4 10-Jul-2012 Tsu Chiang Chuang <tsu@google.com> Build run-test files.

Change-Id: I5b300d88b347b4c566186551594a30df09959e2e
7ab3a2a963669ae94e2d0cd5d9f9dda2f4c85835 19-Jun-2012 Elliott Hughes <enh@google.com> Fix run-test 089 (which has no files to delete).

Change-Id: Ibaf542f4332ea722be17fd4ef29689c17d8f282a
2613de48e04b582f1af90fd567a34253ebe757c4 16-Jun-2012 Brian Carlstrom <bdc@google.com> Fix error message running with run-test --jvm

Change-Id: Ib693738e6860c29985cf2ecd6fd2ed89e9b9af0d
c717eef208ab07ebd4b0f818d55e7adcd420a5ad 16-Jun-2012 Elliott Hughes <enh@google.com> Don't bother running dx when we're testing on the RI.

Also drop the -ea argument to the RI; we don't support assert, so it's
misleading if tests behave differently on the RI.

Change-Id: I4db66ee13fe6b778385778a783ded460b5fcf5f7
6e9c5a5d2f2b87fd25ecffddaf8a5096edec0169 15-Jun-2012 Brian Carlstrom <bdc@google.com> Fix target temporary file logging in run-test

Change-Id: Ib56753385c53164e65ab807bca06b1a25677676d
105215d007639a6fc35b1ef9705ac138f51f35b2 14-Jun-2012 Brian Carlstrom <bdc@google.com> Improve run-test to use new directory for each run

This ensures we rerun dex2oat on each test run. We also now cleanup better on host and target.

Change-Id: I2b48c45d8a4bf7629aa6b538556fcf78fc22d0dc
2ab7f486ba73b2846bdbdde65cc2d41f62a26015 05-Jun-2012 Brian Carlstrom <bdc@google.com> Remove explicit dex2oat calls from run-test

Change-Id: If7222e834602bfc1232ac199ab81e7c09c058f43
35969016833b430b27fd6fca3b583c90dc2f488e 04-Jun-2012 TDYa127 <tdy@google.com> Fix run-test for arm.

Unblocking people now. A more comprehensive fix is coming from others.

Change-Id: I4a0d5a34d54d8c046f23d6824735ffc2307c08ad
1f71ae819e506c40ad5adccec4b2e57699e0b5c4 25-May-2012 jeffhao <jeffhao@google.com> Fix host build to properly build x86.

Change-Id: Ib8acb75cca2f0728297180e082a89f4f81784e75
e7fb2a6ebc660c4b60b7a51db927abae100e5bcb 23-Apr-2012 Elliott Hughes <enh@google.com> Don't assume that "host" means "linux-x86".

Change-Id: Id6a98e791863ef212bc9e71b62183c4bb7062137
b92bcabcbb28f69fe99e1c2f2e5559ab2c47aa60 08-Apr-2012 TDYa127 <tdy@google.com> Fix run-test on host.

Change-Id: I44ebb4cdc2f5966be51a063e3c7256ab3016c404
58bcc40e42d0438d3a71149ac53420d50a71fd8c 14-Feb-2012 Elliott Hughes <enh@google.com> We replace -d with -O recently, but not uniformly.

Change-Id: Ia66037addabe8f0c61531d955bf570aa4c7c83e6
4b0d1eec42241af8c65b42513a71539fe3307cdd 30-Nov-2011 Elliott Hughes <enh@google.com> Always compile tests with -g.

Although it was useful in shaking out one bug to be debugging without -g, it's not
generally useful.

Change-Id: Ie585e142d8a8171c9d1be636e96963a2a9d6f739
7c04610d42cad31e6593ae1561ed855aceac1d7a 20-Oct-2011 Elliott Hughes <enh@google.com> Add --invoke-with and -d to the dalvik tests.

Change-Id: I358945fd2b41c1615441c1687a582a66e662eba9
9ca7a1fdd0daa546b790adb6a24dbc13c22df76a 11-Oct-2011 Elliott Hughes <enh@google.com> Add -Xzygote to suppress starting the signal catcher thread.

Change-Id: Iae98ac9d362c71074befbc702f8cae96888211ec
510c878c73d944e8306d346e978f880bf2d06fd9 06-Oct-2011 Elliott Hughes <enh@google.com> Fix the expectations for test 007 to match the RI's output.

Also distinguish between building and running in run-test.

Change-Id: I4ca1a8b86839995959dd86b341086eb962e6f094
8cbc8bc716d7a47019ad14403920c72547b2fb96 04-Oct-2011 Elliott Hughes <enh@google.com> Use a test-specific name for each generated file.

This lets us run multiple tests in parallel (and know what we've got lying
around on our devices).

Change-Id: I90ecc4ceaae0ee4b323d861c2b408e2944a2f8c1
5d1ac920fdaef5d4ec8f66bb734488cd9660b024 30-Sep-2011 jeffhao <jeffhao@google.com> Adding old unit tests to test suite.

These tests are copied straight over. They'll still run, but they're
using the old system.

Change-Id: If494519e52ddf858a9febfc55bdae830468cb3c8