Bug#919773: libdbd-sqlite3-perl FTBFS on mips: test failure
Xavier
yadd at debian.org
Sat Jan 19 19:25:44 GMT 2019
Le 19/01/2019 à 20:16, gregor herrmann a écrit :
> On Sat, 19 Jan 2019 15:03:24 +0100, Xavier wrote:
>
>>> https://buildd.debian.org/status/fetch.php?pkg=libdbd-sqlite3-perl&arch=mips&ver=1.62-1&stamp=1546291045&raw=0
>>>
>>> ...
>>> t/65_db_config.t ......................................
>>> 1..79
> ...
>>> ok 76 - sql not found
>>> Failed 3/79 subtests
>>> ...
>>> Test Summary Report
>>> -------------------
>>> t/65_db_config.t (Wstat: 11 Tests: 76 Failed: 0)
>>> Non-zero wait status: 11
>>> Parse errors: Bad plan. You planned 79 tests but ran 76.
>>> Files=111, Tests=3794, 61 wallclock secs ( 2.80 usr 0.48 sys + 48.42 cusr 4.10 csys = 55.80 CPU)
>>> Result: FAIL
>>
>> I think the failure is here. I'm testing
>>
>> diff --git a/t/65_db_config.t b/t/65_db_config.t
>> index 6820736..1e336cf 100644
>> --- a/t/65_db_config.t
>> +++ b/t/65_db_config.t
>> @@ -211,7 +211,7 @@ for my $func (@CALL_FUNCS) {
>>
>> # DEFENSIVE at connection
>> SKIP: {
>> - skip 'DEFENSIVE is not supported', 8 if !SQLITE_DBCONFIG_DEFENSIVE;
>> + skip 'DEFENSIVE is not supported', 3 if !SQLITE_DBCONFIG_DEFENSIVE;
>> my $dbh = connect_ok(RaiseError => 1, PrintError => 0,
>> sqlite_defensive => 1);
>>
>> my $sql = 'CREATE TABLE foo (id, text)';
>
> While the '8' here is obviously wrong, I think this fix is not
> enough. For starters, I don't see anything about "skipped DEFENSIVE is not
> supported" in the log.
>
> I've now tried on minkus (the mips porterbox) and I get the same test
> failure as on the buildd, with or without the patch. The last test
> block is not skipped, it looks (with some diag() sprinkled it) like
> it just fails quietly in the first statement ('my $dbh =
> connect_ok(...)') and never reaches the 3 tests.
>
> So with the following code:
>
> #v+
> # DEFENSIVE at connection
> SKIP: {
> skip 'DEFENSIVE is not supported', 3 if !SQLITE_DBCONFIG_DEFENSIVE;
> diag "We don't skip this section";
> my $dbh = connect_ok(RaiseError => 1, PrintError => 0, sqlite_defensive => 1);
> diag "We have dbh";
>
> my $sql = 'CREATE TABLE foo (id, text)';
> $dbh->do($sql);
> diag "do sql done";
> $dbh->do('PRAGMA writable_schema=ON');
> diag "do pragma done";
> eval { $dbh->do('UPDATE sqlite_master SET name = ? WHERE name = ?', undef, 'bar', 'foo'); };
> diag "evald";
> ok $@, "updating sqlite_master is prohibited";
> like $@ => qr/table sqlite_master may not be modified/;
> }
> #v-
>
> I get
>
> $ prove --blib --verbose t/65_db_config.t
> t/65_db_config.t ..
> 1..79
> ...
> ok 76 - sql not found
> # We don't skip this section
> Failed 3/79 subtests
>
> Test Summary Report
> -------------------
> t/65_db_config.t (Wstat: 11 Tests: 76 Failed: 0)
> Non-zero wait status: 11
> Parse errors: Bad plan. You planned 79 tests but ran 76.
> Files=1, Tests=76, 1 wallclock secs ( 0.20 usr 0.04 sys + 0.70 cusr 0.18 csys = 1.12 CPU)
> Result: FAIL
There is a difference earlier between mips and amd64: the first writes:
# current DEFENSIVE value: 0
while the second has "1"
So it seems that these tests should be disabled for mips but it seems
that SQLITE_DBCONFIG_DEFENSIVE is badly set to a true value.
More information about the pkg-perl-maintainers
mailing list