The Trunk: NetworkTests-ul.32.mcz

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

The Trunk: NetworkTests-ul.32.mcz

commits-2
Levente Uzonyi uploaded a new version of NetworkTests to project The Trunk:
http://source.squeak.org/trunk/NetworkTests-ul.32.mcz

==================== Summary ====================

Name: NetworkTests-ul.32
Author: ul
Time: 13 August 2012, 5:36:58.512 pm
UUID: 890b13a3-3ca4-b840-ae6c-f2a252618455
Ancestors: NetworkTests-dtl.31

Added some tests for Socket >> #peerName.

=============== Diff against NetworkTests-dtl.31 ===============

Item was added:
+ ----- Method: SocketTest>>testPeerName (in category 'tests') -----
+ testPeerName
+
+ self shouldnt: [ Socket new peerName ] raise: Error.
+ self testServerAccept.
+ self shouldnt: [ listenerSocket peerName ] raise: Error.
+ self shouldnt: [ clientSocket peerName ] raise: Error.
+ self shouldnt: [ serverSocket peerName ] raise: Error!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

Frank Shearar-3
On 13 August 2012 16:37,  <[hidden email]> wrote:

> Levente Uzonyi uploaded a new version of NetworkTests to project The Trunk:
> http://source.squeak.org/trunk/NetworkTests-ul.32.mcz
>
> ==================== Summary ====================
>
> Name: NetworkTests-ul.32
> Author: ul
> Time: 13 August 2012, 5:36:58.512 pm
> UUID: 890b13a3-3ca4-b840-ae6c-f2a252618455
> Ancestors: NetworkTests-dtl.31
>
> Added some tests for Socket >> #peerName.
>
> =============== Diff against NetworkTests-dtl.31 ===============
>
> Item was added:
> + ----- Method: SocketTest>>testPeerName (in category 'tests') -----
> + testPeerName
> +
> +       self shouldnt: [ Socket new peerName ] raise: Error.
> +       self testServerAccept.
> +       self shouldnt: [ listenerSocket peerName ] raise: Error.
> +       self shouldnt: [ clientSocket peerName ] raise: Error.
> +       self shouldnt: [ serverSocket peerName ] raise: Error!

This test fails on the build server:

http://squeakci.org/job/SqueakTrunk/33/testReport/NetworkTests.Kernel/SocketTest/testPeerName/

Less than helpful debug stuff there - "Assertion failed" - but there you go.

I would imagine it's yet another platform specific issue?

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

Levente Uzonyi-2
On Mon, 13 Aug 2012, Frank Shearar wrote:

> On 13 August 2012 16:37,  <[hidden email]> wrote:
>> Levente Uzonyi uploaded a new version of NetworkTests to project The Trunk:
>> http://source.squeak.org/trunk/NetworkTests-ul.32.mcz
>>
>> ==================== Summary ====================
>>
>> Name: NetworkTests-ul.32
>> Author: ul
>> Time: 13 August 2012, 5:36:58.512 pm
>> UUID: 890b13a3-3ca4-b840-ae6c-f2a252618455
>> Ancestors: NetworkTests-dtl.31
>>
>> Added some tests for Socket >> #peerName.
>>
>> =============== Diff against NetworkTests-dtl.31 ===============
>>
>> Item was added:
>> + ----- Method: SocketTest>>testPeerName (in category 'tests') -----
>> + testPeerName
>> +
>> +       self shouldnt: [ Socket new peerName ] raise: Error.
>> +       self testServerAccept.
>> +       self shouldnt: [ listenerSocket peerName ] raise: Error.
>> +       self shouldnt: [ clientSocket peerName ] raise: Error.
>> +       self shouldnt: [ serverSocket peerName ] raise: Error!
>
> This test fails on the build server:
>
> http://squeakci.org/job/SqueakTrunk/33/testReport/NetworkTests.Kernel/SocketTest/testPeerName/
>
> Less than helpful debug stuff there - "Assertion failed" - but there you go.
>
> I would imagine it's yet another platform specific issue?

Does the VM have the new network primitives?


Levente

>
> frank
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

Frank Shearar-3
On 13 August 2012 21:55, Levente Uzonyi <[hidden email]> wrote:

