Author: zoltan
Date: 2006-05-25 12:05:05 -0400 (Thu, 25 May 2006)
New Revision: 61118

Modified:
   trunk/mono/mono/tests/verifier/ChangeLog
   trunk/mono/mono/tests/verifier/TestRunner.cs
   trunk/mono/mono/tests/verifier/make_bin_test.sh
   trunk/mono/mono/tests/verifier/make_exception_branch_test.sh
   trunk/mono/mono/tests/verifier/make_obj_store_test.sh
   trunk/mono/mono/tests/verifier/make_stack_0_pop_test.sh
   trunk/mono/mono/tests/verifier/make_stack_0_test.sh
   trunk/mono/mono/tests/verifier/make_stack_1_pop_test.sh
   trunk/mono/mono/tests/verifier/make_stack_merge_test.sh
   trunk/mono/mono/tests/verifier/make_store_test.sh
Log:
2006-05-25  Zoltan Varga  <[EMAIL PROTECTED]>

        * *.sh: Fix more verification problems.

        * TestRunner.cs: Use Assembly.EntryPoint instead of searching for a 
Main method.


Modified: trunk/mono/mono/tests/verifier/ChangeLog
===================================================================
--- trunk/mono/mono/tests/verifier/ChangeLog    2006-05-25 16:04:47 UTC (rev 
61117)
+++ trunk/mono/mono/tests/verifier/ChangeLog    2006-05-25 16:05:05 UTC (rev 
61118)
@@ -1,3 +1,9 @@
+2006-05-25  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * *.sh: Fix more verification problems.
+
+       * TestRunner.cs: Use Assembly.EntryPoint instead of searching for a 
Main method.
+
 2006-05-23  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * make_store_test.sh make_obj_store_test.sh make_stack_merge_test.sh: 
Fix

Modified: trunk/mono/mono/tests/verifier/TestRunner.cs
===================================================================
--- trunk/mono/mono/tests/verifier/TestRunner.cs        2006-05-25 16:04:47 UTC 
(rev 61117)
+++ trunk/mono/mono/tests/verifier/TestRunner.cs        2006-05-25 16:05:05 UTC 
(rev 61118)
@@ -8,10 +8,14 @@
                Console.Write (test);
 
                Assembly a = Assembly.LoadFrom (test);
-               Module m = a.GetLoadedModules ()[0];
 
-               MethodInfo mi = m.GetMethod ("Main");
+               MethodInfo mi = a.EntryPoint;
 
