Commit Graph

541 Commits

Author SHA1 Message Date
Gary V. Vaughan
066a70fd86 Skip some tests in --disable-ltdl-install mode.
* tests/dlloader-api.at, tests/exceptions.at,
tests/lalib-syntax.at, tests/loadlibrary.at,
tests/lt_dlopenext.at, tests/resident.at: Detect when these
tests try to link against the not installed libltdl.la, and
skip rather than FAIL.
2010-05-21 04:21:38 +07:00
Ralf Wildenhues
3d0fc4870e Fix incompatible struct declarations.
* doc/libtool.texi (Dlpreopening): Remove broken documentation
of lt_dlsymbol and lt_dlsymlist.  Document typedef lt_dlsymlist
and symbol lt_preloaded_symbols according to the implementation.
* tests/demo/dlmain.c (lt_symlist): Make struct anonymous ...
(lt_dlsymlist): ... and typedef to this name.
(lt_preloaded_symbols, main): Adjust.
* tests/pdemo/longer_file_name_dlmain.c: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-04-09 21:37:09 +02:00
Pierre Ossman
7efdc2482e Fix deplibs check fallback for 64-bit Windows and Windows CE.
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): Accept file formats
'pe-arm-wince' and 'pe-x86-64'.  Add note about consistency with ...
* libltdl/config/ltmain.m4sh (func_win32_libid): ... the respective
pattern here; sync pattern from the former.
* tests/deplibs-mingw.at (deplibs without file command): New
file, new test.
* Makefile.am (TESTSUITE_AT): Update.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-02-28 05:46:16 +01:00
Charles Wilson
2613ea3ab2 Enable runtime cwrapper debugging; add tests
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src):
Update comments. Initialize program_name. Eliminate _LENGTH
variables for string constants. In debug mode, print a
banner with known content before any other output. Remove
LTWRAPPER_DEBUGPRINTF macro. Add constants and variables
to support new --lt-debug option.
(func_emit_cwrapperexe_src:ltwrapper_debugprintf): Renamed to...
(func_emit_cwrapperexe_src:lt_debugprintf): this. Only print
messages if lt_debug != 0. Ensure appearance of messages
conforms to GCS.
(func_emit_cwrapperexe_src:lt_fatal): Ditto.
(func_emit_cwrapperexe_src:lt_error_core): Ditto.
(func_emit_cwrapperexe_src): Update all callers to lt_fatal.
Update all users of LTWRAPPER_DEBUGPRINTF (()) to call
lt_debugprintf () directly.
(func_emit_cwrapperexe_src:main): Consolidate option parsing.
Ensure first use of lt_debugprintf occurs after option parsing.
Add stanza to parse for --lt-debug and set lt_debug variable.
Use strcmp rather than strncmp, where safe.
* tests/cwrapper.at: Add new tests for --lt-debug and
-DLT_DEBUGWRAPPER.
2010-02-21 00:32:17 -05:00
Ralf Wildenhues
2080fe9649 Make testsuite code C++ clean again.
* tests/resident.at (resident modules): Fix for C++.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-31 15:33:27 +01:00
Peter Rosin
e4eefcd401 Testsuite exposure for dlloader API.
* tests/dlloadet-api.at: New file, new test.
* Makefile.am (TESTSUITE_AT): Update.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-29 09:04:13 +01:00
Peter Rosin
f4c63234c9 * tests/loadlibrary.at: Fix C++ issues.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-29 08:50:13 +01:00
Peter Rosin
080e088e42 Report proper errors from the loadlibrary loader.
* libltdl/loaders/loadlibrary.c (loadlibraryerror): New
helper function that returns the latest Windows error as a
string, or the provided default string on failure to do so.
(LOADLIB_SETERROR): New macro that wraps previous to make it
easy to use.
(vm_open, vm_close, vm_sym): Make use of previous.
(LOCALFREE): New macro to help free the Windows error string.
(vl_exit): Make use of previous.
* tests/loadlibarry.at: New file, new test that makes sure
the loadlibrary loader reports non-standard error messages.
* Makefile.am (TESTSUITE_AT): Add above test.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-21 08:42:12 +01:00
Ralf Wildenhues
a75f8acf28 Ensure functions from resident modules work in atexit handlers.
* tests/resident.at (resident modules): New file, new test.
* Makefile.am (TESTSUITE_AT): Adjust.
Report by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-11 21:56:23 +01:00
Ralf Wildenhues
574b79474a Testsuite exposure for relative output file names and deplibs.
* tests/deplib-in-subdir.at (deplib in subdir): New file, new
test.
* Makefile.am (TESTSUITE_AT): Update.
Prompted by report from Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-11 21:49:38 +01:00
Ralf Wildenhues
85223ba6a4 Testsuite exposure for C++ exception handling.
* tests/exceptions.at (C++ exception handling): New file, new
test.
* Makefile.am (TESTSUITE_AT): Update.
Report by Bob Friesenhahn.
2010-01-11 21:21:13 +01:00
Ralf Wildenhues
93f5529731 Improve parsing of .la files in libltdl.
* libltdl/ltdl.c (trim): Do not dump core upon missing quote in
module .la file.
* tests/lalib-syntax.at (syntax of .la files): New file, new
test.
* Makefile.am (TESTSUITE_AT): Add tests/lalib-syntax.at.
Report by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-09 07:28:59 +01:00
Ralf Wildenhues
31eb92de4f Sane fallback initialization of $ECHO from $as_echo.
* libltdl/config/general.m4sh: Use 'printf %s\n' if $as_echo is
unset.
* tests/testsuite.at: Likewise.
* THANKS: Update.
Report by Vadim Zeitlin and Peter Rosin.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-05 15:50:56 +01:00
Ralf Wildenhues
fea7fdee4e Test and fix slist.c.
* libltdl/libltdl/slist.h: Include stddef.h, for size_t.
(slist_remove): Return pointer to SList, not void.
* libltdl/slist.c: Include stdlib.h, for malloc and free.
(slist_remove): Adjust prototype as above.
(slist_sort): Do not loop forever on one-item list.
* tests/slist.at (SList functionality): New file, new test.
* Makefile.am (TESTSUITE_AT): Add tests/slist.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-02 23:13:05 +01:00
Ralf Wildenhues
b15f6f9ded Fix bindir and dlopen tests for C++ compilers (CC=g++).
* tests/bindir.at (bindir basic lib test, bindir install tests):
Include stdlib.h rather than declaring abort.
* tests/lt_dlopenext.at (lt_dlopenext error messages): Use
`extern "C"' annotation for dlsym'ed function in C++ mode.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-29 23:03:14 +01:00
Peter Rosin
4137bb8a15 Fix cross build issue in execute mode test.
* tests/execute-mode.at: Skip test for cross builds.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-11-25 17:29:34 -05:00
Bob Friesenhahn
e91f7b9600 Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current directory so that test passes.
2009-11-15 20:50:02 -06:00
Peter O'Gorman
3580cddcea Only use preopen loader to load preopened archives
* libltdl/ltdl.c: Limit checking of .a to preopen loader.
* tests/lt_dlopen_a.at: Add test.
* Makefile.am: Add test.
2009-11-15 20:49:55 -06:00
Dave Korn
6858ed03d8 Control where win32 DLLs get installed.
* libltdl/config/general.m4sh (func_normal_abspath): New function.
(func_relative_path): Likewise.
* libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
(func_mode_link): Accept new "-bindir" option and use it, if
supplied, to place Windows DLLs.
* tests/bindir.at: New file for install tests using "-bindir".
* Makefile.am (TESTSUITE_AT): Add bindir.at.
* doc/libtool.texi (Link Mode): Update documentation.
* NEWS, THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-12 08:23:03 +02:00
Ralf Wildenhues
1e4e1984b0 Fix and split recent testsuite addition for compile/link flags.
* tests/flags.at (passing flags through libtool): Split into ...
(passing CC flags through libtool)
(passing CXX flags through libtool)
(passing F77 flags through libtool)
(passing FC flags through libtool)
(passing GCJ flags through libtool): ... these five tests,
factorized with m4_foreach.  Fix F77 and FC compile and link
commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
for which no compiler exists.  Use $EXEEXT where appropriate.
Drop unneeded use of reload_cmds.
Reports by Peter Rosin and Peter O'Gorman.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-08 20:02:57 +02:00
Peter O'Gorman
91697c2092 Fix redirect in test case.
tests/darwin.at: Fix stderr redirect.
2009-09-07 15:17:03 -05:00
Peter O'Gorman
4ad8b63bd1 Use darwin's -force_load flag if available for whole_archive_flag_spec
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
-force_load and use it if there.
* tests/darwin.at: Add a simple test.
2009-09-07 00:41:58 -05:00
Ralf Wildenhues
2eb8c3e51f Testsuite keyword 'interactive' and check-* rules.
* Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
New variables.
(check-local, installcheck-local): Use them.
(check-interactive, check-noninteractive): New rules.
* tests/link-order2.at (Link order of deplibs),
tests/static.at (static linking flags for programs): Add keyword
`interactive'.
* doc/libtool.texi (Test descriptions): Document all keywords
used in the Libtool test suite.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 19:38:06 +02:00
Ralf Wildenhues
0805518173 Fix failure test in the presence of --with-pic or -prefer-pic.
* tests/fail.at (Failure tests): Run non-PIC failure test only
if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
and also -prefer-pic has not been passed in $CFLAGS.
* THANKS: Update.
Report by Donn Washburn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 12:42:34 +02:00
Ralf Wildenhues
8c35d79757 Add testsuite exposure for passing of compiler and linker flags.
* tests/flags.at (passing flags through libtool): New file, new
test, for bug fixed in previous commit.
* Makefile.am (TESTSUITE_AT): Add tests/flags.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-06 09:57:55 +02:00
Roumen Petrov
04329d8355 Fixup 'execute mode' test for w32.
* tests/execute-mode.at (execute mode): Add missing $EXEEXT.
(LDFLAGS): Add -no-undefined.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-07-25 11:32:26 +02:00
Ralf Wildenhues
2772d14559 Add versioning tests.
* tests/versioning.at (versioning): New file, new test.
* Makefile.am (TESTSUITE_AT): Adjust.
Prompted by bug report from Mike Gorchak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-14 12:03:31 +02:00
Ralf Wildenhues
8a08afac5d Avoid spurious localization testsuite failure on HP-UX/ia64.
* tests/localization.at (localized compiler messages): Skip test
if the compiler warning output contains `locale', for HP-UX.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-14 11:35:59 +02:00
Ralf Wildenhues
b04fe8e6da Fix concurrent extraction of convenience libraries on Darwin.
* libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): New libtool
variable `lock_old_archive_extraction', set to `yes' on darwin.
* doc/libtool.texi (libtool script contents): Document it.
* libltdl/config/ltmain.m4sh (func_extract_an_archive): Lock
`ar x' invocation if `lock_old_archive_extraction' is yes.
* tests/darwin.at (darwin concurrent library extraction): New
test.
* NEWS: Update.
Report by Akim Demaille.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-10 19:47:33 +02:00
Ralf Wildenhues
efe1cfec71 Fix testsuite failure of lt_dlopenadvise test on FreeMiNT.
* tests/lt_dladvise.at (lt_dlopenadvise library loading): Do not
build moddepend for systems without shared libraries.
Report by Alan Hourihane.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 16:35:45 +02:00
Ralf Wildenhues
f578833bb8 testsuite: avoid failures due to old Automake.
* tests/configure-iface.at (installable libltdl)
(--with-ltdl-include/lib, --with-included-ltdl):
Speficy libmodule_la_SOURCES in Makefile.am as the default
source file naming scheme changed in Automake 1.8.
* tests/nonrecursive.at (_LT_AT_LTDL_SETUP): Require Automake
1.9.6.
* THANKS: Update.
Report by Robert Garron.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 12:01:56 +02:00
Ralf Wildenhues
d812c6326b testsuite: add missing @LIBS@ in a link command line.
* tests/old-m4-iface.at (AC_WITH_LTDL): Use @LIBS@ when linking.
Report by Patrice Fromy.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 11:58:59 +02:00
Ralf Wildenhues
740565c4fd testsuite: cope when some installed libltdl.la has been removed.
* tests/old-m4-iface.at (AC_WITH_LTDL): Pass --with-included-ltdl
to configure, to ensure we do not accidentally link against a
previously installed libltdl.so where the corresponding .la
file has been removed, thus we do not add a run path, and the
runtime linker then fails to find libltdl.so.7.
* tests/configure-iface.at (--with-ltdl-include/lib): Remove -L
flags from LDFLAGS to avoid picking up an installed libltdl
outside of the default locations.
* THANKS: Update.
Prompted by report from Patrice Fromy.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-07 11:42:17 +02:00
Ralf Wildenhues
848215b440 Skip localization test when setlocale is not functional.
* tests/localization.at (localized compiler messages): Skip
test when there is a warning about `LC_ALL'.
* THANKS: Update.
Report by Maciej Helminiak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-02 10:55:23 +02:00
Peter Rosin
b3072b0b37 LT_OUTPUT should always create the libtool script.
* libltdl/m4/libtool.m4 (LT_OUTPUT): Make LT_OUTPUT ignore the
--no-create configure option, and assume that the user wants
to use an up-to-date libtool script if the LT_OUTPUT macro is
present.
* tests/early-libtool.at: Make sure we do not regress.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-03-20 16:42:55 +01:00
Ralf Wildenhues
c1cd198697 Document INNER_TESTSUITEFLAGS, drop leading space.
* README: Document INNER_TESTSUITEFLAGS.
* tests/cmdline_wrap.at (Run tests with low max_cmd_len):
When using INNER_TESTSUITEFLAGS on the testsuite invocation,
drop leading space after "-k libtool", so that the user may
further limit the set of tests to be run.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-03-03 19:53:46 +01:00
Ralf Wildenhues
9e9ba5e0e2 Do not pass $INSTALL via TESTS_ENVIRONMENT.
* Makefile.am (TESTS_ENVIRONMENT): Set lt_INSTALL, not INSTALL,
so that a bogus relative path to the install-sh script in the
source tree is not propagated to the configure scripts of the
old test suite.
* tests/testsuite.at: Adjust.
* tests/install.at (Install tests): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-16 21:59:34 +01:00
Ralf Wildenhues
77e1149984 New test for lt_dlopenext error message.
* tests/lt_dlopenext.at (lt_dlopenext error messages): New file,
with new test, with sources taken from the Autobook example.
* Makefile.am: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-03 08:15:36 +01:00
Ralf Wildenhues
5f24ee188d Fix sed script in install.at.
* tests/install.at (Install tests): Fix typo in sed script,
fixes test failure on HP-UX.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-01 15:42:44 +01:00
Ralf Wildenhues
6d08820f7c Fix $INSTALL in testsuite with relative path to install-sh.
* tests/testsuite.at: If `$INSTALL' points to in-tree
install-sh, override a possibly-relative path to it with an
absolute one.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-01 15:41:52 +01:00
Jeff Squyres
af91ea10b4 New test for bogus lt_dlopen error message.
* tests/lt_dlopen.at (lt_dlopen error messages): New file, new
test, marked as XFAIL for now.
* Makefile.am: Adjust.
Report and reproducible test case by Jeff Squyres.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 16:07:50 +01:00
Ralf Wildenhues
92a785fd7e execute mode: do not transform *.lo or *.la arguments.
* libltdl/config/ltmain.m4sh (func_mode_execute): Do not check
arguments matching *.lo or *.la for script wrappers.
* tests/execute-mode.at (execute mode): Add tests.
* NEWS, THANKS: Update.
Report by Paul Biggar.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 15:00:10 +01:00
Ralf Wildenhues
a8bb7bd817 Nonexistent `main' does not guarantee link failure.
* tests/fail.at (Failure tests): Use an unresolved symbol,
rather than non-presence of `main', to provoke a link failure
also on QNX.  Only check for failure of the libtool script if
the link without libtool would have failed, too.
Report by Mike Gorchak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 11:40:42 +01:00
Ralf Wildenhues
5e43c14cc9 Use AT_CHECK more liberally in duplicate members test.
* tests/duplicate_members.at (duplicate members in archive
tests): Wrap link commands in AT_CHECK, they might fail, as seen
on QNX.
* THANKS: Update.
Report by Mike Gorchak.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-31 11:27:11 +01:00
Akim Demaille
13ef1b34b7 Fix func_exec_init.
* tests/defs.m4sh (func_exec_init): Instead of using the undefined
	my_dir, call func_dirname_and_basename and use its result.
	(func_make): For consistency, don't use the useless local variable
	my_dir.
