develooper Front page | perl.perl5.porters | Postings from August 2001

Re: Report /pro/3gl/CPAN/perl-current@11726

Thread Previous | Thread Next
From:
H . Merijn Brand
Date:
August 28, 2001 09:31
Subject:
Re: Report /pro/3gl/CPAN/perl-current@11726
Message ID:
20010828182407.DF02.H.M.BRAND@hccnet.nl
On Tue 28 Aug 2001 17:38, "Paul Marquess" <Paul_Marquess@Yahoo.co.uk> wrote:
> > -Dusedevel -Duseperlio -Dusemorebits -Dusethreads -Duseithreads), I get
> >
> > i2:/pro/3gl/CPAN/perl-current/t 160 > ./perl harness
> > ../ext/DB_File/t/db-btree.t
> > ../ext/DB_File/t/db-btree....FAILED tests 79, 82, 85, 150-153
> >         Failed 7/157 tests, 95.54% okay
> > Failed Test                 Stat Wstat Total Fail  Failed  List of Failed
> > ------------------------------------------------------------------
> > -------------
> > ../ext/DB_File/t/db-btree.t              157    7   4.46%  79 82
> > 85 150-153
> > Failed 1/1 test scripts, 0.00% okay. 7/157 subtests failed, 95.54% okay.
> > i2:/pro/3gl/CPAN/perl-current/t 161 >
> >
> > running as plain './perl ../ext/etc... didn't produce any more
> > useful info.
> 
> Aha! There is a distinct pattern to those failures. All are involved in
> testing the Berkeley DB feature where you can have duplicate keys.
> 
> > > Oh yea, what version of Berkeley DB is running on the AIX box.
> > There are a
> > > few versions of Berkeley DB kicking about that have problems. Here is a
> > > one-liner that should tell you.
> > >
> > >     perl -e 'use DB_File; print "Berkeley DB ver $DB_File::db_ver\n"'
> >
> > Berkeley DB ver 3.002009
> >
> > I know 3.3.11 is available (maybe even newer), but I have not
> > found time to
> > install yet.
> 
> I'm not aware of any problems with 3.2.9, but you never know.
> 
> Could you try running this script on one of the failing AIX configurations
> please?
> 
> use strict ;
> use DB_File ;
> 
> sub Put
> {
>     my $obj = shift ;
>     my $key = shift ;
>     my $value = shift ;
> 
>     my $status = $obj->put($key, $value) ;
>     print "Put [$key] [$value], status [$status]\n" ;
> }
> 
> my $dup = R_DUP ;
> 
> print <<EOM ;
> This is Perl        $]
> Running DB_File     $DB_File::VERSION
> Running Berkeley DB $DB_File::db_ver
> R_DUP               $dup
> 
> EOM
> 
> my $filename = "tree.$$" ;
> my %h ;
> unlink $filename ;
> 
> # Enable duplicate records
> $DB_BTREE->{'flags'} = R_DUP ;
> 
> my $H = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0640, $DB_BTREE
>     or die "Cannot open $filename: $!\n";
> 
> # Add some key/value pairs to the file
> Put($H, 'Wall', 'Larry') ;
> Put($H, 'Wall', 'Brick') ;
> Put($H, 'Wall', 'Brick') ;
> Put($H, 'Smith', 'John') ;
> Put($H, 'mouse', 'mickey') ;
> 
> my $key  = 0 ;
> my $value = 0 ;
> my $status ;
> for ($status = $H->seq($key, $value, R_FIRST) ;
>      $status == 0 ;
>      $status = $H->seq($key, $value, R_NEXT) )
>   {  print "$key    -> $value\n" }
> 
> print "Done - status = [$status]\n" ;
> 
> 
> untie %h ;

i2:/pro/3gl/CPAN/perl-current 110 > ./perl -Ilib /tmp/dbm.pl
This is Perl        5.007002
Running DB_File     1.78
Running Berkeley DB 3.002009
R_DUP               1

Put [Wall] [Larry], status [0]
Put [Wall] [Brick], status [0]
Put [Wall] [Brick], status [0]
Put [Smith] [John], status [0]
Put [mouse] [mickey], status [0]
Smith    -> John
Wall    -> Brick
mouse    -> mickey
Done - status = [1]
i2:/pro/3gl/CPAN/perl-current 111 >

-- 
H.Merijn Brand    Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 628 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
  WinNT 4, Win2K pro & WinCE 2.11.  Smoking perl CORE: smokers@perl.org
http://archives.develooper.com/daily-build@perl.org/   perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About