Thread: msvc failure in largeobject regression test

msvc failure in largeobject regression test

From
Magnus Hagander
Date:
Hi!

I get failures for the largeobject regression tests on my vc++ build. I
don't think this has ever worked, given that those tests are fairly new.
Any quick ideas on what's wrong before I dig deeper?

//Magnus

*** ./expected/largeobject.out    Tue Jan 23 14:55:25 2007
--- ./results/largeobject.out    Tue Jan 23 14:56:17 2007
***************
*** 140,147 **** -- large object SELECT loread(fd, 36) FROM lotest_stash_values;                              loread
                         
 
! -----------------------------------------------------------------
!  AAA\011FBAAAA\011VVVVxx\0122513\01132\0111\0111\0113\01113\0111 (1 row)  SELECT lo_tell(fd) FROM
lotest_stash_values;
--- 140,147 ---- -- large object SELECT loread(fd, 36) FROM lotest_stash_values;                             loread
                      
 
! --------------------------------------------------------------
!  44\011144\0111144\0114144\0119144\01188\01189\011SNAAAA\011F (1 row)  SELECT lo_tell(fd) FROM lotest_stash_values;
***************
*** 170,177 ****  SELECT loread(fd, 36) FROM lotest_stash_values;                        loread

! -----------------------------------------------------
!  AAA\011FBAAAAabcdefghijklmnop1\0111\0113\01113\0111 (1 row)  SELECT lo_close(fd) FROM lotest_stash_values;
--- 170,177 ----  SELECT loread(fd, 36) FROM lotest_stash_values;                       loread                      
! --------------------------------------------------
!  44\011144\011114abcdefghijklmnop9\011SNAAAA\011F (1 row)  SELECT lo_close(fd) FROM lotest_stash_values;


Re: msvc failure in largeobject regression test

From
Stefan Kaltenbrunner
Date:
Magnus Hagander wrote:
> Hi!
> 
> I get failures for the largeobject regression tests on my vc++ build. I
> don't think this has ever worked, given that those tests are fairly new.
> Any quick ideas on what's wrong before I dig deeper?

FWIW: emu managed to trigger a largeobject related failure too (though 
it looks different then yours):

http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=emu&dt=2007-01-22%2023:35:03

Stefan


Re: msvc failure in largeobject regression test

From
Andrew Dunstan
Date:
Magnus Hagander wrote:
> Hi!
>
> I get failures for the largeobject regression tests on my vc++ build. I
> don't think this has ever worked, given that those tests are fairly new.
> Any quick ideas on what's wrong before I dig deeper?
>
>   
[snip]

I wonder if this is a line-end issue? Assuming you are working from CVS, 
does your client turn \n into \r\n ? I see that other windows boxes are 
happily passing this test on the buildfarm, and of course the mingw cvs 
doesn't adjust line endings.

cheers

andrew


Re: msvc failure in largeobject regression test

From
Magnus Hagander
Date:
On Tue, Jan 23, 2007 at 09:31:40AM -0500, Andrew Dunstan wrote:
> Magnus Hagander wrote:
> >Hi!
> >
> >I get failures for the largeobject regression tests on my vc++ build. I
> >don't think this has ever worked, given that those tests are fairly new.
> >Any quick ideas on what's wrong before I dig deeper?
> >
> >  
> [snip]
> 
> I wonder if this is a line-end issue? Assuming you are working from CVS, 
> does your client turn \n into \r\n ? I see that other windows boxes are 
> happily passing this test on the buildfarm, and of course the mingw cvs 
> doesn't adjust line endings.

Bingo!

That's it. I copeid the file in binary mode from a linux box and now it
passes.

//Magnus


Re: msvc failure in largeobject regression test

From
Jeremy Drake
Date:
On Tue, 23 Jan 2007, Magnus Hagander wrote:

