[svk-devel] test t/06keyword.t fails

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Mon Aug 21 08:13:51 EDT 2006


I wrote:
> I'm trying to install SVK-1.08 from CPAN but it's failing:

But I didn't get any replies. This is the only mailing list I can find 
so I hope it's the right place to ask questions?

I've done some more investigation:

> t/06keyword..................ok 20/27
> #   Failed test in t/06keyword.t at line 99.
> t/06keyword..................NOK 21#          got: 'native
> # '
> #     expected: 'native
> # '
> t/06keyword..................ok 24/27Use of uninitialized value in 
> <HANDLE> at /root/.cpan/build/SVK-1.08/blib/lib/SVK/Command/Propset.pm 
> line 99.
> readline() on unopened filehandle at 
> /root/.cpan/build/SVK-1.08/blib/lib/SVK/Command/Propset.pm line 99.

The code in t/06keyword.t leading up to this looks like this:

mkdir ("$copath/le");
overwrite_file_raw ("$copath/le/dos", "dos$CR");
overwrite_file_raw ("$copath/le/unix", "unix$CR");
overwrite_file_raw ("$copath/le/mac", "mac$CRLF");
overwrite_file_raw ("$copath/le/native", "native$Native");
overwrite_file_raw ("$copath/le/na", "na$CR");
overwrite_file_raw ("$copath/le/mixed", "mixed$CRLF...endings$CR...");
$svk->add ("$copath/le");
$svk->ps ('svn:eol-style', 'CRLF', "$copath/le/dos");
$svk->ps ('svn:eol-style', 'native', "$copath/le/native");
$svk->ps ('svn:eol-style', 'LF', "$copath/le/unix");
$svk->ps ('svn:eol-style', 'CR', "$copath/le/mac");
$svk->ps ('svn:eol-style', 'NA', "$copath/le/na");
$svk->commit ('-m', 'test line ending', $copath);

is_file_content_raw ("$copath/le/na", "na$CR");
SKIP: {
# we don't update eolstyle=native files on lf-platforms,
# or eolstyle=crlf files on crlf-platforms.
# this should be done with checkout_delta/commit harvesting
# the translated md5 to decide if they should be updated.
skip 'fix inconsistent eol-style after commit', 3;

is_file_content_raw ("$copath/le/dos", "dos$CRLF");
is_file_content_raw ("$copath/le/unix", "unix$LF");
is_file_content_raw ("$copath/le/mac", "mac$CR");
}

is_file_content_raw ("$copath/le/native", "native$Native");

$svk->ps ('svn:eol-style', 'CRLF', "$copath/le/native");
$svk->commit ('-m', 'test line ending', $copath);
is_file_content_raw ("$copath/le/native", "native$CRLF");


The contents of the file 't/checkout/keyword/le/native' is:

   0000000   n   a   t   i   v   e  \n
   0000007

and that doesn't change at all. I guess the test expects that it will?

I'm a complete novice with both SVK and Subversion so I have no idea 
what the expected behaviour is or what might be going wrong. I'd 
appreciate any pointers.


> #   Failed test 'st t/checkout/keyword'
> #   in t/06keyword.t at line 130.
> t/06keyword..................NOK 25#     Structures begin differing at:
> #          $got->[0] = Does not exist
> #     $expected->[0] = 'M   t/checkout/keyword/le/mixed2'


The test code leading up to this, following on from the previous code, is:

is_output ($svk, 'ps', ['svn:eol-style', 'native', "$copath/le/mixed"],
            [__"File $copath/le/mixed has inconsistent newlines."]);
overwrite_file_raw ("$copath/le/mixed", '');
is_output ($svk, 'ps', ['svn:eol-style', 'native', "$copath/le/mixed"],
            [__" M  $copath/le/mixed"]);
overwrite_file_raw ("$copath/le/mixed", "mixed$CRLF...endings$CR...");

$svk->commit ('-m', 'test line ending', $copath);
SKIP: {
skip 'fix inconsistent eol-style after commit', 1;
is_file_content_raw ("$copath/le/mixed", 
"mixed$Native...endings$Native...");
}

overwrite_file_raw ("$copath/le/mixed2", '');
$svk->add ("$copath/le");
$svk->ci (-m => 'some mixed le in repository', $copath );
$svk->cp (-m => 'tmp', '//le' => '//le2');
overwrite_file_raw ("$copath/le/mixed2", "mixed$CRLF...endings$CR...");
$svk->ci (-m => 'some mixed le in repository', $copath );
$svk->up ($copath);
$svk->ps ('svn:eol-style', 'native', "$copath/le2/mixed2");


