Skip to content

SQLite3::TestDatabaseURI test failures with system sqlite #611

@voxik

Description

@voxik

I am observing following errors on Fedora Rawhide using Fedora sqlite-3.47.2-2.fc42.x86_64:

$ ruby -I~/build/BUILD/rubygem-sqlite3-2.5.0-build/sqlite3-2.5.0/usr/lib64/gems/ruby/sqlite3-2.5.0:lib:test -e 'Dir.glob "./test/test_*.rb", &method(:require)'
---
:ruby: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux]
:gem:
  :version: 2.5.0
:sqlite:
  :compiled: 3.47.2
  :loaded: 3.47.2
  :packaged: false
  :precompiled: false
  :sqlcipher: false
  :threadsafe: true

... snip ...

  1) Failure:
SQLite3::TestDatabaseURI#test_open_relative_file_uri [test/test_database_uri.rb:26]:
Expected path 'test.db' to exist.

  2) Error:
SQLite3::TestDatabaseURI#test_open_file_uri_readonly:
SQLite3::CantOpenException: unable to open database file
    lib/sqlite3/database.rb:166:in 'SQLite3::Database#open_v2'
    lib/sqlite3/database.rb:166:in 'SQLite3::Database#initialize'
    test/test_database_uri.rb:37:in 'Class#new'
    test/test_database_uri.rb:37:in 'block in SQLite3::TestDatabaseURI#test_open_file_uri_readonly'
    /usr/share/ruby/tempfile.rb:444:in 'Tempfile.open'
    test/test_database_uri.rb:36:in 'SQLite3::TestDatabaseURI#test_open_file_uri_readonly'

  3) Error:
SQLite3::TestDatabaseURI#test_open_absolute_file_uri:
SQLite3::CantOpenException: unable to open database file
    lib/sqlite3/database.rb:166:in 'SQLite3::Database#open_v2'
    lib/sqlite3/database.rb:166:in 'SQLite3::Database#initialize'
    test/test_database_uri.rb:12:in 'Class#new'
    test/test_database_uri.rb:12:in 'block in SQLite3::TestDatabaseURI#test_open_absolute_file_uri'
    /usr/share/ruby/tempfile.rb:444:in 'Tempfile.open'
    test/test_database_uri.rb:11:in 'SQLite3::TestDatabaseURI#test_open_absolute_file_uri'

Seeing:

"-DSQLITE_USE_URI=1",

while I can't spot similar option in Fedora package, I assume Fedora SQLite package does not support this feature and therefore the test fails.

If the assumption is right, the question is what apart of the test case is broken and also if I should ask Fedora packager to enable the -DSQLITE_USE_URI=1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions