From 95511aab9d5202470b90530e83d18a6f4b4aeb6b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 15 Dec 2017 22:37:17 +0000 Subject: 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}. --- posix/tst-mmap-offset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'posix') diff --git a/posix/tst-mmap-offset.c b/posix/tst-mmap-offset.c index 5bb88aab10..5e940c8d95 100644 --- a/posix/tst-mmap-offset.c +++ b/posix/tst-mmap-offset.c @@ -29,7 +29,7 @@ static int fd; static long int page_shift; -static char fname[] = "tst-mmap-offset-XXXXXX"; +static char fname[] = "/tmp/tst-mmap-offset-XXXXXX"; static void do_prepare (int argc, char **argv) -- cgit v1.2.3