This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Workaround for NFS issue when using cross-test-ssh.sh


This is a followup to the email I sent out about issues I was having testing
on a remote machine with NFS and using cross-test-ssh.sh.

	https://sourceware.org/ml/libc-alpha/2016-02/msg00270.html

The problem is that a directory and a file (in that directory) are created
on the remote machine where tests are being run and then that file is being
accessed on the host machine where make is being run and the file is not
being seen on the host machine.  I found that if I touch the directory that
the new directory was created in before accessing the file I want, the problem
does not occur.

I would love to explain exactly why this is, but I don't know.  I am guessing
that it is some bug or limitation in NFS, possibly in the specific version
of NFS I am using but I really don't know.  Nevertheless, I was hoping I
could check in this patch since it fixes the problem for me and should not
cause any other users any problems and it would make it much easier for us
to run the glibc testsuite in our setup if this patch was in the glibc sources.

Tested by running the glibc testsuite on an x86 linux box, using
cross-test-ssh.sh to run programs on a MIPS box.

What say thee?

Steve Ellcey
sellcey@imgtec.com


2016-02-12  Steve Ellcey  <sellcey@imgtec.com>

 	* localedata/gen-locale.sh (generate_locale): Touch directory before
	touching file.
	* timezone/Makefile: Ditto.


diff --git a/localedata/gen-locale.sh b/localedata/gen-locale.sh
index d471086..8b22feb 100644
--- a/localedata/gen-locale.sh
+++ b/localedata/gen-locale.sh
@@ -37,6 +37,12 @@ generate_locale ()
     # The makefile checks the timestamp of the LC_CTYPE file,
     # but localedef won't have touched it if it was able to
     # hard-link it to an existing file.
+    #
+    # Touching the localedata directory, which may have been
+    # created on a remote system, before touching the LC_CTYPE
+    # file works around an NFS issue that can affect some systems
+    # when cross-testing.
+    touch ${common_objpfx}localedata
     touch ${common_objpfx}localedata/$out/LC_CTYPE
   else
     echo "Charmap: \"${charmap}\" Inputfile: \"${input}\"" \
diff --git a/timezone/Makefile b/timezone/Makefile
index dee7568..5cdb5ca 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -70,8 +70,14 @@ CFLAGS-zic.c = $(tz-cflags) -Wno-unused-variable
 # We have to make sure the data for testing the tz functions is available.
 # Don't add leapseconds here since test-tz made checks that work only without
 # leapseconds.
+#
+# Touching the testdata directory, which may have been created on a remote
+# system, before accessing the results in $(evaluate-test) works around an
+# NFS issue that can affect some systems when cross-testing.
+
 define build-testdata
 $(built-program-cmd) -d $(testdata) -y ./yearistype $<; \
+touch $(testdata)
 $(evaluate-test)
 endef
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]