DBD::mysql t/dbdadmin test failure 7, 11, 15

DBD::mysql t/dbdadmin test failure 7, 11, 15

am 09.08.2003 19:16:47 von Leif W

Hello, having a problem with DBD::mysql installation (2.9002) on Debian
Linux with perl 5.8.0. Running programs as root, with root access to MySQL.
MySQL is up and running fine and I can connect using the command-line client
'mysql'.

Creating the Makefile as follows:

perl Makefile.PL --testuser=root --testpassword=passwd --testhost=localhost

Then running make test, with errors as follows:

t/dbdadmin.........NOK 7New DB not in DSN list
t/dbdadmin.........NOK 11DSN testab not in DSN list.
t/dbdadmin.........NOK 15DSN testac not in DSN list.
t/dbdadmin.........FAILED tests 7, 11, 15
Failed 3/21 tests, 85.71% okay

Please advise,

Leif

P.S. note that --testport gives an error:

perl
Makefile.PL --testuser=root --testpassword=passwd --testhost=localhost --tes
tport=3306
....
Use of uninitialized value in printf at Makefile.PL line 45, line 34.
testport ( ) = 3306
....




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql t/dbdadmin test failure 7, 11, 15

am 10.08.2003 13:25:05 von Leif W

Hello,

I'm not too familiar with the debugger, and I wasn't sure what to look for.
I modified InDsnList to print out some more data, and modified one other
Test error message (about the New DB not in DSN list). The output from make
test ... is showing that InDsnList is being called, but the @dsnList is
always empty, as nothing is being printed from inside the foreach loop.

sub InDsnList($@) {
my($dsn, @dsnList) = @_;
my($d);
print "InDsnList called\n"; # for debugging
foreach $d (@dsnList) {
print "DSN: $d\n"; # for debugging
if ($d =~ /^dbi:[^:]+:$dsn\b/i) {
return 1;
}
}
0;
}

....

Test($state or $accessDenied
or InDsnList($testdsn, DBI->data_sources($mdriver))
or InDsnList($testdsn, DBI->data_sources($mdriver,
{"host" => $test_host,
"port" =>
$test_port})))
or print STDERR ("New DB $testdsn not in DSN list\n"); # added
$testdsn to be more specific

defiant:~/.cpan/build/DBD-mysql-2.9002# make test TEST_FILES=t/dbdadmin.t
TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(1, 'blib/lib', 'blib/arch')" t/dbdadmin.t
t/dbdadmin....mysql
1..21
ok 1
ok 2
ok 3
ok 4
ok 5
InDsnList called
InDsnList called
InDsnList called
ok 6
InDsnList called
InDsnList called
not ok 7
New DB testaa not in DSN list
ok 8
InDsnList called
InDsnList called
ok 9
ok 10
InDsnList called
InDsnList called
not ok 11
DSN testab not in DSN list.
ok 12
InDsnList called
InDsnList called
ok 13
ok 14
InDsnList called
InDsnList called
not ok 15
DSN testac not in DSN list.
ok 16
InDsnList called
InDsnList called
ok 17
ok 18
ok 19
ok 20
ok 21
FAILED tests 7, 11, 15
Failed 3/21 tests, 85.71% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
------------------------------------------------------------ ----------------
---
t/dbdadmin.t 21 3 14.29% 7 11 15
Failed 1/1 test scripts, 0.00% okay. 3/21 subtests failed, 85.71% okay.
make: *** [test_dynamic] Error 29

----- Original Message -----
From: "Jochen Wiedmann"
To: "Leif W"
Cc:
Sent: Sunday, August 10, 2003 5:44 AM
Subject: Re: DBD::mysql t/dbdadmin test failure 7, 11, 15


> Quoting Leif W :
>
> > t/dbdadmin.........NOK 7New DB not in DSN list
> > t/dbdadmin.........NOK 11DSN testab not in DSN list.
> > t/dbdadmin.........NOK 15DSN testac not in DSN list.
> > t/dbdadmin.........FAILED tests 7, 11, 15
> > Failed 3/21 tests, 85.71% okay
>
> We'd be thankful, if you could debug these problems within the
> test script. These tests typically generate a list of databases
> and expect to find some database in the list. The most possible
> reason is with case sensitivity/insensitivity. It would help
> to know how the returned lists look like.
>
> It may be possible that a simple
>
> make test TEST_FILES=t/dbdadmin.t TEST_VERBOSE=1
>
> gives an answer. Otherwise you might be able to win this info
> using the Perl debugger:
>
> make testdb TEST_FILE=t/dbdadmin.t
>
>
>
> > P.S. note that --testport gives an error:
> >
> > perl
> >
Makefile.PL --testuser=root --testpassword=passwd --testhost=localhost --tes
> > tport=3306
>
> Try --testhost=localhost:3306
>
>
> Jochen
>
>
>



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql t/dbdadmin test failure 7, 11, 15

am 10.08.2003 13:25:05 von Leif W

Hello,

I'm not too familiar with the debugger, and I wasn't sure what to look for.
I modified InDsnList to print out some more data, and modified one other
Test error message (about the New DB not in DSN list). The output from make
test ... is showing that InDsnList is being called, but the @dsnList is
always empty, as nothing is being printed from inside the foreach loop.

