<br><br><div class="gmail_quote">On Fri, Mar 18, 2011 at 3:41 AM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Yeah , yeah..<br>
Maybe people was not aware that tests are running for couple of months now.<br>
<br>
But my question if we need something in addition.<br>
For instance, threaded FFI. How to test if it there, and if it is, how<br>
to test that it works ok?<br>
Apparently standard FFI test are not covering new threading capabilities of VM.<br></blockquote><div><br></div><div>A cross-platform test might be hard to write.  So far I&#39;ve used</div><div>- 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</div>
<div>- calling a complex Mac OS X native file dialog with callbacks for the filename filter and the accept and cancel actions</div><div>- making non-blocking calls on a MySQL db through ODBC</div><div>- (and my favourite) running an image that forks a reader that loops writing a squeak&gt; prompt, reading from stdin and evaluating the chunk.</div>
<div><br></div><div>Of course the last, while fun to use (one can interact with the image concurrent with using the reader) isn&#39;t that easy to adapt to an automated test.</div><div><br></div><div>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.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
<br>
On 18 March 2011 10:41, stephane ducasse &lt;<a href="mailto:stephane.ducasse@gmail.com">stephane.ducasse@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; :)<br>
&gt; In addition to running all the tests of all the subsystems of course.<br>
&gt;<br>
&gt; S.<br>
&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt; In Pharo there is:<br>
&gt;&gt;<br>
&gt;&gt;       Tests-VM<br>
&gt;&gt;                       BecomeTest<br>
&gt;&gt;                       IslandVMTweaksTestCase<br>
&gt;&gt;       Tests-Finalization<br>
&gt;&gt;                       ObjectFinalizerTest<br>
&gt;&gt;       Tests-ObjectsAsMethods<br>
&gt;&gt;                       TestObjectsAsMethods<br>
&gt;&gt;<br>
&gt;&gt; .. 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.<br>
&gt;&gt;<br>
&gt;&gt; e.g.<br>
&gt;&gt;<br>
&gt;&gt;       <a href="https://pharo-ic.lille.inria.fr/hudson/job/Pharo%20Core%201.2/lastCompletedBuild/testReport/Tests.VM/" target="_blank">https://pharo-ic.lille.inria.fr/hudson/job/Pharo%20Core%201.2/lastCompletedBuild/testReport/Tests.VM/</a><br>

&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;       Marcus<br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Best regards,<br>
Igor Stasenko AKA sig.<br>
</div></div></blockquote></div><br>