+               if (mi == null) {
+                       Console.WriteLine (" FAILED (no entry point found)");
+                       return;
+               }
+
                try {
                        mi.Invoke (null, null);
                        Console.WriteLine (" FAILED (silent success)");

Modified: trunk/mono/mono/tests/verifier/make_bin_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_bin_test.sh     2006-05-25 16:04:47 UTC 
(rev 61117)
+++ trunk/mono/mono/tests/verifier/make_bin_test.sh     2006-05-25 16:05:05 UTC 
(rev 61118)
@@ -16,6 +16,12 @@
 // VALIDITY CIL which breaks the ECMA-335 rules. 
 // this CIL should fail verification by a conforming CLI verifier.
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 .method public static int32 Main() cil managed
 {
        .entrypoint

Modified: trunk/mono/mono/tests/verifier/make_exception_branch_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_exception_branch_test.sh        
2006-05-25 16:04:47 UTC (rev 61117)
+++ trunk/mono/mono/tests/verifier/make_exception_branch_test.sh        
2006-05-25 16:05:05 UTC (rev 61118)
@@ -16,6 +16,12 @@
 // invalid CIL which breaks the ECMA-335 rules. 
 // This CIL should fail verification by a conforming CLI verifier.
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 .method public static int32 Main() cil managed
 {
        .entrypoint

Modified: trunk/mono/mono/tests/verifier/make_obj_store_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_obj_store_test.sh       2006-05-25 
16:04:47 UTC (rev 61117)
+++ trunk/mono/mono/tests/verifier/make_obj_store_test.sh       2006-05-25 
16:05:05 UTC (rev 61118)
@@ -13,6 +13,12 @@
 TEST_TYPE2=`echo $TEST_TYPE2 | sed -s 's/&/\\\&/'`
 sed -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/OPCODE/${TEST_OP}/g" -e 
"s/TYPE1/${TEST_TYPE1}/g" -e "s/TYPE2/${TEST_TYPE2}/g" > $TEST_FILE <<//EOF
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 // VALIDITY CIL which breaks the ECMA-335 rules. 
 // this CIL should fail verification by a conforming CLI verifier.
 

Modified: trunk/mono/mono/tests/verifier/make_stack_0_pop_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_stack_0_pop_test.sh     2006-05-25 
16:04:47 UTC (rev 61117)
+++ trunk/mono/mono/tests/verifier/make_stack_0_pop_test.sh     2006-05-25 
16:05:05 UTC (rev 61118)
@@ -9,12 +9,18 @@
 // invalid CIL which breaks the ECMA-335 rules. 
 // This CIL should fail verification by a conforming CLI verifier.
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 .class Class extends [mscorlib]System.Object
 {
     .field public int32 fld
 }
 
-.method public static int32 Main(int32 arg) cil managed
+.method public static int32 Main() cil managed
 {
        .entrypoint
        .maxstack 1

Modified: trunk/mono/mono/tests/verifier/make_stack_0_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_stack_0_test.sh 2006-05-25 16:04:47 UTC 
(rev 61117)
+++ trunk/mono/mono/tests/verifier/make_stack_0_test.sh 2006-05-25 16:05:05 UTC 
(rev 61118)
@@ -9,12 +9,18 @@
 // invalid CIL which breaks the ECMA-335 rules. 
 // This CIL should fail verification by a conforming CLI verifier.
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 .class Class extends [mscorlib]System.Object
 {
     .field public int32 fld
 }
 
-.method public static int32 Main(int32 arg) cil managed
+.method public static int32 Main() cil managed
 {
        .entrypoint
        .maxstack 1

Modified: trunk/mono/mono/tests/verifier/make_stack_1_pop_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_stack_1_pop_test.sh     2006-05-25 
16:04:47 UTC (rev 61117)
+++ trunk/mono/mono/tests/verifier/make_stack_1_pop_test.sh     2006-05-25 
16:05:05 UTC (rev 61118)
@@ -10,12 +10,18 @@
 // invalid CIL which breaks the ECMA-335 rules.
 // This CIL should fail verification by a conforming CLI verifier.
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 .class Class extends [mscorlib]System.Object
 {
     .field public int32 fld
 }
 
-.method public static int32 Main(int32 arg) cil managed
+.method public static int32 Main() cil managed
 {
        .entrypoint
        .maxstack 1

Modified: trunk/mono/mono/tests/verifier/make_stack_merge_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_stack_merge_test.sh     2006-05-25 
16:04:47 UTC (rev 61117)
+++ trunk/mono/mono/tests/verifier/make_stack_merge_test.sh     2006-05-25 
16:05:05 UTC (rev 61118)
@@ -15,6 +15,12 @@
 // VALIDITY CIL which breaks the ECMA-335,III,1.8.1.3 rule. 
 // this CIL should fail verification by a conforming CLI verifier.
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 .assembly extern mscorlib
 {
   .ver 1:0:5000:0

Modified: trunk/mono/mono/tests/verifier/make_store_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_store_test.sh   2006-05-25 16:04:47 UTC 
(rev 61117)
+++ trunk/mono/mono/tests/verifier/make_store_test.sh   2006-05-25 16:05:05 UTC 
(rev 61118)
@@ -16,6 +16,12 @@
 // VALIDITY CIL which breaks the ECMA-335 rules. 
 // this CIL should fail verification by a conforming CLI verifier.
 
+.assembly '${TEST_NAME}_generated'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
 .assembly extern mscorlib
 {
   .ver 1:0:5000:0

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to