This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Work around remote host testing shared filesystem issue


In practice, remote host testing requires a shared filesystem between
the build and host systems.  (There's some code to copy files between
build and host when they differ, but it's very incomplete, whereas
testing with a shared filesystem mostly works.)

In practice, shared filesystems do not provide a perfectly
synchronised view between both hosts at all time, or if caching
settings are conservative enough that they do then they are unusably
slow.

In particular, one problem I've sometimes observed in remote host
testing is the host not noticing the deletion of a file removed on the
build system, leading to confusion when it tries to create another
file of the same name moments later.

This patch, although in theory it shouldn't be needed, makes remote
host testing more reliable in practice by deleting files on the host
when doing so on the build system.  Comments?  OK to commit?

2008-07-02  Joseph Myers  <joseph@codesourcery.com>

	* lib/gcc-dg.exp (remove-build-file): Remove files on remote host
	as well as on build.

Index: lib/gcc-dg.exp
===================================================================
--- lib/gcc-dg.exp	(revision 137393)
+++ lib/gcc-dg.exp	(working copy)
@@ -354,6 +354,11 @@
     set file_list "[glob -nocomplain $pat]"
     verbose "remove-build-file `$file_list'" 2
     foreach output_file $file_list {
+	if [is_remote host] {
+	    # Ensure the host knows the file is gone by deleting there
+	    # first.
+	    remote_file host delete $output_file
+	}
 	remote_file build delete $output_file
     }
 }

-- 
Joseph S. Myers
joseph@codesourcery.com


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