> On Mon, 13 Aug 2012, Frank Shearar wrote:
>
>> On 13 August 2012 16:37,  <[hidden email]> wrote:
>>>
>>> Levente Uzonyi uploaded a new version of NetworkTests to project The
>>> Trunk:
>>> http://source.squeak.org/trunk/NetworkTests-ul.32.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: NetworkTests-ul.32
>>> Author: ul
>>> Time: 13 August 2012, 5:36:58.512 pm
>>> UUID: 890b13a3-3ca4-b840-ae6c-f2a252618455
>>> Ancestors: NetworkTests-dtl.31
>>>
>>> Added some tests for Socket >> #peerName.
>>>
>>> =============== Diff against NetworkTests-dtl.31 ===============
>>>
>>> Item was added:
>>> + ----- Method: SocketTest>>testPeerName (in category 'tests') -----
>>> + testPeerName
>>> +
>>> +       self shouldnt: [ Socket new peerName ] raise: Error.
>>> +       self testServerAccept.
>>> +       self shouldnt: [ listenerSocket peerName ] raise: Error.
>>> +       self shouldnt: [ clientSocket peerName ] raise: Error.
>>> +       self shouldnt: [ serverSocket peerName ] raise: Error!
>>
>>
>> This test fails on the build server:
>>
>>
>> http://squeakci.org/job/SqueakTrunk/33/testReport/NetworkTests.Kernel/SocketTest/testPeerName/
>>
>> Less than helpful debug stuff there - "Assertion failed" - but there you
>> go.
>>
>> I would imagine it's yet another platform specific issue?
>
>
> Does the VM have the new network primitives?

It's Cog r2652, so it ought to for sufficiently new meanings of "new".

frank

> Levente
>
>>
>> frank
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

David T. Lewis
On Tue, Aug 14, 2012 at 07:11:26AM +0100, Frank Shearar wrote:

> On 13 August 2012 21:55, Levente Uzonyi <[hidden email]> wrote:
> > On Mon, 13 Aug 2012, Frank Shearar wrote:
> >
> >> On 13 August 2012 16:37,  <[hidden email]> wrote:
> >>>
> >>> Levente Uzonyi uploaded a new version of NetworkTests to project The
> >>> Trunk:
> >>> http://source.squeak.org/trunk/NetworkTests-ul.32.mcz
> >>>
> >>> ==================== Summary ====================
> >>>
> >>> Name: NetworkTests-ul.32
> >>> Author: ul
> >>> Time: 13 August 2012, 5:36:58.512 pm
> >>> UUID: 890b13a3-3ca4-b840-ae6c-f2a252618455
> >>> Ancestors: NetworkTests-dtl.31
> >>>
> >>> Added some tests for Socket >> #peerName.
> >>>
> >>> =============== Diff against NetworkTests-dtl.31 ===============
> >>>
> >>> Item was added:
> >>> + ----- Method: SocketTest>>testPeerName (in category 'tests') -----
> >>> + testPeerName
> >>> +
> >>> +       self shouldnt: [ Socket new peerName ] raise: Error.
> >>> +       self testServerAccept.
> >>> +       self shouldnt: [ listenerSocket peerName ] raise: Error.
> >>> +       self shouldnt: [ clientSocket peerName ] raise: Error.
> >>> +       self shouldnt: [ serverSocket peerName ] raise: Error!
> >>
> >>
> >> This test fails on the build server:
> >>
> >>
> >> http://squeakci.org/job/SqueakTrunk/33/testReport/NetworkTests.Kernel/SocketTest/testPeerName/
> >>
> >> Less than helpful debug stuff there - "Assertion failed" - but there you
> >> go.
> >>
> >> I would imagine it's yet another platform specific issue?
> >
> >
> > Does the VM have the new network primitives?
>
> It's Cog r2652, so it ought to for sufficiently new meanings of "new".
>

Cog does not provide the new network primitives. You can verify whether
your VM has the primitives by evaluating "NetNameResolver useOldNetwork".

This may be an issue in Socket class>>remoteSocketAddress that is
exposed when running with the new network support. The test attempts
to do "Socket new peerName" which does not work (but should it???).

Dave


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

Levente Uzonyi-2
On Tue, 14 Aug 2012, David T. Lewis wrote:

> This may be an issue in Socket class>>remoteSocketAddress that is
> exposed when running with the new network support. The test attempts
> to do "Socket new peerName" which does not work (but should it???).

It works for me on windows and linux using Cog, thought the behavior is
inconsistent. I get a string on windows and nil on linux.
Btw #remoteSocketAddress is not used (and should not be used) when
#peerName is sent if #useOldNetwork is true.


Levente

>
> Dave
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

David T. Lewis
When running on Cog, the original network support code is used. If the
new network support primitives are present, then the updated code is
used, which includes use of SocketAddress to represent socket addresses
rather than four byte ByteArray. There are some places where exceptions
are raised in the new support code associated with the use of SocketAddress.

I can't say if this is right or not, but raising an exception when
asking for the peerName of an uninitialized socket does not seem too
unreasonable.

Dave

On Tue, Aug 14, 2012 at 02:41:05PM +0200, Levente Uzonyi wrote:

> On Tue, 14 Aug 2012, David T. Lewis wrote:
>
> >This may be an issue in Socket class>>remoteSocketAddress that is
> >exposed when running with the new network support. The test attempts
> >to do "Socket new peerName" which does not work (but should it???).
>
> It works for me on windows and linux using Cog, thought the behavior is
> inconsistent. I get a string on windows and nil on linux.
> Btw #remoteSocketAddress is not used (and should not be used) when
> #peerName is sent if #useOldNetwork is true.
>
>
> Levente
>
> >
> >Dave
> >
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

