Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179641 - dev-ruby/sqlite3-ruby src_test patch
Summary: dev-ruby/sqlite3-ruby src_test patch
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 14:14 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-12-21 22:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild patch (sqlite3-ruby-ebuild.patch,956 bytes, patch)
2007-05-24 14:15 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff
flexmock-0.0.3.ebuild (flexmock-0.0.3.ebuild,418 bytes, text/plain)
2007-05-24 14:15 UTC, Diego Elio Pettenò (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-24 14:14:46 UTC
As sqlite3-ruby has a few test to test the native swig interface, I've modified the ebuild to execute them with FEATURES=test.

I'm attaching a flexmock-0.0.3 ebuild (slotted 0.0, the latest version is 0.6.0, they don't collide), and together with that a patch to sqlite3-ruby with a simple src_test.

Please note that tests fail for me on both ~x86-fbsd and ~amd64, and they are likely upstream bugs:

  1) Failure:
test_busy_timeout(Integration::TC_Database_Native) [./tc_integration.rb:593]:
<false> is not true.

this happens on both machines

  2) Error:
test_bind_param_with_various_types(Integration::TC_Statement_Native):
RangeError: integer 68719476735 too big to convert to `int'
    ./../lib/sqlite3/driver/native/driver.rb:194:in `sqlite3_bind_int'
    ./../lib/sqlite3/driver/native/driver.rb:194:in `send'
    ./../lib/sqlite3/driver/native/driver.rb:194:in `bind_int'
    ../lib/sqlite3/statement.rb:125:in `bind_param'
    ../lib/sqlite3/statement.rb:106:in `bind_params'
    ../lib/sqlite3/statement.rb:102:in `each'
    ../lib/sqlite3/statement.rb:102:in `bind_params'
    ../lib/sqlite3/statement.rb:162:in `execute'
    ../lib/sqlite3/database.rb:212:in `execute'
    ../lib/sqlite3/database.rb:187:in `prepare'
    ../lib/sqlite3/database.rb:211:in `execute'
    ./tc_integration.rb:765:in `test_bind_param_with_various_types'

this instead happens on amd64; it might be worth to test it on other 64-bit arches as it does seem like a 64-bit problem.

HTH,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-24 14:15:23 UTC
Created attachment 120190 [details, diff]
Ebuild patch
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-24 14:15:45 UTC
Created attachment 120192 [details]
flexmock-0.0.3.ebuild
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-24 14:16:37 UTC
Forgot to say that my sqlite3-ruby ebuild patch also fixes the runtime dependency over swig that shouldn't be there (swig is just a build tool).
Comment 4 Richard Brown (RETIRED) gentoo-dev 2007-05-24 15:58:04 UTC
Thanks I've got both updates in my overlay now, what version of sqlite were you using? I have no problems with the tests on x86 with 3.3.12, on my amd64 I don't get the failure but do get the error.

I'll commit to gentoo-x86 once I've had time to look at what's causing the error.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-24 16:10:14 UTC
dev-db/sqlite-3.3.17 on both Linux and FreeBSD (~arch versions).

The error is scarier as it seems like 32/64 bit variables are messed.
Comment 6 Richard Brown (RETIRED) gentoo-dev 2007-05-24 17:28:02 UTC
Ok, with that version of sqlite I get the timeout with x86 and a segfault on an amd64. In case it's important, what version of swig did you use? I had 1.3.31 on the amd64
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-25 10:27:27 UTC
dev-lang/swig-1.3.31 on both boxes.
Comment 8 Richard Brown (RETIRED) gentoo-dev 2007-05-25 15:30:18 UTC
What version of ruby are you using on your amd64?

The Error is caused by bind_param assuming that a FixNum is the same size as an int. 
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-25 17:16:46 UTC
dev-lang/ruby-1.8.6-r1 on all my systems.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-21 22:08:40 UTC
This whole things is so old that it's not funny any more, the new sqlite3-ruby ebuild using fakegem has the tests, and they fail.