On Fri, 2011-07-22 at 13:18 +0100, Nix wrote:
On 22 Jul 2011, Balazs Scheidler verbalised:
The error messages indicate that your test suite couldn't load the "basicfuncs" plugin that contains an implementation for $(if) $(grep) and $(echo)
Indeed it can't, because it's looking for them in the install location, and I'm running tests before installation (which seems only sane with something as system-critical as a logging daemon, especially when it's a beta version and my last three intallations were failures and led to its being backed out ;) ).
access("/usr/lib/syslog-ng/libbasicfuncs.so", F_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/syslog-ng/libbasicfuncs.la", F_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/syslog-ng/libconvertfuncs.so", F_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/syslog-ng/libconvertfuncs.la", F_OK) = -1 ENOENT (No such file or directory)
The test_template_LDADD line has led to the right directories for these plugins being added to LD_LIBRARY_PATH, but dlopen() of course does not follow LD_LIBRARY_PATH, it's following the module-path, which is unset because all we've called is cfg_new().
This could all be fixed by setting module_path, but unfortunately the module-path variable consulted by the loader (as opposed to the global which is its ultimate source) is not that easy to set: you need to run the lexer, which means you need a configuration file, and none of the tests in tests/unit have one of those. Perhaps it would be best to move the lexer->args out of the lexer, or just provide an outside-lexer way to initialize it? (Or simply provide a trivial configuration file and parse it in the unit tests... that's probably least invasive.)
hmm.. the test suite can run in a private directory too, as the testsuite is directly linked against the .so-s in the private directory, and it does work here, however funny ld options might break that. what distro are you using? -- Bazsi