ConfigurationOfOSProcess updated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

ConfigurationOfOSProcess updated

David T. Lewis
I have made a few updates to OSProcess and CommandShell that I hope
will be useful for Pharo:

On SqueakSource, I repackaged both OSProcess and CommandShell into
finer-grained package naming. Tests-OSProcess and Tests-CommandShell
become OSProcess-Tests and CommandShell-Tests to avoid package name
conflicts with Pharo and Squeak. The rest of the former OSProcess
and CommandShell are split out into sub-packages to support this,
and also to make it possible avoid loading portions of the package
that are not required (e.g. in Pharo, do not load MVC portions of
CommandShell).

I updated ConfigurationOfOSProcess in SqS/MetacelloRespository to
load OSProcess from the new package structure. This will also load
a number of updates that make things work properly on Pharo. On
a Unix/Linux platform, all tests should be green (I am not sure
of the status on OS X).

I have not yet tried to do a ConfigurationOfCommandShell, but if
you use OSProcess and want to also use PipeableOSProcess from
the CommandShell package (but are not interested in the rest of
CommandShell), you can load ConfigurationOfOSProcess, then use
a Monticello browser to load just package CommandShell-Piping
from the CommandShell project on SqueakSource.

This is my first attempt to do anything with Metacello, so any
fixes or corrections will be appreciated. Miguel Cob originally
created the ConfigurationOfOSProcess, so thanks to Miguel for
doing this.

Dave


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ConfigurationOfOSProcess updated

Adrian Lienhard
Hi David,

Thanks a lot!

Please find my report for OS X below.

On Jul 2, 2010, at 04:32 , David T. Lewis wrote:

> I have made a few updates to OSProcess and CommandShell that I hope
> will be useful for Pharo:
>
> On SqueakSource, I repackaged both OSProcess and CommandShell into
> finer-grained package naming. Tests-OSProcess and Tests-CommandShell
> become OSProcess-Tests and CommandShell-Tests to avoid package name
> conflicts with Pharo and Squeak. The rest of the former OSProcess
> and CommandShell are split out into sub-packages to support this,
> and also to make it possible avoid loading portions of the package
> that are not required (e.g. in Pharo, do not load MVC portions of
> CommandShell).
>
> I updated Processs in SqS/MetacelloRespository to
> load OSProcess from the new package structure. This will also load
> a number of updates that make things work properly on Pharo. On
> a Unix/Linux platform, all tests should be green (I am not sure
> of the status on OS X).

Image: Pharo-1.1-11406-rc3dev10.07.1
VM: Squeak 4.2.4beta1U

Loading OSProcess:

Gofer new
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfOSProcess';
    load.
((Smalltalk at: #ConfigurationOfOSProcess) project latestVersion) load

ThisOSProcess initialize (this seems necessary, is it the right #initialize?)

The following tests crash the VM:
- UnixProcessUnixFileLockingTest
- UnixProcessWin32FileLockingTest
- UnixProcessTestCase

The failures and errors of the other tests:

Failures:
AioEventHandlerTestCase>>#testEnableHandleAndDisable
AioEventHandlerTestCase>>#testPrimAioModuleVersionString
AioEventHandlerTestCase>>#testFileWritableEvent
AioEventHandlerTestCase>>#testFileReadableEvent
UnixProcessAccessorTestCase>>#testChDir
UnixProcessAccessorTestCase>>#testIsWritableForUserInGroup
AioEventHandlerTestCase>>#testSuspendAioForSocketReadableEvent
UnixProcessAccessorTestCase>>#testIsReadableForUserInGroup
AioEventHandlerTestCase>>#testHandleForSocket
AioEventHandlerTestCase>>#testHandleForFile
AioEventHandlerTestCase>>#testSocketReadableEvent
UnixProcessAccessorTestCase>>#testIsExecutableForUserInGroup

Errors:
AioEventHandlerTestCase>>#testPrimAioModuleName

I wonder whether the Mac VM includes the latest version of the OSProcess plugin?

Cheers,
Adrian

> I have not yet tried to do a ConfigurationOfCommandShell, but if
> you use OSProcess and want to also use PipeableOSProcess from
> the CommandShell package (but are not interested in the rest of
> CommandShell), you can load ConfigurationOfOSProcess, then use
> a Monticello browser to load just package CommandShell-Piping
> from the CommandShell project on SqueakSource.
>
> This is my first attempt to do anything with Metacello, so any
> fixes or corrections will be appreciated. Miguel Cob originally
> created the ConfigurationOfOSProcess, so thanks to Miguel for
> doing this.
>
> Dave
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ConfigurationOfOSProcess updated

Stéphane Ducasse
In reply to this post by David T. Lewis
Thanks david

We should clean the Tests* package in pharo.

On Jul 2, 2010, at 4:32 AM, David T. Lewis wrote:

> I have made a few updates to OSProcess and CommandShell that I hope
> will be useful for Pharo:
>
> On SqueakSource, I repackaged both OSProcess and CommandShell into
> finer-grained package naming. Tests-OSProcess and Tests-CommandShell
> become OSProcess-Tests and CommandShell-Tests to avoid package name
> conflicts with Pharo and Squeak. The rest of the former OSProcess
> and CommandShell are split out into sub-packages to support this,
> and also to make it possible avoid loading portions of the package
> that are not required (e.g. in Pharo, do not load MVC portions of
> CommandShell).
>
> I updated ConfigurationOfOSProcess in SqS/MetacelloRespository to
> load OSProcess from the new package structure. This will also load
> a number of updates that make things work properly on Pharo. On
> a Unix/Linux platform, all tests should be green (I am not sure
> of the status on OS X).
>
> I have not yet tried to do a ConfigurationOfCommandShell, but if
> you use OSProcess and want to also use PipeableOSProcess from
> the CommandShell package (but are not interested in the rest of
> CommandShell), you can load ConfigurationOfOSProcess, then use
> a Monticello browser to load just package CommandShell-Piping
> from the CommandShell project on SqueakSource.
>
> This is my first attempt to do anything with Metacello, so any
> fixes or corrections will be appreciated. Miguel Cob originally
> created the ConfigurationOfOSProcess, so thanks to Miguel for
> doing this.
>
> Dave
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ConfigurationOfOSProcess updated

David T. Lewis
In reply to this post by Adrian Lienhard
On Fri, Jul 02, 2010 at 12:28:54PM +0200, Adrian Lienhard wrote:
> Hi David,
>
> Thanks a lot!
>
> Please find my report for OS X below.

Thanks Adrian, much appreciated. I guess that I should get a Mac one
of these days ;)

> Image: Pharo-1.1-11406-rc3dev10.07.1
> VM: Squeak 4.2.4beta1U
>
> Loading OSProcess:
>
> Gofer new
>     squeaksource: 'MetacelloRepository';
>     package: 'ConfigurationOfOSProcess';
>     load.
> ((Smalltalk at: #ConfigurationOfOSProcess) project latestVersion) load
>
> ThisOSProcess initialize (this seems necessary, is it the right #initialize?)

In ConfigurationOfOSProcess class>>load I call the #startUp: method in
ThisOSProcess. Without this the unit tests will fail until after you
restart the image. This is probably a poor way to do it, but it works.

> The following tests crash the VM:
> - UnixProcessUnixFileLockingTest
> - UnixProcessWin32FileLockingTest
> - UnixProcessTestCase

Ouch. I think this used to run without crashing on OS X.

> The failures and errors of the other tests:
>
> Failures:
> AioEventHandlerTestCase>>#testEnableHandleAndDisable
> AioEventHandlerTestCase>>#testPrimAioModuleVersionString
> AioEventHandlerTestCase>>#testFileWritableEvent
> AioEventHandlerTestCase>>#testFileReadableEvent
> UnixProcessAccessorTestCase>>#testChDir
> UnixProcessAccessorTestCase>>#testIsWritableForUserInGroup
> AioEventHandlerTestCase>>#testSuspendAioForSocketReadableEvent
> UnixProcessAccessorTestCase>>#testIsReadableForUserInGroup
> AioEventHandlerTestCase>>#testHandleForSocket
> AioEventHandlerTestCase>>#testHandleForFile
> AioEventHandlerTestCase>>#testSocketReadableEvent
> UnixProcessAccessorTestCase>>#testIsExecutableForUserInGroup
>
> Errors:
> AioEventHandlerTestCase>>#testPrimAioModuleName

The Aio failures are due to AioPlugin not being present. I don't
think this has ever been included in the Mac VMs (it would probably
work, but I don't think anyone has tried it). It's not serious and
will not affect usability of OSProcess.

> I wonder whether the Mac VM includes the latest version of the OSProcess plugin?
>

FWIW, you can check the versions of the plugins, on my Linux box
I have:

  OSProcess accessor osppModuleVersionString ==> '4.3.3'
  OSProcess accessor aioVersionString ==> '2.2.2'
  OSProcess accessor xdcpVersionString ==> '2.1.4'

Thanks for the feedback!

Dave


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ConfigurationOfOSProcess updated

Adrian Lienhard
Hi David,

On Jul 2, 2010, at 22:32 , David T. Lewis wrote:

[...]

> The Aio failures are due to AioPlugin not being present. I don't
> think this has ever been included in the Mac VMs (it would probably
> work, but I don't think anyone has tried it). It's not serious and
> will not affect usability of OSProcess.

Ok, good to know.

>> I wonder whether the Mac VM includes the latest version of the OSProcess plugin?
>>
>
> FWIW, you can check the versions of the plugins, on my Linux box
> I have:
>
>  OSProcess accessor osppModuleVersionString ==> '4.3.3'
>  OSProcess accessor aioVersionString ==> '2.2.2'
>  OSProcess accessor xdcpVersionString ==> '2.1.4'

On my Mac VM (4.2.4beta1U) I get:

 OSProcess accessor osppModuleVersionString ==>  '4.0.1'
 OSProcess accessor aioVersionString ==> nil
 OSProcess accessor xdcpVersionString ==> nil

Cheers,
Adrian


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ConfigurationOfOSProcess updated

David T. Lewis
On Sat, Jul 03, 2010 at 10:29:49AM +0200, Adrian Lienhard wrote:

>
> On Jul 2, 2010, at 22:32 , David T. Lewis wrote:
>
> >> I wonder whether the Mac VM includes the latest version of the OSProcess plugin?
> >>
> >
> > FWIW, you can check the versions of the plugins, on my Linux box
> > I have:
> >
> >  OSProcess accessor osppModuleVersionString ==> '4.3.3'
> >  OSProcess accessor aioVersionString ==> '2.2.2'
> >  OSProcess accessor xdcpVersionString ==> '2.1.4'
>
> On my Mac VM (4.2.4beta1U) I get:
>
>  OSProcess accessor osppModuleVersionString ==>  '4.0.1'
>  OSProcess accessor aioVersionString ==> nil
>  OSProcess accessor xdcpVersionString ==> nil

That's the problem. OSPP 4.0.1 is from November 2005. IIUC, John
noticed this and updated the sources in his more recent VMs. If
you are building your VMs from scratch, the plugin sources are on
SqueakSource in projects OSProcessPlugin, AioPlugin, and XDCP.

FYI, the specific fix for OSPP to support OS X was this:

  Name: VMConstruction-Plugins-OSProcessPlugin-dtl.3
  Author: dtl
  Time: 5 March 2006, 12:15:57 pm
  UUID: b09d2caa-cb4b-46f8-a1c9-6f4dda49de4f
  Ancestors: VMConstruction-Plugins-OSProcessPlugin-dtl.2
 
  Version 4.0.2
 
  Add pthread access primitive.
  Add pthread signal masking to ensure that forwarded signals are delivered
  to the interpreter thread. This is required for OS X.
 
  Strategy: Signal handler checks to see if it is executing in the context
  of the interpreter pthread. If yes, signal the Squeak semaphore, otherwise
  mask this pthread to prevent future delivery if this signum and resend
  the signal to the interpreter pthread.

Note, John's new VM code base (iOS) is very different, so I don't know
if there will be issues for OSProcess on the new iOS VM.

Dave


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: ConfigurationOfOSProcess updated

Adrian Lienhard
Ok, that explains it... I've checked the latest beta version of the Mac VM (4.2.5beta1U) and it doesn't ship with a newer version of the plugin.

Cheers,
Adrian
 
On Jul 3, 2010, at 14:26 , David T. Lewis wrote:

> On Sat, Jul 03, 2010 at 10:29:49AM +0200, Adrian Lienhard wrote:
>>
>> On Jul 2, 2010, at 22:32 , David T. Lewis wrote:
>>
>>>> I wonder whether the Mac VM includes the latest version of the OSProcess plugin?
>>>>
>>>
>>> FWIW, you can check the versions of the plugins, on my Linux box
>>> I have:
>>>
>>> OSProcess accessor osppModuleVersionString ==> '4.3.3'
>>> OSProcess accessor aioVersionString ==> '2.2.2'
>>> OSProcess accessor xdcpVersionString ==> '2.1.4'
>>
>> On my Mac VM (4.2.4beta1U) I get:
>>
>> OSProcess accessor osppModuleVersionString ==>  '4.0.1'
>> OSProcess accessor aioVersionString ==> nil
>> OSProcess accessor xdcpVersionString ==> nil
>
> That's the problem. OSPP 4.0.1 is from November 2005. IIUC, John
> noticed this and updated the sources in his more recent VMs. If
> you are building your VMs from scratch, the plugin sources are on
> SqueakSource in projects OSProcessPlugin, AioPlugin, and XDCP.
>
> FYI, the specific fix for OSPP to support OS X was this:
>
>  Name: VMConstruction-Plugins-OSProcessPlugin-dtl.3
>  Author: dtl
>  Time: 5 March 2006, 12:15:57 pm
>  UUID: b09d2caa-cb4b-46f8-a1c9-6f4dda49de4f
>  Ancestors: VMConstruction-Plugins-OSProcessPlugin-dtl.2
>
>  Version 4.0.2
>
>  Add pthread access primitive.
>  Add pthread signal masking to ensure that forwarded signals are delivered
>  to the interpreter thread. This is required for OS X.
>
>  Strategy: Signal handler checks to see if it is executing in the context
>  of the interpreter pthread. If yes, signal the Squeak semaphore, otherwise
>  mask this pthread to prevent future delivery if this signum and resend
>  the signal to the interpreter pthread.
>
> Note, John's new VM code base (iOS) is very different, so I don't know
> if there will be issues for OSProcess on the new iOS VM.
>
> Dave
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project