Menu

#5 test for proper functioning of drivers up dlopen() on libdbi

closed
None
5
2011-02-20
2010-10-18
Anonymous
No

I've written some unit tests to make sure that the drivers work when libdbi is loaded via a plugin of any time that is linked to it.

I hope they will find their way into a release of libdbi-drivers. They will likely be included as part of the packaging of libdbi-drivers in Ubuntu and Debian soon.

Discussion

  • Markus Hoenicka

    Markus Hoenicka - 2010-10-18

    I'd be happy to include such tests. However, which version are your tests based on? libdbi has changed quite a bit since the last official release, and libdbi-drivers has an entirely new test kit. Unless your tests already reflect these changes, would you be willing to update your tests for the current cvs revisions? Only then we'd be able to include them in the upcoming (real soon now, TM) releases.

    regards,
    Markus

     
  • Markus Hoenicka

    Markus Hoenicka - 2010-10-18
    • assigned_to: nobody --> mhoenicka
     
  • Anonymous

    Anonymous - 2010-11-29

    Hi Markus, the code I wrote was actually just a little C program that loads the libdbi linked binary as a plugin. I'll take a look at the new test suite refactor and try to get you a full patch ASAP.

     
  • Anonymous

    Anonymous - 2010-11-30

    Ok, I spent some time on this, and essentially the desire is to test to make sure that when the build is done with libdbi linked to the drivers (the default build mode), dlopen() with RTLD_GLOBAL works, and to report on whether or not RTLD_NOW works (but not fail the build if it fails, as this may vary depending on system linking behavior).

    My automake-fu is pretty weak, so I don't know how portable the patch is, but here is what I've got. One thing that was broken was compiling against a libdbi that is not in the regular system include/lib dirs. So this also fixes some of that, though I think that should probably be reported/fixed in another bug ticket. It still doesn't work right with --disable-libdbi , which is, I think, an issue with configure.in, I'll try and report if I have more time later on.

     
  • Markus Hoenicka

    Markus Hoenicka - 2011-02-20

    I'm sorry that it took so long to get back to this patch, but now I finally managed to test your code. I had to make a minor adjustment though, so please check whether this still works on Debian/Ubuntu. The change is in tests/Makefile.am. You used:

    test_dbi_dlopen_LDFLAGS = -ldl

    I had to change this to:
    test_dbi_dlopen_LDFLAGS = @LIBADD_LIBDBI@

    FreeBSD's C library provides the dlopen functionality, so there is no separate libdl on this platform. LIBADD_LIBDBI should, in theory, take care of this.

    regards,
    Markus

     
  • Markus Hoenicka

    Markus Hoenicka - 2011-02-20
    • status: open --> closed
     

Log in to post a comment.