> On Tue, Jan 23, 2007 at 09:31:40AM -0500, Andrew Dunstan wrote:
> > Magnus Hagander wrote:
> > >Hi!
> > >
> > >I get failures for the largeobject regression tests on my vc++ build. I
> > >don't think this has ever worked, given that those tests are fairly new.
> > >Any quick ideas on what's wrong before I dig deeper?
> > >
> > >
> > [snip]
> >
> > I wonder if this is a line-end issue? Assuming you are working from CVS,
> > does your client turn \n into \r\n ? I see that other windows boxes are
> > happily passing this test on the buildfarm, and of course the mingw cvs
> > doesn't adjust line endings.
>
> Bingo!
>
> That's it. I copeid the file in binary mode from a linux box and now it
> passes.

I thought about that when I wrote it, and thus tried it under mingw and
cygwin without issue ;)  I don't think the regression tests were in a
position of running on the msvc build at the time...  My thought for what
to do if this did run into a problem would be an alternate output file
that is also acceptable (I don't know what they're called but other tests
have them IIRC).



-- 
Fifth Law of Procrastination:Procrastination avoids boredom; one never has the feeling that
there is nothing important to do.


Re: msvc failure in largeobject regression test

From
Magnus Hagander
Date:
On Tue, Jan 23, 2007 at 11:39:23AM -0800, Jeremy Drake wrote:
> On Tue, 23 Jan 2007, Magnus Hagander wrote:
> 
> > On Tue, Jan 23, 2007 at 09:31:40AM -0500, Andrew Dunstan wrote:
> > > Magnus Hagander wrote:
> > > >Hi!
> > > >
> > > >I get failures for the largeobject regression tests on my vc++ build. I
> > > >don't think this has ever worked, given that those tests are fairly new.
> > > >Any quick ideas on what's wrong before I dig deeper?
> > > >
> > > >
> > > [snip]
> > >
> > > I wonder if this is a line-end issue? Assuming you are working from CVS,
> > > does your client turn \n into \r\n ? I see that other windows boxes are
> > > happily passing this test on the buildfarm, and of course the mingw cvs
> > > doesn't adjust line endings.
> >
> > Bingo!
> >
> > That's it. I copeid the file in binary mode from a linux box and now it
> > passes.
> 
> I thought about that when I wrote it, and thus tried it under mingw and
> cygwin without issue ;)  I don't think the regression tests were in a
> position of running on the msvc build at the time...  My thought for what
> to do if this did run into a problem would be an alternate output file
> that is also acceptable (I don't know what they're called but other tests
> have them IIRC).

Either that, or we require a checkout using Unix style linefeeds. I've
confirmed that removing the file and checking it back out with "cvs --lf
update tenk.data" works - tests pass fine.

Yet another option might be to flag that file as binary in cvs, in which
case I think cvsnt shouldn't go mess with it.

//Magnus


Re: msvc failure in largeobject regression test

From
Bruce Momjian
Date:
Was this problem addressed?

---------------------------------------------------------------------------

Magnus Hagander wrote:
> On Tue, Jan 23, 2007 at 11:39:23AM -0800, Jeremy Drake wrote:
> > On Tue, 23 Jan 2007, Magnus Hagander wrote:
> > 
> > > On Tue, Jan 23, 2007 at 09:31:40AM -0500, Andrew Dunstan wrote:
> > > > Magnus Hagander wrote:
> > > > >Hi!
> > > > >
> > > > >I get failures for the largeobject regression tests on my vc++ build. I
> > > > >don't think this has ever worked, given that those tests are fairly new.
> > > > >Any quick ideas on what's wrong before I dig deeper?
> > > > >
> > > > >
> > > > [snip]
> > > >
> > > > I wonder if this is a line-end issue? Assuming you are working from CVS,
> > > > does your client turn \n into \r\n ? I see that other windows boxes are
> > > > happily passing this test on the buildfarm, and of course the mingw cvs
> > > > doesn't adjust line endings.
> > >
> > > Bingo!
> > >
> > > That's it. I copeid the file in binary mode from a linux box and now it
> > > passes.
> > 
> > I thought about that when I wrote it, and thus tried it under mingw and
> > cygwin without issue ;)  I don't think the regression tests were in a
> > position of running on the msvc build at the time...  My thought for what
> > to do if this did run into a problem would be an alternate output file
> > that is also acceptable (I don't know what they're called but other tests
> > have them IIRC).
> 
> Either that, or we require a checkout using Unix style linefeeds. I've
> confirmed that removing the file and checking it back out with "cvs --lf
> update tenk.data" works - tests pass fine.
> 
> Yet another option might be to flag that file as binary in cvs, in which
> case I think cvsnt shouldn't go mess with it.
> 
> //Magnus
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: msvc failure in largeobject regression test