sub InDsnList($@) {
my($dsn, @dsnList) = @_;
my($d);
print "InDsnList called\n"; # for debugging
foreach $d (@dsnList) {
print "DSN: $d\n"; # for debugging
if ($d =~ /^dbi:[^:]+:$dsn\b/i) {
return 1;
}
}
0;
}

....

Test($state or $accessDenied
or InDsnList($testdsn, DBI->data_sources($mdriver))
or InDsnList($testdsn, DBI->data_sources($mdriver,
{"host" => $test_host,
"port" =>
$test_port})))
or print STDERR ("New DB $testdsn not in DSN list\n"); # added
$testdsn to be more specific

defiant:~/.cpan/build/DBD-mysql-2.9002# make test TEST_FILES=t/dbdadmin.t
TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(1, 'blib/lib', 'blib/arch')" t/dbdadmin.t
t/dbdadmin....mysql
1..21
ok 1
ok 2
ok 3
ok 4
ok 5
InDsnList called
InDsnList called
InDsnList called
ok 6
InDsnList called
InDsnList called
not ok 7
New DB testaa not in DSN list
ok 8
InDsnList called
InDsnList called
ok 9
ok 10
InDsnList called
InDsnList called
not ok 11
DSN testab not in DSN list.
ok 12
InDsnList called
InDsnList called
ok 13
ok 14
InDsnList called
InDsnList called
not ok 15
DSN testac not in DSN list.
ok 16
InDsnList called
InDsnList called
ok 17
ok 18
ok 19
ok 20
ok 21
FAILED tests 7, 11, 15
Failed 3/21 tests, 85.71% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
------------------------------------------------------------ ----------------
---
t/dbdadmin.t 21 3 14.29% 7 11 15
Failed 1/1 test scripts, 0.00% okay. 3/21 subtests failed, 85.71% okay.
make: *** [test_dynamic] Error 29

----- Original Message -----
From: "Jochen Wiedmann"
To: "Leif W"
Cc:
Sent: Sunday, August 10, 2003 5:44 AM
Subject: Re: DBD::mysql t/dbdadmin test failure 7, 11, 15


> Quoting Leif W :
>
> > t/dbdadmin.........NOK 7New DB not in DSN list
> > t/dbdadmin.........NOK 11DSN testab not in DSN list.
> > t/dbdadmin.........NOK 15DSN testac not in DSN list.
> > t/dbdadmin.........FAILED tests 7, 11, 15
> > Failed 3/21 tests, 85.71% okay
>
> We'd be thankful, if you could debug these problems within the
> test script. These tests typically generate a list of databases
> and expect to find some database in the list. The most possible
> reason is with case sensitivity/insensitivity. It would help
> to know how the returned lists look like.
>
> It may be possible that a simple
>
> make test TEST_FILES=t/dbdadmin.t TEST_VERBOSE=1
>
> gives an answer. Otherwise you might be able to win this info
> using the Perl debugger:
>
> make testdb TEST_FILE=t/dbdadmin.t
>
>
>
> > P.S. note that --testport gives an error:
> >
> > perl
> >
Makefile.PL --testuser=root --testpassword=passwd --testhost=localhost --tes
> > tport=3306
>
> Try --testhost=localhost:3306
>
>
> Jochen
>
>
>



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql t/dbdadmin test failure 7, 11, 15

am 10.08.2003 18:34:29 von Leif W

----- Original Message -----
From: "Jochen Wiedmann"
To: "Leif W"
Cc:
Sent: Sunday, August 10, 2003 11:59 AM
Subject: Re: DBD::mysql t/dbdadmin test failure 7, 11, 15


> Interesting. Is your database configured to *require* a user name
> and password? Are you using a password while running the tests?

Yes, and yes. Database wouldn't be too secure if I gave full admin access
to anyone without a username or password. ;-) The dbdadmin.t script seems
to be creating the connection ok.

print "DSN: $test_dsn, U: $test_user, P: $test_password\n";
Test($state or ($dbh = DBI->connect($test_dsn, $test_user,
$test_password)))
or ServerError();

Output snippet:

t/dbdadmin....DSN: DBI:mysql:test:localhost, U: root, P: passwd
1..21
DSN: DBI:mysql:test:localhost, U: root, P: passwd


Leif



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql t/dbdadmin test failure 7, 11, 15

am 10.08.2003 18:34:29 von Leif W

----- Original Message -----
From: "Jochen Wiedmann"
To: "Leif W"
Cc:
Sent: Sunday, August 10, 2003 11:59 AM
Subject: Re: DBD::mysql t/dbdadmin test failure 7, 11, 15


> Interesting. Is your database configured to *require* a user name
> and password? Are you using a password while running the tests?

Yes, and yes. Database wouldn't be too secure if I gave full admin access
to anyone without a username or password. ;-) The dbdadmin.t script seems
to be creating the connection ok.

print "DSN: $test_dsn, U: $test_user, P: $test_password\n";
Test($state or ($dbh = DBI->connect($test_dsn, $test_user,
$test_password)))
or ServerError();

Output snippet:

t/dbdadmin....DSN: DBI:mysql:test:localhost, U: root, P: passwd
1..21
DSN: DBI:mysql:test:localhost, U: root, P: passwd


Leif



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org