[Pharo-project] [Vm-dev] Running tests for auto-built Cog VMs

Eliot Miranda eliot.miranda at gmail.com
Fri Mar 18 16:44:40 UTC 2011


On Fri, Mar 18, 2011 at 3:41 AM, Igor Stasenko <siguctua at gmail.com> wrote:

>
> Yeah , yeah..
> Maybe people was not aware that tests are running for couple of months now.
>
> But my question if we need something in addition.
> For instance, threaded FFI. How to test if it there, and if it is, how
> to test that it works ok?
> Apparently standard FFI test are not covering new threading capabilities of
> VM.
>

A cross-platform test might be hard to write.  So far I've used
- running a threaded call to system(1, i.e. unix) with some argument like
sleep 60 while forking a loop that counts and printing the count afterward.
 if the count is small the call blocked
- calling a complex Mac OS X native file dialog with callbacks for the
filename filter and the accept and cancel actions
- making non-blocking calls on a MySQL db through ODBC
- (and my favourite) running an image that forks a reader that loops writing
a squeak> prompt, reading from stdin and evaluating the chunk.

Of course the last, while fun to use (one can interact with the image
concurrent with using the reader) isn't that easy to adapt to an automated
test.

One of the nest tests is to create an OS semaphore and then fork a threaded
call to wait on it, wait on a delay and then signal the semaphore with
another threaded call.  Tests can be built up upon this basic approach.
 i.e. we need to write appropriate automated tests of the threaded FFI.

>
>
> On 18 March 2011 10:41, stephane ducasse <stephane.ducasse at gmail.com>
> wrote:
> >
> > :)
> > In addition to running all the tests of all the subsystems of course.
> >
> > S.
> >
> >>>
> >> In Pharo there is:
> >>
> >>       Tests-VM
> >>                       BecomeTest
> >>                       IslandVMTweaksTestCase
> >>       Tests-Finalization
> >>                       ObjectFinalizerTest
> >>       Tests-ObjectsAsMethods
> >>                       TestObjectsAsMethods
> >>
> >> .. and they are run every day at least once (in 1.2, 1.3 and before 1.2
> was stable even 1.1) since a couple of months.
> >>
> >> e.g.
> >>
> >>
> https://pharo-ic.lille.inria.fr/hudson/job/Pharo%20Core%201.2/lastCompletedBuild/testReport/Tests.VM/
> >>
> >>
> >>       Marcus
> >
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110318/749b7638/attachment.htm


More information about the Vm-dev mailing list