Index: build/make/targets/reg.test.xml =================================================================== --- build/make/targets/reg.test.xml (revision 490268) +++ build/make/targets/reg.test.xml (working copy) @@ -17,7 +17,7 @@ - + @@ -163,9 +163,9 @@ outfile="${reg.test.native.path}/${outfile}" objdir="${objdir}"> - + Index: build/make/targets/reg.test.run.xml =================================================================== --- build/make/targets/reg.test.run.xml (revision 490268) +++ build/make/targets/reg.test.run.xml (working copy) @@ -15,128 +15,128 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - - - - - - - ================================== - Run regression tests - ================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +================================== + Run regression tests +================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -146,9 +146,10 @@ @@ -160,9 +161,19 @@ + + + + + + + + + + - + Index: build/make/build.xml =================================================================== --- build/make/build.xml (revision 490268) +++ build/make/build.xml (working copy) @@ -421,8 +421,12 @@ - - + + + + + + Index: src/test/regression/H0000/run.test.xml =================================================================== --- src/test/regression/H0000/run.test.xml (revision 490268) +++ src/test/regression/H0000/run.test.xml (working copy) @@ -1,13 +0,0 @@ - - - - - - - - - - - - Index: src/test/regression/H0000/DirectByteBufferTest.java =================================================================== --- src/test/regression/H0000/DirectByteBufferTest.java (revision 490268) +++ src/test/regression/H0000/DirectByteBufferTest.java (working copy) @@ -1,18 +0,0 @@ -package org.apache.harmony.drlvm.tests.regression.h0000; - -import junit.framework.TestCase; - -public class DirectByteBufferTest extends TestCase { - - static { System.loadLibrary("DirectByteBufferTest"); } - - public static void main(String[] args) { - new DirectByteBufferTest().testValidBuffer(); - } - - private native String testValidBuffer0(); - - public void testValidBuffer() { - assertNull(testValidBuffer0()); - } -} Index: src/test/regression/H0000/DirectByteBufferTest.c =================================================================== --- src/test/regression/H0000/DirectByteBufferTest.c (revision 490268) +++ src/test/regression/H0000/DirectByteBufferTest.c (working copy) @@ -1,50 +0,0 @@ -#include -#include -#include -#include - -JNIEXPORT jstring JNICALL Java_org_apache_harmony_drlvm_tests_regression_h0000_DirectByteBufferTest_testValidBuffer0 - (JNIEnv *, jobject); - - -/* - * Class: DirectByteBufferTest - * Method: testValidBuffer0 - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_org_apache_harmony_drlvm_tests_regression_h0000_DirectByteBufferTest_testValidBuffer0 - (JNIEnv *jenv, jobject unused) -{ - char* error = (char*)calloc(256, 1); - const jlong BUF_SIZE = 100; - void* buf = malloc(BUF_SIZE); - jobject jbuf = (*jenv)->NewDirectByteBuffer(jenv, buf, BUF_SIZE); - void* addr = (*jenv)->GetDirectBufferAddress(jenv, jbuf); - jlong size = (*jenv)->GetDirectBufferCapacity(jenv, jbuf); - jstring jstr; - if (jbuf) { - if (addr != buf) { - sprintf(error, "invalid buffer address: expected %p but was %p\n", buf, addr); - } - if (size != BUF_SIZE) { - sprintf(error + strlen(error), - "invalid buffer capacity: expected %d but was %d\n", BUF_SIZE, size); - } - } else { - // access to direct buffers not supported - if (addr != NULL | size != -1) { - sprintf(error, "inconsistent NIO support:\n" - "NewDirectByteBuffer() returned NULL;\n" - "GetDirectBufferAddress() returned %p\n" - "GetDirectBufferCapacity() returned %d\n", addr, size); - } else { - sprintf(error, "no NIO support\n"); - } - } - - jstr = strlen(error) ? (*jenv)->NewStringUTF(jenv, error) : NULL; - free(buf); - free(error); - - return jstr; -} Index: src/test/regression/H0000/readme.txt =================================================================== --- src/test/regression/H0000/readme.txt (revision 490268) +++ src/test/regression/H0000/readme.txt (working copy) @@ -1,10 +0,0 @@ -Test sources were taken and modified from src/test/jni/nio. -Currenlty the test fails with the following message: - -HMYEXEL062E Internal VM error: Failed to create Java VM -FAILED to invoke JVM. - -But it is impossible to determine wether the test pass or not -because in both cases VM returns 0 status code. - -It demonstrates limitations of using of JUnit test format for VM testing. \ No newline at end of file