Re: Some VMS errors in DBI trunk

"Martin J. Evans" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
  On 10/09/2010 14:29, Martin J. Evans wrote:
> On 09/09/10 15:18, Martin J. Evans wrote:
>> I ran DBI trunk on VMS (perl, v5.8.1 built for VMS_AXP) just to check it out. There were a lot of failures. I'm pushed for time right now so I've not yet had any time to properly investigate them. I've listed a few here (but not complete). If anyone has any insight into them I can try stuff out.
>>
>> v20 $ perl -I[.blib.lib] -I[.blib.arch] [.t]10examp.t
>> 1..210
>> ok 1 - connect should fail
>> ok 2 - ... we should have an exception here
>> ok 3 - ... $dbh2 should not be defined
>> ok 4
>> ok 5
>> ok 6 - ... these 2 handles are cached, so they are the same
>> ok 7
>> ok 8 - ... this handle was created with different parameters, so it is not the s
>> ame
>> ok 9
>> ok 10 - Executed should be true
>> ok 11
>> ok 12 - should return same handle
>> ok 13 - Executed should be false because reset by connect attributes
>> ok 14 - The object isa DBI::dr
>> ok 15 - ... these are our cached kids
>> ok 16 - ... we have emptied out cache
>> ok 17
>> ok 18 - ... PrintError should be 0
>> ok 19 - ... FetchHashKey is NAME
>> ok 20 - ... checking the example driver_path
>> others
>> ok 21 - DBI commit: invalid number of arguments: got handle + 1, expected handle
>>   + between 0 and 0
>> # Usage: $h->commit() at [.t]10examp.t line 88.
>> #
>> ok 22 - ping should return true
>> ok 23 - prepare should fail
>> ok 24 - sth->err should be true
>> ok 25 - DBI::err should be true
>> ok 26 - $DBI::err should match $dbh->err
>> ok 27 - $DBI::errstr should contain error string
>> ok 28 - $DBI::errstr should match $dbh->errstr
>> ok 29
>> ok 30
>> ok 31
>> ok 32
>> ok 33 - DBI::db=HASH(0x6228e4) ne DBI::db=HASH(0x6228e4)
>> ok 34
>> ok 35
>> ok 36
>> ok 37
>> ok 38
>> ok 39
>> ok 40
>> ok 41
>> ok 42
>> ok 43
>> ok 44
>> ok 45
>> ok 46
>> ok 47
>> not ok 48
>> #   Failed test at [.t]10examp.t line 159.
>> ok 49
>> ok 50
>> ok 51
>> ok 52
>> ok 53 - errstr should contain error message
>> ok 54
>> ok 55 - errstr should contain error message
>> ok 56
>> ok 57
>> ok 58 - errstr should contain error message
>> ok 59
>> ok 60 - errstr should contain error message
>> ok 61
>> ok 62
>> Can't use an undefined value as an ARRAY reference at [.t]10examp.t line 179.
>> # Looks like you planned 210 tests but ran 62.
>> # Looks like you failed 1 test of 62 run.
>> # Looks like your test exited with 512 just after 62.
>> %SYSTEM-F-ABORT, abort
>>
>>
>>
>>
>> v20 $ perl -I[.blib.lib] -I[.blib.arch] [.t]19fhtrace.t
>> 1..27
>> ok 1 - use DBI;
>> Can't set DBI::db=HASH(0x38c68c)->{PrintWarn}: unrecognised attribute or invalid
>>   value at /perl_root/lib/site_perl/DBD/ExampleP.pm line 230.
>> # Looks like you planned 27 tests but ran 1.
>> # Looks like your test exited with 1024 just after 1.
>> %SYSTEM-F-ABORT, abort
> This one was down to the fact that those -Is on the command line are not working.
> It works when I set PERL5LIB instead.
>
>> v20 $ perl -I[.blib.lib] -I[.blib.arch] [.t]42prof_data.t
>> 1..31
>> ok 1 - use DBI::ProfileDumper;
>> ok 2 - use DBI::ProfileData;
>> Odd number of elements in anonymous hash at /perl_root/lib/site_perl/DBI/Profile
>> .pm line 497.
>> ok 3 - Created connection isa DBI::db
>> DBD::ExampleP::db do failed: Syntax error in select statement ("set dummy=1") at
>>   [.t]42prof_data.t line 43.
>> DBD::ExampleP::db do failed: Syntax error in select statement ("set dummy=1") at
>>   [.t]42prof_data.t line 43.
>> # Looks like you planned 31 tests but ran 3.
>> # Looks like your test exited with 1024 just after 3.
>> %SYSTEM-F-ABORT, abort
> This was the -I problem as as well, 42prof_data.t is ok.
>
>> v20 $ perl -I[.blib.lib] -I[.blib.arch] [.t]49dbd_file.t
>> ok 1 - use DBI;
>> not ok 2 - use DBD::File;
>> #   Failed test 'use DBD::File;'
>> #   at [.t]49dbd_file.t line 18.
>> #     Tried to use 'DBD::File'.
>> #     Error:  Can't locate DBD/File.pm in @INC (@INC contains: /perl_root/lib/VM
>> S_AXP/5_8_1 /perl_root/lib /perl_root/lib/site_perl/VMS_AXP perl_root:[lib.site_
>> perl] /perl_root/lib/site_perl .) at (eval 5) line 2.
>> # BEGIN failed--compilation aborted at (eval 5) line 2.
>> install_driver(File) failed: Can't locate DBD/File.pm in @INC (@INC contains: /p
>> erl_root/lib/VMS_AXP/5_8_1 /perl_root/lib /perl_root/lib/site_perl/VMS_AXP perl_
>> root:[lib.site_perl] /perl_root/lib/site_perl .) at (eval 6) line 3.
>> Perhaps the DBD::File perl module hasn't been fully installed,
>> or perhaps the capitalisation of 'File' isn't right.
>> Available drivers: examplep, nullp, proxy, sponge.
>>   at [.t]49dbd_file.t line 30
>> # Tests were run but no plan was declared and done_testing() was not seen.
>> %SYSTEM-F-ABORT, abort
> 49dbd_file.t should have been:
>
> v20 $ perl -I[.blib.lib] -I[.blib.arch] [.t]49dbd_file.t
> ok 1 - use DBI;
> not ok 2 - use DBD::File;
> #   Failed test 'use DBD::File;'
> #   at [.t]49dbd_file.t line 18.
> #     Tried to use 'DBD::File'.
> #     Error:  DBI/DBD/SqlEngine.pm did not return a true value at (eval 7) line
> 3.
> # 	...propagated at /perl_root/lib/base.pm line 64.
> # BEGIN failed--compilation aborted at /dka200/martin/dbi-1_614/blib/lib/DBD/Fil
> e.pm line 34.
> # Compilation failed in require at (eval 6) line 2.
> # BEGIN failed--compilation aborted at (eval 6) line 2.
> DBD::File initialisation failed: Can't locate object method "driver" via package
>   "DBD::File" at /dka200/martin/dbi-1_614/blib/lib/DBI.pm line 814.
>
> Perhaps the capitalisation of DBD 'File' isn't right. at [.t]49dbd_file.t line 3
> 0
> # Tests were run but no plan was declared and done_testing() was not seen.
> %SYSTEM-F-ABORT, abort
>
>> There are more but this is really just to note what I've seen so far.
>>
>> Martin
> Martin

