diff options
Diffstat (limited to 'libjava/testsuite/libjava.loader')
16 files changed, 0 insertions, 251 deletions
diff --git a/libjava/testsuite/libjava.loader/MyLoader.java b/libjava/testsuite/libjava.loader/MyLoader.java deleted file mode 100644 index 40c31d7..0000000 --- a/libjava/testsuite/libjava.loader/MyLoader.java +++ /dev/null @@ -1,14 +0,0 @@ -import java.net.*; - -public class MyLoader extends URLClassLoader -{ - public MyLoader (URL urls[]) - { - super (urls); - } - - public MyLoader (URL urls[], ClassLoader parent) - { - super (urls, parent); - } -} diff --git a/libjava/testsuite/libjava.loader/TestEarlyGC.jar b/libjava/testsuite/libjava.loader/TestEarlyGC.jar Binary files differdeleted file mode 100644 index 7a9c0ef..0000000 --- a/libjava/testsuite/libjava.loader/TestEarlyGC.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/TestEarlyGC.java b/libjava/testsuite/libjava.loader/TestEarlyGC.java deleted file mode 100644 index f3bfa09..0000000 --- a/libjava/testsuite/libjava.loader/TestEarlyGC.java +++ /dev/null @@ -1,64 +0,0 @@ -public class TestEarlyGC extends ClassLoader { - - static TestEarlyGC[] a = new TestEarlyGC[10]; - - // Jeff Sturm writes: - // Reconstructed from bytecode (and memory). The singleton pattern - // is used as a class finalizer. - // public class C { - // private static C c; - // public C() { - // c = this; - // } - // protected void finalize() { - // System.out.println("finalized"); - // } - // } - byte[] code = { - -54,-2,-70,-66,0,3,0,45,0,32,1,0,1,67,7,0, - 1,1,0,16,106,97,118,97,47,108,97,110,103,47,79,98, - 106,101,99,116,7,0,3,1,0,1,99,1,0,3,76,67, - 59,1,0,6,60,105,110,105,116,62,1,0,3,40,41,86, - 1,0,4,67,111,100,101,12,0,7,0,8,10,0,4,0, - 10,12,0,5,0,6,9,0,2,0,12,1,0,15,76,105, - 110,101,78,117,109,98,101,114,84,97,98,108,101,1,0,8, - 102,105,110,97,108,105,122,101,1,0,16,106,97,118,97,47, - 108,97,110,103,47,83,121,115,116,101,109,7,0,16,1,0, - 3,111,117,116,1,0,21,76,106,97,118,97,47,105,111,47, - 80,114,105,110,116,83,116,114,101,97,109,59,12,0,18,0, - 19,9,0,17,0,20,1,0,9,102,105,110,97,108,105,122, - 101,100,8,0,22,1,0,19,106,97,118,97,47,105,111,47, - 80,114,105,110,116,83,116,114,101,97,109,7,0,24,1,0, - 7,112,114,105,110,116,108,110,1,0,21,40,76,106,97,118, - 97,47,108,97,110,103,47,83,116,114,105,110,103,59,41,86, - 12,0,26,0,27,10,0,25,0,28,1,0,10,83,111,117, - 114,99,101,70,105,108,101,1,0,6,67,46,106,97,118,97, - 0,33,0,2,0,4,0,0,0,1,0,10,0,5,0,6, - 0,0,0,2,0,1,0,7,0,8,0,1,0,9,0,0, - 0,33,0,1,0,1,0,0,0,9,42,-73,0,11,42,-77, - 0,13,-79,0,0,0,1,0,14,0,0,0,6,0,1,0, - 4,0,5,0,4,0,15,0,8,0,1,0,9,0,0,0, - 33,0,2,0,1,0,0,0,9,-78,0,21,18,23,-74,0, - 29,-79,0,0,0,1,0,14,0,0,0,6,0,1,0,0, - 0,9,0,1,0,30,0,0,0,2,0,31 - }; - - TestEarlyGC() throws Throwable { - defineClass("C", code, 0, code.length).newInstance(); - } - - public static void main(String[] args) { - Runtime r = Runtime.getRuntime(); - - try { - for (int n = 0; n < a.length; n++) { - a[n] = new TestEarlyGC(); - r.gc(); - r.runFinalization(); - Thread.yield(); - } - } catch (Throwable t) { - t.printStackTrace(); - } - } -} diff --git a/libjava/testsuite/libjava.loader/TestEarlyGC.out b/libjava/testsuite/libjava.loader/TestEarlyGC.out deleted file mode 100644 index e69de29..0000000 --- a/libjava/testsuite/libjava.loader/TestEarlyGC.out +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/TestLeak.jar b/libjava/testsuite/libjava.loader/TestLeak.jar Binary files differdeleted file mode 100644 index d7bd247..0000000 --- a/libjava/testsuite/libjava.loader/TestLeak.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/TestLeak.java b/libjava/testsuite/libjava.loader/TestLeak.java deleted file mode 100644 index 3ef4525..0000000 --- a/libjava/testsuite/libjava.loader/TestLeak.java +++ /dev/null @@ -1,33 +0,0 @@ -import java.net.*; -import java.lang.reflect.Proxy; - -public class TestLeak -{ - static class MyLoader extends URLClassLoader - { - public MyLoader (URL urls[]) - { - super (urls); - } - } - - public static void main (String[] args) - { - URLClassLoader ucl = - (URLClassLoader) ClassLoader.getSystemClassLoader(); - URL urls[] = ucl.getURLs (); - Class ifaces[] = new Class[1]; - ifaces[0] = java.lang.Comparable.class; - - try { - for (int i = 0; i < 100; i++) - { - Proxy.getProxyClass (new MyLoader (urls), ifaces); - } - } catch (Exception e) { - e.printStackTrace (); - } - } -} - - diff --git a/libjava/testsuite/libjava.loader/TestLeak.out b/libjava/testsuite/libjava.loader/TestLeak.out deleted file mode 100644 index e69de29..0000000 --- a/libjava/testsuite/libjava.loader/TestLeak.out +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/TestMultiple.jar b/libjava/testsuite/libjava.loader/TestMultiple.jar Binary files differdeleted file mode 100644 index dfb454c..0000000 --- a/libjava/testsuite/libjava.loader/TestMultiple.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/TestMultiple.java b/libjava/testsuite/libjava.loader/TestMultiple.java deleted file mode 100644 index 1a56fc4..0000000 --- a/libjava/testsuite/libjava.loader/TestMultiple.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.net.*; - -public class TestMultiple -{ - public static void main (String[] args) - { - URLClassLoader ucl = - (URLClassLoader) ClassLoader.getSystemClassLoader(); - URL urls[] = ucl.getURLs (); - - MyLoader t1 = new MyLoader (urls); - MyLoader t2 = new MyLoader (urls); - - Class c1, c2; - - try { - - c1 = t1.loadClass ("dummy"); - c2 = t2.loadClass ("dummy"); - - } - catch (Exception e) { - e.printStackTrace (); - } - } -} - - diff --git a/libjava/testsuite/libjava.loader/TestMultiple.out b/libjava/testsuite/libjava.loader/TestMultiple.out deleted file mode 100644 index e69de29..0000000 --- a/libjava/testsuite/libjava.loader/TestMultiple.out +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/TestParent.jar b/libjava/testsuite/libjava.loader/TestParent.jar Binary files differdeleted file mode 100644 index 41f66db..0000000 --- a/libjava/testsuite/libjava.loader/TestParent.jar +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/TestParent.java b/libjava/testsuite/libjava.loader/TestParent.java deleted file mode 100644 index 3996b76..0000000 --- a/libjava/testsuite/libjava.loader/TestParent.java +++ /dev/null @@ -1,29 +0,0 @@ -import java.net.*; - -public class TestParent -{ - public static void main (String[] args) - { - URLClassLoader ucl = - (URLClassLoader) ClassLoader.getSystemClassLoader(); - URL urls[] = ucl.getURLs (); - - MyLoader parent = new MyLoader (urls); - - MyLoader t1 = new MyLoader (urls, parent); - MyLoader t2 = new MyLoader (urls, parent); - - Class c1, c2; - - try { - - c1 = t1.loadClass ("dummy"); - c2 = t2.loadClass ("dummy"); - - } - catch (Exception e) { - e.printStackTrace (); - } - } -} - diff --git a/libjava/testsuite/libjava.loader/TestParent.out b/libjava/testsuite/libjava.loader/TestParent.out deleted file mode 100644 index e69de29..0000000 --- a/libjava/testsuite/libjava.loader/TestParent.out +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/dummy.class b/libjava/testsuite/libjava.loader/dummy.class Binary files differdeleted file mode 100644 index 58ffb90..0000000 --- a/libjava/testsuite/libjava.loader/dummy.class +++ /dev/null diff --git a/libjava/testsuite/libjava.loader/dummy.java b/libjava/testsuite/libjava.loader/dummy.java deleted file mode 100644 index 67bb4a7..0000000 --- a/libjava/testsuite/libjava.loader/dummy.java +++ /dev/null @@ -1,6 +0,0 @@ -// A dummy class - -public class dummy -{ -} - diff --git a/libjava/testsuite/libjava.loader/loader.exp b/libjava/testsuite/libjava.loader/loader.exp deleted file mode 100644 index cdb356b..0000000 --- a/libjava/testsuite/libjava.loader/loader.exp +++ /dev/null @@ -1,77 +0,0 @@ -# Tests for ClassLoader and native library loader code. - -# Compute the correct name for an object file. -# This is an awful hack. -proc gcj_object_file_name {compiler base} { - verbose "OBJECT: compiler = $compiler" - if {[string match *libtool* $compiler]} { - return $base.lo - } - return $base.o -} - -# Do all the work for a single JNI test. Return 0 on failure. -proc gcj_loader_test_one {srcfile} { - global objdir srcdir subdir - - set resfile $srcdir/$subdir/[file rootname [file tail $srcfile]].out - - regsub "^.*/(\[^/.\]+)\[.\]\[^/]*$" "$srcfile" "\\1" out - set executable "${objdir}/$out.exe" - - set errname [file rootname [file tail $srcfile]] - set args [libjava_arguments link] - lappend args "additional_flags=--main=[file rootname [file tail $srcfile]] [gcj_object_file_name $args dummy]" - set x [libjava_prune_warnings \ - [libjava_tcompile $srcfile "$executable" executable $args]] - - if { $x != "" } { - verbose "target_compile failed: $x" 2 - - fail "$errname compilation from source" - untested "$errname execution from source compiled test" - return - } - pass "$errname compilation from source" - - libjava_invoke $errname "source compiled test" "" $executable "" $resfile "" - - return 1 -} - -# Run the bytecode loader tests. -proc gcj_loader_run {} { - global srcdir subdir objdir - global build_triplet host_triplet - global GCJ_UNDER_TEST - -# set file "${srcdir}/${subdir}/dummy.java" -# if {! [bytecompile_file $file [pwd]]} { -# fail "bytecompile $file" -# # FIXME - should use `untested' on all remaining tests. -# # But that is hard. -# return 0 -# } -# pass "bytecompile $file" - - set args [libjava_arguments compile] - lappend args "additional_flags=--resource $srcdir/$subdir/dummy.class" - set x [libjava_prune_warnings \ - [libjava_tcompile "$srcdir/$subdir/dummy.class" "$objdir/[gcj_object_file_name $args dummy]" object $args]] - - if { $x != "" } { - verbose "resource compilation failed: $x" 2 - - fail "resource compilation dummy.class" - return 0; - } - pass "resource compilation: dummy.class" - - catch { lsort [glob -nocomplain ${srcdir}/${subdir}/Test*.jar] } srcfiles - - foreach x $srcfiles { - gcj_loader_test_one $x - } -} - -gcj_loader_run |