From patchwork Fri Feb 12 22:12:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 582312 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F06B140B97 for ; Sat, 13 Feb 2016 09:12:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=R2T2lNRh; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=uU5K6 L8gQiBqL/irNuhxTpFoVwJKp/uMND8FryCsdjQOMmKRo+lxOMDcXr6sL/kc5DqJ8 hqBr/JJp8yubx5dBcgAxJRaFJlAFOa/N5b/ZFGetg0a0ps5qlNTqvOK5WHK0sEzC wBKGdFtalPyZzN1vEbbJVnQDH1qGHJeLRapgIc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=itwu7dxSrpe XoAxvjctnbZChMKQ=; b=R2T2lNRhdbimieDwipxa4Ejr+3Tvo92b+aP4Auo0I3I vZxIgSuPu/8Sf5fmeIxZHcNbVYm6jWFe9nrGCNp+nESN65JMIf+Z9VqHXnWqY/Ek Q0I7RogMcOUzOht+SZ1KAm9YOviGkM8fR15g5SPoAh8QT72sESzithD4bzYyjUro = Received: (qmail 59455 invoked by alias); 12 Feb 2016 22:12:50 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 59433 invoked by uid 89); 12 Feb 2016 22:12:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Workaround, Touch, 37, 6, Hx-languages-length:2841 X-HELO: mailapp01.imgtec.com From: "Steve Ellcey " Date: Fri, 12 Feb 2016 14:12:41 -0800 To: Subject: [Patch] Workaround for NFS issue when using cross-test-ssh.sh User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: <87ed1335-2bf5-4446-a313-15bf7b959246@BAMAIL02.ba.imgtec.org> 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 * 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