Frank Shearar-3
On 14 August 2012 14:54, David T. Lewis <[hidden email]> wrote:
> When running on Cog, the original network support code is used. If the
> new network support primitives are present, then the updated code is
> used, which includes use of SocketAddress to represent socket addresses
> rather than four byte ByteArray. There are some places where exceptions
> are raised in the new support code associated with the use of SocketAddress.
>
> I can't say if this is right or not, but raising an exception when
> asking for the peerName of an uninitialized socket does not seem too
> unreasonable.

The test fails on my machine because in Socket >> #remoteSocketAddress
the size local variable is assigned -1. SocketAddress new: -1 then
fails. The -1 comes from the return value of self
primSocketRemoteAddressSize: socketHandle. (So clearly NetNameResolver
useOldNetwork returns false.)

frank

> Dave
>
> On Tue, Aug 14, 2012 at 02:41:05PM +0200, Levente Uzonyi wrote:
>> On Tue, 14 Aug 2012, David T. Lewis wrote:
>>
>> >This may be an issue in Socket class>>remoteSocketAddress that is
>> >exposed when running with the new network support. The test attempts
>> >to do "Socket new peerName" which does not work (but should it???).
>>
>> It works for me on windows and linux using Cog, thought the behavior is
>> inconsistent. I get a string on windows and nil on linux.
>> Btw #remoteSocketAddress is not used (and should not be used) when
>> #peerName is sent if #useOldNetwork is true.
>>
>>
>> Levente
>>
>> >
>> >Dave
>> >
>> >
>> >
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

Levente Uzonyi-2
On Tue, 14 Aug 2012, Frank Shearar wrote:

> On 14 August 2012 14:54, David T. Lewis <[hidden email]> wrote:
>> When running on Cog, the original network support code is used. If the
>> new network support primitives are present, then the updated code is
>> used, which includes use of SocketAddress to represent socket addresses
>> rather than four byte ByteArray. There are some places where exceptions
>> are raised in the new support code associated with the use of SocketAddress.
>>
>> I can't say if this is right or not, but raising an exception when
>> asking for the peerName of an uninitialized socket does not seem too
>> unreasonable.
>
> The test fails on my machine because in Socket >> #remoteSocketAddress
> the size local variable is assigned -1. SocketAddress new: -1 then
> fails. The -1 comes from the return value of self
> primSocketRemoteAddressSize: socketHandle. (So clearly NetNameResolver
> useOldNetwork returns false.)

It seems to be an incompatibility between old and new code, but it's okay.
I'll update the test soon.


Levente

>
> frank
>
>> Dave
>>
>> On Tue, Aug 14, 2012 at 02:41:05PM +0200, Levente Uzonyi wrote:
>>> On Tue, 14 Aug 2012, David T. Lewis wrote:
>>>
>>>> This may be an issue in Socket class>>remoteSocketAddress that is
>>>> exposed when running with the new network support. The test attempts
>>>> to do "Socket new peerName" which does not work (but should it???).
>>>
>>> It works for me on windows and linux using Cog, thought the behavior is
>>> inconsistent. I get a string on windows and nil on linux.
>>> Btw #remoteSocketAddress is not used (and should not be used) when
>>> #peerName is sent if #useOldNetwork is true.
>>>
>>>
>>> Levente
>>>
>>>>
>>>> Dave
>>>>
>>>>
>>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: NetworkTests-ul.32.mcz

David T. Lewis
In reply to this post by Frank Shearar-3
On Tue, Aug 14, 2012 at 10:46:59PM +0100, Frank Shearar wrote:

> On 14 August 2012 14:54, David T. Lewis <[hidden email]> wrote:
> > When running on Cog, the original network support code is used. If the
> > new network support primitives are present, then the updated code is
> > used, which includes use of SocketAddress to represent socket addresses
> > rather than four byte ByteArray. There are some places where exceptions
> > are raised in the new support code associated with the use of SocketAddress.
> >
> > I can't say if this is right or not, but raising an exception when
> > asking for the peerName of an uninitialized socket does not seem too
> > unreasonable.
>
> The test fails on my machine because in Socket >> #remoteSocketAddress
> the size local variable is assigned -1. SocketAddress new: -1 then
> fails. The -1 comes from the return value of self
> primSocketRemoteAddressSize: socketHandle. (So clearly NetNameResolver
> useOldNetwork returns false.)
>

Oops, I gave you bad information: Eliot added the IPV6 primitives to
Cog a couple of months ago, so all recently compiled VMs will now have
the new network primitives.

In any case you're right, it does not work. The implementation of
Socket>>remoteSocketAddress looks bogus to me. I'm not entirely sure
how it *should* work either ... this might take a bit of thought.

I posted a patch that makes the test pass.

Dave