Re: 51dbm_file.t problems in latest development release

Jens Rehsack <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
2010/9/7 Martin J. Evans <[email protected]>:
>  After a small discussion on #perl today I found a small amount of time to
> look at 51dbm_file.t test failures. There are a few things I noted:
>
> 1. ribasushi suggests the tests fail because it does a rmtree when still
> connected so the files are still open and this fails on Windows. I don't see
> this problem but I imagine it would be solved by disconnecting, rmtree then
> reconnecting.

The error was a failure in DBD::File::Table::file2table function for
quoted table
names which have a path component (which needs to be supported for
backward compatibility).

> 2. I'm a bit suspicious about the:
>
> $test_dir .= "_" . basename($0, qr/\.[^.]*/);
>
> in lib.t because basename docs say:
> "@suffixes work as in fileparse() except all regex metacharacters are
> quoted" so those '*' and []^ will be taken literally. It does work if you
> just change that to ".t".

Well, currently t/lib.pl supports even test scripts with any other extension,
e.g. "sandbox/rtxxxxx.pl".
I don't see any reason to change this.

> 3. personally I don't like ok calls without a test name as it makes it hard
> to find the tests when looking at the code and comparing it with the test
> output.

You're absolutely right here - a good test case name would be
"select from full qualified path name as table"

> 4. the test that fails for me is test 7 which does a:
>
> select * from
> C:\Users\martin\DBI-1.613_93\test_output_5084_51dbm_file_mine\fred
>
> which returns no rows. I'm not sure why as that is the name of the file.

I do not understand why you aren't sure about what. I would be happy to
explain.

> I'd be happy to fix (2) and (3) and I don't think (1) will hurt but as I
> cannot reproduce a problem with the rmtree as reported by some. Instead the
> error I see is the last select which returns nothing.

That#s correct, for some reason something during DBD::DBM::Table::open_file()
fails because of the bug in DBD::File::Table::file2table. I couldn't
figure out what
failed and why there was no error message, I assume it's the PathTools error
with non-existing path's when concatenating file names.

> Martin

Jens
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.