Commit Graph

14 Commits

Author SHA1 Message Date
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Florian Weimer 47d8d9a217 support_quote_string: Do not use str parameter name
This avoids a build failure if this identifier is used as a macro
in a test.
2018-11-28 07:16:48 +01:00
Florian Weimer c74a91deaa support: Implement support_quote_string
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
2018-11-27 21:35:56 +01:00
Stefan Liebler e7624d708d Adjust name of ld.so in test-container.c.
The test-container.c file assumes that ld.so is always named
something like /elf/ld-linux-*.
But e.g. on s390x it is named ld64.so.1 or ld.so.1 on s390.
There are other architectures like power or mips with similar names.

This patch introduces the new global variable support_objdir_elf_ldso
which contains the absolute path to the runtime linker used by the
testsuite, e.g. OBJDIR_PATH/elf/ld-linux-x86-64.so.2.
The check in test-container.c is now comparing against this path.
Without this patch, test-container.c is searching invalid files / directories
and fails to find glibc/nss/tst-nss-test3.root/tst-nss-test3.script.
Then the test tst-nss-test3 fails!

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

ChangeLog:

	* support/support.h (support_objdir_elf_ldso): New variable.
	* support/support_paths.c (support_objdir_elf_ldso): Likewise.
	* support/Makefile (CFLAGS-support_paths.c): Add definition
	for OBJDIR_ELF_LDSO_PATH.
	* support/test-container.c (main): Search for the ld.so
	which is also used by the testsuite.
2018-10-04 13:07:29 +02:00
H.J. Lu 81b9d87bae test-container: Use xcopy_file_range for cross-device copy [BZ #23597]
copy_file_range can't be used to copy a file from glibc source directory
to glibc build directory since they may be on different filesystems.
This patch adds xcopy_file_range for cross-device copy.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	[BZ #23597]
	* support/Makefile (libsupport-routines): Add
	support_copy_file_range and xcopy_file_range.
	* support/support.h: Include <sys/types.h>.
	(support_copy_file_range): New prototype.
	* support/support_copy_file_range.c: New file.  Copied and
	modified from io/copy_file_range-compat.c.
	* support/test-container.c (copy_one_file): Call xcopy_file_rang
	instead of copy_file_range.
	* support/xcopy_file_range.c: New file.
	* support/xunistd.h (xcopy_file_range): New prototype.
2018-08-31 13:08:02 -07:00
DJ Delorie 561b0bec44 Add test-in-container infrastructure.
* Makefile (testroot.pristine): New rules to initialize the
test-in-container "testroot".
* Makerules (all-testsuite): Add tests-container.
* Rules (tests-expected): Add tests-container.
(binaries-all-tests): Likewise.
(tests-container): New, run these tests in the testroot container.
* support/Makefile (others): Add *-container, support_paths.c,
xmkdirp, and links-dso-program.
* support/links-dso-program-c.c: New.
* support/links-dso-program.cc: New.
* support/test-container.c: New.
* support/shell-container.c: New.
* support/echo-container.c: New.
* support/true-container.c: New.
* support/xmkdirp.c: New.
* support/xsymlink.c: New.
* support/support_paths.c: New.
* support/support.h: Add support paths prototypes.
* support/xunistd.h: Add xmkdirp () and xsymlink ().

* nss/tst-nss-test3.c: Convert to test-in-container.
* nss/tst-nss-test3.root/: New.
2018-08-22 21:20:37 -04:00
Florian Weimer aa42b3dbcb Avoid running some tests if the file system does not support holes
Otherwise, these tests fills up the entire disk (or just run very
slowly and eventually time out).
2018-08-21 12:56:53 +02:00
Florian Weimer 2afece36f6 support: Add TEST_COMPARE_BLOB, support_quote_blob
The declaration of support_test_compare_blob uses unsigned long int,
to avoid including <stddef.h>.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2018-05-16 17:00:36 +02:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Florian Weimer 1ffe1ccb6e support: Add xstrndup, xunlink, xreadlink, support_create_temp_directory 2017-11-12 09:53:06 +01:00
Florian Weimer 2714c5f3c9 resolv: Tests for various versions of res_init 2017-06-02 15:50:36 +02:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Florian Weimer 5840c75c2d resolv: Add beginnings of a libresolv test suite 2016-12-31 18:52:32 +01:00
Florian Weimer c23de0aacb support: Introduce new subdirectory for test infrastructure
The new test driver in <support/test-driver.c> has feature parity with
the old one.  The main difference is that its hooking mechanism is
based on functions and function pointers instead of macros.  This
commit also implements a new environment variable, TEST_COREDUMPS,
which disables the code which disables coredumps (that is, it enables
them if the invocation environment has not disabled them).

<test-skeleton.c> defines wrapper functions so that it is possible to
use existing macros with the new-style hook functionality.

This commit changes only a few test cases to the new test driver, to
make sure that it works as expected.
2016-12-09 08:18:27 +01:00