On 02/04/2011 10:52 PM, Holger Hans Peter Freyther wrote:
On 02/04/2011 10:28 PM, Holger Hans Peter Freyther wrote:
+    testDoNotCrashWithWrongTypes [
+        "The objective is to see if wrong types for a cCallout will
+         make the VM crash or not. It should also check if these calls
+         raise the appropriate exception."
+        | socket impl |
+
+        socket := DatagramSocket new.
+        impl := socket implementation.
+
+        self should: [impl accept: -1 peer: nil addrLen: 0] raise: 
SystemExceptions.PrimitiveFailed.
+        self should: [impl getPeerName: -1 addr: nil addrLen: 0] raise: 
SystemExceptions.PrimitiveFailed.
+        self should: [impl getSockName: -1 addr: nil addrLen: 0] raise: 
SystemExceptions.PrimitiveFailed.
+        self should: [impl receive: -1 buffer: nil size: 0 flags: 0 from: nil 
size: 0] raise: SystemExceptions.PrimitiveFailed.
+    ]
  ]

this fails from within the testsuite as it is generating stderr output. Is
this something we can handle in autotest?

I'll make it XFAIL for now. For 3.3 we can change the PrimitiveFailed to invoke a Smalltalk implementation of the type checks and raise a proper exception.

Paolo

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to