From
Magnus Hagander
Date:
No.

I think one option is "fix it in the cvs client". There
are options there to do it if you use cvsnt.

FWIW, if I built off the snapshot tarballs things work, since they have
unix linefeeds.

//Magnus

On Tue, Feb 20, 2007 at 05:11:41PM -0500, Bruce Momjian wrote:
> 
> Was this problem addressed?
> 
> ---------------------------------------------------------------------------
> 
> Magnus Hagander wrote:
> > On Tue, Jan 23, 2007 at 11:39:23AM -0800, Jeremy Drake wrote:
> > > On Tue, 23 Jan 2007, Magnus Hagander wrote:
> > > 
> > > > On Tue, Jan 23, 2007 at 09:31:40AM -0500, Andrew Dunstan wrote:
> > > > > Magnus Hagander wrote:
> > > > > >Hi!
> > > > > >
> > > > > >I get failures for the largeobject regression tests on my vc++ build. I
> > > > > >don't think this has ever worked, given that those tests are fairly new.
> > > > > >Any quick ideas on what's wrong before I dig deeper?
> > > > > >
> > > > > >
> > > > > [snip]
> > > > >
> > > > > I wonder if this is a line-end issue? Assuming you are working from CVS,
> > > > > does your client turn \n into \r\n ? I see that other windows boxes are
> > > > > happily passing this test on the buildfarm, and of course the mingw cvs
> > > > > doesn't adjust line endings.
> > > >
> > > > Bingo!
> > > >
> > > > That's it. I copeid the file in binary mode from a linux box and now it
> > > > passes.
> > > 
> > > I thought about that when I wrote it, and thus tried it under mingw and
> > > cygwin without issue ;)  I don't think the regression tests were in a
> > > position of running on the msvc build at the time...  My thought for what
> > > to do if this did run into a problem would be an alternate output file
> > > that is also acceptable (I don't know what they're called but other tests
> > > have them IIRC).
> > 
> > Either that, or we require a checkout using Unix style linefeeds. I've
> > confirmed that removing the file and checking it back out with "cvs --lf
> > update tenk.data" works - tests pass fine.
> > 
> > Yet another option might be to flag that file as binary in cvs, in which
> > case I think cvsnt shouldn't go mess with it.
> > 
> > //Magnus
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> >        subscribe-nomail command to majordomo@postgresql.org so that your
> >        message can get through to the mailing list cleanly
> 
> -- 
>   Bruce Momjian  <bruce@momjian.us>          http://momjian.us
>   EnterpriseDB                               http://www.enterprisedb.com
> 
>   + If your life is a hard drive, Christ can be your backup. +


Re: msvc failure in largeobject regression test