# There's a warning here when I single-step in the debugger:
#
# Use of uninitialized value in <HANDLE> at
# /root/.cpan/build/SVK-1.08/lib/SVK/Command/Propset.pm line 99.


$svk->ci (-m => 'some mixed le in repository', $copath );

$svk->sm (-m => 'move eol prop around', -f => '//le2');

$svk->up ($copath);
# XXX: need to do rmcache here to make the file properly modified
$svk->admin ('rmcache');
is_output ($svk, 'st', [$copath],
            [__"M   $copath/le/mixed2"]);


This is where the test failure occurs. At this point, calling 
$svk->st($copath) returns 0. I don't know what that means ($svk is a 
SVK; the POD says it defers method calls to SVK::Command->invoke; 
SVK::Command in turn mentions SVK::XD but I haven't managed to find any 
of these methods described yet). The files (mixed etc) are unchanged.


> #   Failed test 'st t/checkout/keyword'
> #   in t/06keyword.t at line 137.
> t/06keyword..................NOK 26#     Structures begin differing at:
> #          $got->[0] = Does not exist
> #     $expected->[0] = 'M   t/checkout/keyword/le/mixed2'

The test code up to this failure continues:


rmtree [$copath];

$svk->checkout ('//', $copath);

# After this checkout 'mixed' contains:
#
# 0000000   m   i   x   e   d  \n   .   .   .   e   n   d   i   n   g   s
# 0000020  \n   .   .   .


$svk->admin ('rmcache');
is_output ($svk, 'st', [$copath],
            [__"M   $copath/le/mixed2"]);


Again, $svk->st($copath) returns 0. As for the previous failure, I have 
no clue what should be happening or what is wrong.

Any help would be very welcome,
Thanks and regards,
Dave

> t/06keyword..................ok 27/27# Looks like you failed 3 tests of 27.
> t/06keyword..................dubious
>         Test returned status 3 (wstat 768, 0x300)
> DIED. FAILED tests 21, 25-26
>         Failed 3/27 tests, 88.89% okay (less 4 skipped tests: 20 okay, 
> 74.07%)
> 
> 
> There seems to be some problem with the non-native line ending tests. I 
> haven't found anything about this problem, except that somebody had it 
> on a Mac as well.  Does anybody know what's wrong?
> I'm on SUSE 9.3. The output of perl -V is below.
> 
> Thanks for any ideas,
> Dave
> 
> 
> Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
>   Platform:
>     osname=linux, osvers=2.6.9, archname=i586-linux-thread-multi
>     uname='linux g226 2.6.9 #1 smp tue jun 28 14:58:56 utc 2005 i686 
> i686 i386 gnulinux '
>     config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr 
> -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm 
> -Duseshrplib=true -Doptimize=-O2 -march=i586 -mcpu=i686 
> -fmessage-length=0 -Wall -g -Wall -pipe'
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=define use5005threads=undef useithreads=define 
> usemultiplicity=define
>     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>     use64bitint=undef use64bitall=undef uselongdouble=undef
>     usemymalloc=n, bincompat5005=undef
>   Compiler:
>     cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
> -DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64',
>     optimize='-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g 
> -Wall -pipe',
>     cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
> -fno-strict-aliasing -pipe'
>     ccversion='', gccversion='3.3.5 20050117 (prerelease) (SUSE Linux)', 
> gccosandvers=''
>     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
>     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
> lseeksize=8
>     alignbytes=4, prototype=define
>   Linker and Libraries:
>     ld='cc', ldflags =''
>     libpth=/lib /usr/lib /usr/local/lib
>     libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
>     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
>     libc=, so=so, useshrplib=true, libperl=libperl.so
>     gnulibc_version='2.3.4'
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
> -Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE'
>     cccdlflags='-fPIC', lddlflags='-shared'
> 
> 
> Characteristics of this binary (from libperl):
>   Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS 
> USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
>   Locally applied patches:
>         SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962
>   Built under linux
>   Compiled at Dec 17 2005 03:23:29
>   %ENV:
>     PERL5LIB="/home/dhoworth/progs/modules"
>     PERLDOC_PAGER="vi"
>   @INC:
>     /home/dhoworth/progs/modules
>     /usr/lib/perl5/5.8.6/i586-linux-thread-multi
>     /usr/lib/perl5/5.8.6
>     /usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi
>     /usr/lib/perl5/site_perl/5.8.6
>     /usr/lib/perl5/site_perl
>     /usr/lib/perl5/vendor_perl/5.8.6/i586-linux-thread-multi
>     /usr/lib/perl5/vendor_perl/5.8.6
>     /usr/lib/perl5/vendor_perl
>     .
> _______________________________________________
> svk-devel mailing list
> svk-devel at bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-devel
> 
> 



More information about the svk-devel mailing list