I managed to get hold of Craig Berry (BTW Craig, I bcc'ed you as I 
wasn't sure you would want to see any followups but I wanted you to know 
what I'd done) and he took a look at the latest development release of 
DBI. He tried posting to dbi-dev but the email has not got through as 
yet so I've copied it here:

=====
Tried to reply on dbi-dev yesterday but my message hasn't come through.  
The main problem I see so far is that anything depending on DBD::DBM 
doesn't work.  For example, in running 85gofer.t, it creates a new, 
empty, temporary directory (by calling rmtree and then mkdir on it), 
then it does opendir/readdir on that empty directory in order to find 
DSNs.  Naturally it doesn't find any.

Here's the point where it's trying to find things that aren't there:

DBD::File::dr::data_sources(blib/lib/DBD/File.pm:143):
143:        while (defined ($file = readdir ($dirh))) {

In my case, the directory is:

   DB<9> x $dir
0  '/D0/CRAIG/DBI/test_output_1076/'


Maybe there is some prior step that is supposed to populate the 
test_output_XXX directory?
=====

BTW, Thanks again Craig for helping us out here.

I'm still looking into issues in VMS but it is a slow process as I've 
got a lot of other stuff to do and the machine I have access to is VERY 
slow. I've also had problems with -Ipath not working on the command line 
(only used where I would have used prove) and had to resort to setting a 
logical for PERL5LIB.

Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.