Bug#919773: libdbd-sqlite3-perl FTBFS on mips: test failure
Control: tag -1 patch On Sat, Jan 19, 2019 at 03:44:43PM +0200, Adrian Bunk wrote: > Source: libdbd-sqlite3-perl > Version: 1.62-1 > Severity: serious > Tags: ftbfs > > https://buildd.debian.org/status/fetch.php?pkg=libdbd-sqlite3-perl=mips=1.62-1=1546291045=0 > 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. Hi, a standalone test case is perl -Iblib/lib -Iblib/arch -MDBI -e 'DBI->connect("dbi:SQLite:dbname=:memory:", "","", { sqlite_defensive => 1})' and the attached patch fixes it for me. -- Niko Tyni nt...@debian.org >From daf3153f7ad67edd7071886c866fe790a7875427 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Wed, 13 Feb 2019 20:42:06 + Subject: [PATCH] Fix SQLITE_DBCONFIG_DEFENSIVE parameter types The sqlite3_db_config() function with SQLITE_DBCONFIG_DEFENSIVE takes two 'int' parameters, but Perl integers may have a different size. Passing a 64-bit argument ('long long int') has been observed to cause a segmentation fault on 32-bit big-endian platforms. Bug: https://github.com/DBD-SQLite/DBD-SQLite/issues/45 Bug-Debian: https://bugs.debian.org/919773 --- dbdimp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbdimp.c b/dbdimp.c index ee08425..f4523d7 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -463,7 +463,7 @@ sqlite_db_login6(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *user, char *pa if (hv_exists(hv, "sqlite_defensive", 16)) { val = hv_fetch(hv, "sqlite_defensive", 16, 0); if (val && SvIOK(*val)) { -sqlite3_db_config(imp_dbh->db, SQLITE_DBCONFIG_DEFENSIVE, SvIV(*val), 0); +sqlite3_db_config(imp_dbh->db, SQLITE_DBCONFIG_DEFENSIVE, (int)SvIV(*val), 0); } } } -- 2.11.0
Bug#919773: libdbd-sqlite3-perl FTBFS on mips: test failure
On Sat, 19 Jan 2019 20:25:44 +0100, Xavier wrote: > There is a difference earlier between mips and amd64: the first writes: > > # current DEFENSIVE value: 0 > > while the second has "1" Hm, I don't see "1" in any logs on the buildds and also not in my local amd64 build log. > 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. I'm not sure ... The previous section ('# DEFENSIVE') which queries SQLITE_DBCONFIG_DEFENSIVE and then turns it on and off, seems to work fine. Just the last section ('# DEFENSIVE at connection'), where sqlite_defensive is already set in connect_ok() fails. Why this set-sqlite_defensive-at-connection-time only fails on mips is the interesting question … Cheers, gregor -- .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe `- NP: Simon And Garfunkel: Sound Of Silence signature.asc Description: Digital Signature
Bug#919773: libdbd-sqlite3-perl FTBFS on mips: test failure
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=mips=1.62-1=1546291045=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.
Bug#919773: libdbd-sqlite3-perl FTBFS on mips: test failure
On Sat, 19 Jan 2019 15:03:24 +0100, Xavier wrote: > > https://buildd.debian.org/status/fetch.php?pkg=libdbd-sqlite3-perl=mips=1.62-1=1546291045=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 Cheers, gregor -- .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe `- NP: Red Hot Chili Peppers: Death Of A Martian signature.asc Description: Digital Signature
Bug#919773: libdbd-sqlite3-perl FTBFS on mips: test failure
Le 19/01/2019 à 14:44, Adrian Bunk a écrit : > Source: libdbd-sqlite3-perl > Version: 1.62-1 > Severity: serious > Tags: ftbfs > > https://buildd.debian.org/status/fetch.php?pkg=libdbd-sqlite3-perl=mips=1.62-1=1546291045=0 > > ... > t/65_db_config.t .. > 1..79 > ok 1 - An object of class 'DBI::db' isa 'DBI::db' > ok 2 - LOOKASIDE is not supported > ok 3 > ok 4 - An object of class 'DBI::db' isa 'DBI::db' > ok 5 - LOOKASIDE is not supported > ok 6 > ok 7 - An object of class 'DBI::db' isa 'DBI::db' > ok 8 - MAINDBNAME is not supported > ok 9 > ok 10 - An object of class 'DBI::db' isa 'DBI::db' > ok 11 - MAINDBNAME is not supported > ok 12 > ok 13 - An object of class 'DBI::db' isa 'DBI::db' > ok 14 - enable foreign key > ok 15 - disable foreign key > ok 16 - An object of class 'DBI::db' isa 'DBI::db' > ok 17 - enable foreign key > ok 18 - disable foreign key > ok 19 - An object of class 'DBI::db' isa 'DBI::db' > ok 20 - enable trigger > ok 21 - disable trigger > ok 22 - An object of class 'DBI::db' isa 'DBI::db' > ok 23 - enable trigger > ok 24 - disable trigger > ok 25 - An object of class 'DBI::db' isa 'DBI::db' > ok 26 - enable fts3_tokenizer > ok 27 - disable fts3_tokenizer > ok 28 - An object of class 'DBI::db' isa 'DBI::db' > ok 29 - enable fts3_tokenizer > ok 30 - disable fts3_tokenizer > ok 31 - An object of class 'DBI::db' isa 'DBI::db' > ok 32 - enable load_extension > ok 33 - disable load_extension > ok 34 - An object of class 'DBI::db' isa 'DBI::db' > ok 35 - enable load_extension > ok 36 - disable load_extension > ok 37 - An object of class 'DBI::db' isa 'DBI::db' > ok 38 - no checkpoint on close > ok 39 - checkpoint on close > ok 40 - An object of class 'DBI::db' isa 'DBI::db' > ok 41 - no checkpoint on close > ok 42 - checkpoint on close > ok 43 - An object of class 'DBI::db' isa 'DBI::db' > ok 44 - enable query planner stability guarantee > ok 45 - disable query planner stability guarantee > ok 46 - An object of class 'DBI::db' isa 'DBI::db' > ok 47 - enable query planner stability guarantee > ok 48 - disable query planner stability guarantee > ok 49 - An object of class 'DBI::db' isa 'DBI::db' > ok 50 - trigger explain query plan > ok 51 - no trigger explain query plan > ok 52 - An object of class 'DBI::db' isa 'DBI::db' > ok 53 - trigger explain query plan > ok 54 - no trigger explain query plan > ok 55 - An object of class 'DBI::db' isa 'DBI::db' > ok 56 - enable reset database > ok 57 - disable reset database > ok 58 - An object of class 'DBI::db' isa 'DBI::db' > ok 59 - enable reset database > ok 60 - disable reset database > ok 61 - An object of class 'DBI::db' isa 'DBI::db' > ok 62 - found sql > ok 63 > ok 64 - updating sqlite_master is prohibited > ok 65 > ok 66 > ok 67 - updating sqlite_master is succeeded > ok 68 - sql not found > ok 69 - An object of class 'DBI::db' isa 'DBI::db' > ok 70 - found sql > ok 71 > ok 72 - updating sqlite_master is prohibited > ok 73 > ok 74 > ok 75 - updating sqlite_master is succeeded > 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 > Failed 1/111 test programs. 0/3794 subtests failed. > make[1]: *** [Makefile:1086: test_dynamic] Error 255 > > ___ > pkg-perl-maintainers mailing list > pkg-perl-maintain...@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-perl-maintainers > 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)';
Bug#919773: libdbd-sqlite3-perl FTBFS on mips: test failure
Source: libdbd-sqlite3-perl Version: 1.62-1 Severity: serious Tags: ftbfs https://buildd.debian.org/status/fetch.php?pkg=libdbd-sqlite3-perl=mips=1.62-1=1546291045=0 ... t/65_db_config.t .. 1..79 ok 1 - An object of class 'DBI::db' isa 'DBI::db' ok 2 - LOOKASIDE is not supported ok 3 ok 4 - An object of class 'DBI::db' isa 'DBI::db' ok 5 - LOOKASIDE is not supported ok 6 ok 7 - An object of class 'DBI::db' isa 'DBI::db' ok 8 - MAINDBNAME is not supported ok 9 ok 10 - An object of class 'DBI::db' isa 'DBI::db' ok 11 - MAINDBNAME is not supported ok 12 ok 13 - An object of class 'DBI::db' isa 'DBI::db' ok 14 - enable foreign key ok 15 - disable foreign key ok 16 - An object of class 'DBI::db' isa 'DBI::db' ok 17 - enable foreign key ok 18 - disable foreign key ok 19 - An object of class 'DBI::db' isa 'DBI::db' ok 20 - enable trigger ok 21 - disable trigger ok 22 - An object of class 'DBI::db' isa 'DBI::db' ok 23 - enable trigger ok 24 - disable trigger ok 25 - An object of class 'DBI::db' isa 'DBI::db' ok 26 - enable fts3_tokenizer ok 27 - disable fts3_tokenizer ok 28 - An object of class 'DBI::db' isa 'DBI::db' ok 29 - enable fts3_tokenizer ok 30 - disable fts3_tokenizer ok 31 - An object of class 'DBI::db' isa 'DBI::db' ok 32 - enable load_extension ok 33 - disable load_extension ok 34 - An object of class 'DBI::db' isa 'DBI::db' ok 35 - enable load_extension ok 36 - disable load_extension ok 37 - An object of class 'DBI::db' isa 'DBI::db' ok 38 - no checkpoint on close ok 39 - checkpoint on close ok 40 - An object of class 'DBI::db' isa 'DBI::db' ok 41 - no checkpoint on close ok 42 - checkpoint on close ok 43 - An object of class 'DBI::db' isa 'DBI::db' ok 44 - enable query planner stability guarantee ok 45 - disable query planner stability guarantee ok 46 - An object of class 'DBI::db' isa 'DBI::db' ok 47 - enable query planner stability guarantee ok 48 - disable query planner stability guarantee ok 49 - An object of class 'DBI::db' isa 'DBI::db' ok 50 - trigger explain query plan ok 51 - no trigger explain query plan ok 52 - An object of class 'DBI::db' isa 'DBI::db' ok 53 - trigger explain query plan ok 54 - no trigger explain query plan ok 55 - An object of class 'DBI::db' isa 'DBI::db' ok 56 - enable reset database ok 57 - disable reset database ok 58 - An object of class 'DBI::db' isa 'DBI::db' ok 59 - enable reset database ok 60 - disable reset database ok 61 - An object of class 'DBI::db' isa 'DBI::db' ok 62 - found sql ok 63 ok 64 - updating sqlite_master is prohibited ok 65 ok 66 ok 67 - updating sqlite_master is succeeded ok 68 - sql not found ok 69 - An object of class 'DBI::db' isa 'DBI::db' ok 70 - found sql ok 71 ok 72 - updating sqlite_master is prohibited ok 73 ok 74 ok 75 - updating sqlite_master is succeeded 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 Failed 1/111 test programs. 0/3794 subtests failed. make[1]: *** [Makefile:1086: test_dynamic] Error 255