[Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

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

[Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

Hannes Hirzel
Hello,

Any ideas how to fix the cause for the following test to fail

--Hannes

==============================================================

testPositionPastEndIsAtEnd
        "Tests that a file positioned after its end responds true to #atEnd"

        | filename file |
        filename := 'filestream.tst'.
        file := StandardFileStream forceNewFileNamed: filename.
        [
                file position: 1000.
                self assert: file atEnd.
        ] ensure:[
                file close.
                FileDirectory default deleteFileNamed: filename ifAbsent:[].
        ].

Reply | Threaded
Open this post in threaded view
|

Re: [Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

Levente Uzonyi-2
On Wed, 3 Nov 2010, Hannes Hirzel wrote:

> Hello,
>
> Any ideas how to fix the cause for the following test to fail

Add the fix from SqueakVM to CogVM.


Levente

>
> --Hannes
>
> ==============================================================
>
> testPositionPastEndIsAtEnd
> "Tests that a file positioned after its end responds true to #atEnd"
>
> | filename file |
> filename := 'filestream.tst'.
> file := StandardFileStream forceNewFileNamed: filename.
> [
> file position: 1000.
> self assert: file atEnd.
> ] ensure:[
> file close.
> FileDirectory default deleteFileNamed: filename ifAbsent:[].
> ].
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

Hannes Hirzel
Fine, which fix (reference to Squeak list mail, or Mantis entry)?

--Hannes

On 11/3/10, Levente Uzonyi <[hidden email]> wrote:

> On Wed, 3 Nov 2010, Hannes Hirzel wrote:
>
>> Hello,
>>
>> Any ideas how to fix the cause for the following test to fail
>
> Add the fix from SqueakVM to CogVM.
>
>
> Levente
>
>>
>> --Hannes
>>
>> ==============================================================
>>
>> testPositionPastEndIsAtEnd
>> "Tests that a file positioned after its end responds true to #atEnd"
>>
>> | filename file |
>> filename := 'filestream.tst'.
>> file := StandardFileStream forceNewFileNamed: filename.
>> [
>> file position: 1000.
>> self assert: file atEnd.
>> ] ensure:[
>> file close.
>> FileDirectory default deleteFileNamed: filename ifAbsent:[].
>> ].
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

Levente Uzonyi-2
On Wed, 3 Nov 2010, Hannes Hirzel wrote:

> Fine, which fix (reference to Squeak list mail, or Mantis entry)?

I couldn't find the thread with the discussion, but here is the commit
mail:

http://lists.squeakfoundation.org/pipermail/vm-dev/2010-April/004187.html


Levente

>
> --Hannes
>
> On 11/3/10, Levente Uzonyi <[hidden email]> wrote:
>> On Wed, 3 Nov 2010, Hannes Hirzel wrote:
>>
>>> Hello,
>>>
>>> Any ideas how to fix the cause for the following test to fail
>>
>> Add the fix from SqueakVM to CogVM.
>>
>>
>> Levente
>>
>>>
>>> --Hannes
>>>
>>> ==============================================================
>>>
>>> testPositionPastEndIsAtEnd
>>> "Tests that a file positioned after its end responds true to #atEnd"
>>>
>>> | filename file |
>>> filename := 'filestream.tst'.
>>> file := StandardFileStream forceNewFileNamed: filename.
>>> [
>>> file position: 1000.
>>> self assert: file atEnd.
>>> ] ensure:[
>>> file close.
>>> FileDirectory default deleteFileNamed: filename ifAbsent:[].
>>> ].
>>>
>>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

Eliot Miranda-2
In reply to this post by Levente Uzonyi-2


On Wed, Nov 3, 2010 at 6:43 AM, Levente Uzonyi <[hidden email]> wrote:
On Wed, 3 Nov 2010, Hannes Hirzel wrote:

Hello,

Any ideas how to fix the cause for the following test to fail

Add the fix from SqueakVM to CogVM.

done.  will try and build a new vm soon.
 


Levente



--Hannes

==============================================================

testPositionPastEndIsAtEnd
       "Tests that a file positioned after its end responds true to #atEnd"

       | filename file |
       filename := 'filestream.tst'.
       file := StandardFileStream forceNewFileNamed: filename.
       [
               file position: 1000.
               self assert: file atEnd.
       ] ensure:[
               file close.
               FileDirectory default deleteFileNamed: filename ifAbsent:[].
       ].






Reply | Threaded
Open this post in threaded view
|

Re: [Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

Levente Uzonyi-2
On Wed, 3 Nov 2010, Eliot Miranda wrote:

> On Wed, Nov 3, 2010 at 6:43 AM, Levente Uzonyi <[hidden email]> wrote:
>
>> On Wed, 3 Nov 2010, Hannes Hirzel wrote:
>>
>>  Hello,
>>>
>>> Any ideas how to fix the cause for the following test to fail
>>>
>>
>> Add the fix from SqueakVM to CogVM.
>>
>
> done.  will try and build a new vm soon.

There's another change about large allocations which also has a failing
test in the image with Cog. Andreas fixed IIRC between January and April
this year, though I can't find the commit message.


Levente

>
>
>>
>>
>> Levente
>>
>>
>>
>>> --Hannes
>>>
>>> ==============================================================
>>>
>>> testPositionPastEndIsAtEnd
>>>        "Tests that a file positioned after its end responds true to
>>> #atEnd"
>>>
>>>        | filename file |
>>>        filename := 'filestream.tst'.
>>>        file := StandardFileStream forceNewFileNamed: filename.
>>>        [
>>>                file position: 1000.
>>>                self assert: file atEnd.
>>>        ] ensure:[
>>>                file close.
>>>                FileDirectory default deleteFileNamed: filename
>>> ifAbsent:[].
>>>        ].
>>>
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Test failure] FileStreamTest>>testPositionPastEndIsAtEnd

Eliot Miranda-2


On Wed, Nov 3, 2010 at 11:24 AM, Levente Uzonyi <[hidden email]> wrote:
On Wed, 3 Nov 2010, Eliot Miranda wrote:

On Wed, Nov 3, 2010 at 6:43 AM, Levente Uzonyi <[hidden email]> wrote:

On Wed, 3 Nov 2010, Hannes Hirzel wrote:

 Hello,

Any ideas how to fix the cause for the following test to fail


Add the fix from SqueakVM to CogVM.


done.  will try and build a new vm soon.

There's another change about large allocations which also has a failing test in the image with Cog. Andreas fixed IIRC between January and April this year, though I can't find the commit message.

Well I'm not happy with the fix since the new code is overly complex (and hence slow).  I still need to write a fix I'm happy with here.

cheers
Eliot

 


Levente






Levente



--Hannes

==============================================================

testPositionPastEndIsAtEnd
      "Tests that a file positioned after its end responds true to
#atEnd"

      | filename file |
      filename := 'filestream.tst'.
      file := StandardFileStream forceNewFileNamed: filename.
      [
              file position: 1000.
              self assert: file atEnd.
      ] ensure:[
              file close.
              FileDirectory default deleteFileNamed: filename
ifAbsent:[].
      ].