[ENH] Socket Test Suite.

John M McIntosh johnmci at smalltalkconsulting.com
Mon Jun 12 19:42:19 UTC 2000


Hi, well I'm am waiting for a system 8.6 system to build I thought I'd
release the test suite for Sockets. There are two files attached

JMM-Socket-Network Tests P.1.cs
which is a prereq that adds some accessors so I can get at some Socket and
Semaphore instance variables so we can check things for 2.7 and above, if
you have the latest 2.8a update most of these accessors are present.


JMM-SUnit-Network Tests.1.cs
which is the SUnit based test suite.


This test suite was used to test the behavior of the Old macTCP
implementation, against the new OT version. It has been tested on VM's 2.7
and above, using of course the old socket plugin and the new.

NetworkResolverTest tests the resolver for macTCP
NetworkResolverTestOT tests the resolver for OT.
NetworkSocketOpenTest tests the Socket class for macTCP.
NetworkSocketOpenTestOT tests the Socket class for OT.

In my environment it runs fine for old images against 2.7 and 2.8a, and of
course fine for new images against 2.8a.

For the old socket plugin, expect the UDP and the listen/accept test to
fail, since of course they aren't supported with that plugin.

I have run some tests on Linux, there are some interesting behavior issues
between that implementation and the macintosh implementation, on socket
close for example and difference of opinion on address information for UDP
sockets after setpeer:  My intent in building this suite is to clear up
differences of opinion between platform implementations of the Socket
support code.

Note in order to test the data transfer methods you need an echo (port 7)
server on your network. This might not be available. You can fake one by
setting up an image on another machine and look at
Socket(class)>>remoteTestServerTCP and Socket(class)>>remoteTestServerUDP

You might need to change the port from 7 to some other number > 1024 to make
it work. 

Oh and the transfer test builds random strings so I could infer dropped or
mangled data, but this process takes a long time to do on Slower machines.
This also means that mac users must set their VM size to say 35MB to keep
happy, if not things will hang at some point when you run out of memory.
Running this stuff isn't for the faint of heart especially on different
platforms since now you must figure out why the test failed.

Note of course the error numbers returned will be different so right away
most if not all the tests that check for failure will fail due to incorrect
decisions about the error numbers. Not that your application should consider
the non-zero error numbers and make some sort of decision but you never
know...


As always look at the constants category of the test classes to see if the
servers you are going to hit are going to be happy with you.

For HTTP and mail  I hit squeak.cs.uiuc.edu

You'll need to do your own for echo, and a time server.

You of course need 2.6 of SUnits to run these tests, see

http://wiki.cs.uiuc.edu/CampSmalltalk/SUnit+Camp+Smalltalk

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/mac-binhex40
Size: 2698 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000612/b07713e8/attachment.hqx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/mac-binhex40
Size: 87003 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000612/b07713e8/attachment-0001.hqx


More information about the Squeak-dev mailing list