diff options
author | Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> | 2012-01-13 18:16:18 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-01-13 19:23:42 +0200 |
commit | 4510ec96d083bb837ccf404bbfe353790ec9f89f (patch) | |
tree | d2ffc8a1192b88cd0d95b606cee0ade44163369e | |
parent | cf436c8843664d9aa140c286d137db2f47cb7696 (diff) | |
download | jato-4510ec96d083bb837ccf404bbfe353790ec9f89f.tar.gz |
test/functional: add ParameterPassingLivenessTest
Passing certain parameters results in nested calling sequences on
x86-64, but this isn't handled correctly at the moment.
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | test/functional/jvm/ParameterPassingLivenessTest.java | 42 | ||||
-rwxr-xr-x | tools/test.py | 1 |
3 files changed, 44 insertions, 0 deletions
@@ -367,6 +367,7 @@ REGRESSION_TEST_SUITE_CLASSES = \ test/functional/jvm/ObjectCreationAndManipulationTest.java \ test/functional/jvm/ObjectStackTest.java \ test/functional/jvm/ParameterPassingTest.java \ + test/functional/jvm/ParameterPassingLivenessTest.java \ test/functional/jvm/PrintTest.java \ test/functional/jvm/PutfieldTest.java \ test/functional/jvm/PutstaticPatchingTest.java \ diff --git a/test/functional/jvm/ParameterPassingLivenessTest.java b/test/functional/jvm/ParameterPassingLivenessTest.java new file mode 100644 index 00000000..f7a27017 --- /dev/null +++ b/test/functional/jvm/ParameterPassingLivenessTest.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2012 Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> + * + * This file is released under the GPL version 2 with the following + * clarification and special exception: + * + * Linking this library statically or dynamically with other modules is + * making a combined work based on this library. Thus, the terms and + * conditions of the GNU General Public License cover the whole + * combination. + * + * As a special exception, the copyright holders of this library give you + * permission to link this library with independent modules to produce an + * executable, regardless of the license terms of these independent + * modules, and to copy and distribute the resulting executable under terms + * of your choice, provided that you also meet, for each linked independent + * module, the terms and conditions of the license of that module. An + * independent module is a module which is not derived from or based on + * this library. If you modify this library, you may extend this exception + * to your version of the library, but you are not obligated to do so. If + * you do not wish to do so, delete this exception statement from your + * version. + * + * Please refer to the file LICENSE for details. + */ +package jvm; + +import jato.internal.VM; + +/** + * @author Eduard - Gabriel Munteanu + */ +public class ParameterPassingLivenessTest extends TestCase { + private static int run(int[] a, int v) { + return v; + } + + public static void main(String[] args) { + int n = run(new int[8], 1); + VM.exit(n); + } +} diff --git a/tools/test.py b/tools/test.py index 3d3bca2b..05400ef0 100755 --- a/tools/test.py +++ b/tools/test.py @@ -73,6 +73,7 @@ TESTS = [ , ( "jvm.ObjectCreationAndManipulationTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386" ] ) , ( "jvm.ObjectStackTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] ) , ( "jvm.ParameterPassingTest", 100, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] ) +, ( "jvm.ParameterPassingLivenessTest", 1, NO_SYSTEM_CLASSLOADER, [ "i386" ] ) , ( "jvm.PopTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] ) , ( "jvm.PrintTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386" ] ) , ( "jvm.PutfieldTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] ) |