From
Andrew Dunstan
Date:
Magnus Hagander wrote:
> On Tue, Jan 23, 2007 at 11:39:23AM -0800, Jeremy Drake wrote:
>   
>> On Tue, 23 Jan 2007, Magnus Hagander wrote:
>>
>>     
>>> On Tue, Jan 23, 2007 at 09:31:40AM -0500, Andrew Dunstan wrote:
>>>       
>>>> Magnus Hagander wrote:
>>>>         
>>>>> Hi!
>>>>>
>>>>> I get failures for the largeobject regression tests on my vc++ build. I
>>>>> don't think this has ever worked, given that those tests are fairly new.
>>>>> Any quick ideas on what's wrong before I dig deeper?
>>>>>
>>>>>
>>>>>           
>>>> [snip]
>>>>
>>>> I wonder if this is a line-end issue? Assuming you are working from CVS,
>>>> does your client turn \n into \r\n ? I see that other windows boxes are
>>>> happily passing this test on the buildfarm, and of course the mingw cvs
>>>> doesn't adjust line endings.
>>>>         
>>> Bingo!
>>>
>>> That's it. I copeid the file in binary mode from a linux box and now it
>>> passes.
>>>       
>> I thought about that when I wrote it, and thus tried it under mingw and
>> cygwin without issue ;)  I don't think the regression tests were in a
>> position of running on the msvc build at the time...  My thought for what
>> to do if this did run into a problem would be an alternate output file
>> that is also acceptable (I don't know what they're called but other tests
>> have them IIRC).
>>     
> Either that, or we require a checkout using Unix style linefeeds. I've
> confirmed that removing the file and checking it back out with "cvs --lf
> update tenk.data" works - tests pass fine.
>
> Yet another option might be to flag that file as binary in cvs, in which
> case I think cvsnt shouldn't go mess with it.
>
>
>   

I have just run into this today while trying to get buildfarm working 
for MSVC. After some consideration I think an alternative result file is 
the best solution. I have looked at switches for cnsnt, but they are 
likely to be fragile at best.

cheers

andrew



Re: msvc failure in largeobject regression test

From
Tom Lane
Date:
Andrew Dunstan <andrew@dunslane.net> writes:
> Magnus Hagander wrote:
> I wonder if this is a line-end issue? Assuming you are working from CVS,
> does your client turn \n into \r\n ?

> I have just run into this today while trying to get buildfarm working 
> for MSVC. After some consideration I think an alternative result file is 
> the best solution. I have looked at switches for cnsnt, but they are 
> likely to be fragile at best.

Are you proposing an alternate result file that has a different linefeed
style?  I would really really rather that we not go there, because it
will be impossibly fragile to maintain.  Or are you willing to accept
that the Windows builds will break every time someone changes that
regression test, until someone else with a Windows machine fixes the
result file?

I would find it preferable to make pg_regress compensate for this
issue somehow ...
        regards, tom lane


Re: msvc failure in largeobject regression test

From
Andrew Dunstan
Date:
Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> Magnus Hagander wrote:
>> I wonder if this is a line-end issue? Assuming you are working from CVS,
>> does your client turn \n into \r\n ?
>>     
>
>   
>> I have just run into this today while trying to get buildfarm working 
>> for MSVC. After some consideration I think an alternative result file is 
>> the best solution. I have looked at switches for cnsnt, but they are 
>> likely to be fragile at best.
>>     
>
> Are you proposing an alternate result file that has a different linefeed
> style?  I would really really rather that we not go there, because it
> will be impossibly fragile to maintain.  Or are you willing to accept
> that the Windows builds will break every time someone changes that
> regression test, until someone else with a Windows machine fixes the
> result file?
>
> I would find it preferable to make pg_regress compensate for this
> issue somehow ...
>
>   
No, the alternate results file does not use different line feeds, and is 
as you would wish not sensitive to line-end style. I was careful (I hope 
careful enough) to make sure that the file I checked in didn't have a 
single CR in it. It just reflects the results obtained when tenk.data 
file is checked out with CRLF line endings and then used for LO input. 
The alternative as you say is that we make pg_regress perform some sort 
of dos2unix on the data file. I note that tenk.data hasn't changed in 4 
years.

cheers

andrew