2009-01-29 20:37:13 +01:00
Ralf Wildenhues
b93a3db892 Document --mode short-hands better, and test them.
* doc/libtool.texi (Invoking libtool): Give examples for using
the `--mode=MODE' short-hand `MODE', or abbreviations thereof.
* libltdl/config/ltmain.m4sh: Mention the short-hand for MODE
in the --help output.
* tests/help.at (mode short-hands): New test group.
Suggestion by Bruno Haible.
2009-01-29 19:55:19 +01:00
Ralf Wildenhues
18c603141e func_version copes with multi-line copyright headers.
* libltdl/config/getopt.m4sh (func_version): Slurp in copyright
lines until a period is found.
* libltdl/config/ltmain.m4sh: Multi-line copyright is ok to use
now.
* tests/help.at (standard command line options): New file, new
tests.  Make this test group the first one for libtool tests,
moving the banner ...
* tests/duplicate_members.at: ... from here.
* Makefile.am (TESTSUITE_AT): Add tests/help.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-29 18:53:13 +01:00
Akim Demaille
3e0beef8eb Normalize compiler output due to compiler wrappers.
* tests/testsuite.at (LT_AT_NORMALIZE_COMPILER_OUTPUT): New
macro, to normalize ccache and distcc output.
* tests/localization.at (localized compiler messages): Use it.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-29 18:39:58 +01:00
Peter Rosin
d356bfc32f Make modified libtool script in cwrapper test executable
* tests/cwrapper.at: Make modified libtool script executable.
Report by Roumen Petrov.
2009-01-29 08:55:08 +01:00
Charles Wilson
eaba16eb3a Add -Wall to cwrapper tests.
* tests/cwrapper.at: Add -Wall existing tests. Add additional
round of tests with -Wall alone.
2009-01-24 12:10:18 -05:00