diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-12-15 22:37:17 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-12-15 22:37:17 +0000 |
commit | 95511aab9d5202470b90530e83d18a6f4b4aeb6b (patch) | |
tree | 79e43f217bfe2858a0df4511a048fa3ddaec274a /io | |
parent | a7e3edf4f252fb72afeb8ecca946a2d8294bb577 (diff) | |
download | glibc-95511aab9d5202470b90530e83d18a6f4b4aeb6b.tar glibc-95511aab9d5202470b90530e83d18a6f4b4aeb6b.tar.gz glibc-95511aab9d5202470b90530e83d18a6f4b4aeb6b.tar.bz2 glibc-95511aab9d5202470b90530e83d18a6f4b4aeb6b.zip |
Fix testing with read-only source directory.
Three tests fail with a read-only source directory because they try to
write into the source directory. None of these write into it in a way
that should actually be problematic for concurrent builds sharing the
same writable source directory, but avoiding any writing into the
source directory (from testing, or from building glibc if the source
timestamps are properly ordered) is still a good idea, as being able
to build with read-only sources helps make sure there isn't anything
that could cause problems for concurrent builds.
This patch changes the tests in question to use either /tmp or the
build directory to write their temporary files (or to test O_TMPFILE,
as applicable).
Tested for x86_64.
* io/Makefile (tst-open-tmpfile-ARGS): New variable.
* posix/tst-mmap-offset.c (fname): Use /tmp.
* stdlib/tst-setcontext3.sh (tempfile): Use ${objpfx}.
Diffstat (limited to 'io')
-rw-r--r-- | io/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io/Makefile b/io/Makefile index b3ee5ae647..c72519541f 100644 --- a/io/Makefile +++ b/io/Makefile @@ -109,6 +109,8 @@ test-stat2-ARGS = Makefile . $(objpfx)test-stat2 tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp +tst-open-tmpfile-ARGS = --test-dir=$(objpfx) + ifeq ($(run-built-tests),yes) $(objpfx)ftwtest.out: ftwtest-sh $(objpfx)ftwtest $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \ |