From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10772 invoked by alias); 15 Aug 2009 07:31:44 -0000 Received: (qmail 10691 invoked by uid 22791); 15 Aug 2009 07:31:42 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp22.services.sfr.fr (HELO smtp22.services.sfr.fr) (93.17.128.11) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 15 Aug 2009 07:31:37 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2223.sfr.fr (SMTP Server) with ESMTP id 6D63F7000087; Sat, 15 Aug 2009 09:31:34 +0200 (CEST) Received: from [192.168.1.101] (197.156.90-79.rev.gaoland.net [79.90.156.197]) by msfrf2223.sfr.fr (SMTP Server) with ESMTP id DA8827000084; Sat, 15 Aug 2009 09:31:33 +0200 (CEST) X-SFR-UUID: 20090815073133895.DA8827000084@msfrf2223.sfr.fr Subject: Re: Need some Unix and /bin/sh expertise for GCC testsuite From: Laurent GUERBY Reply-To: laurent@guerby.net To: Ralf Wildenhues Cc: gcc , Paolo Bonzini , Arnaud Charlet , Eric Botcazou , Dave Korn In-Reply-To: <20090815055330.GA30643@gmx.de> References: <1250283155.20287.116.camel@localhost> <20090814212503.GA1032@gmx.de> <1250285509.20287.129.camel@localhost> <20090815055330.GA30643@gmx.de> Content-Type: text/plain Date: Sat, 15 Aug 2009 14:12:00 -0000 Message-Id: <1250321492.20287.157.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00258.txt.bz2 On Sat, 2009-08-15 at 07:53 +0200, Ralf Wildenhues wrote: > > > * Laurent GUERBY wrote on Fri, Aug 14, 2009 at 10:52:35PM CEST: > > > > => gcc/testsuite/ada/acats/run_all.sh > > > > > > > 3/ Here is the point I find surprising: the "ps fauxww" run in the > > > > second "if" show that even if the script is fully sequential > > > > at least one gnatmake subprocess (collect-ld) is still marked as running > > > > *in parallel* with the ps command in the subsequent "if" of the script! > > Sounds like http://thread.gmane.org/gmane.comp.shells.bash.bugs/11990 > and the NEWS for bash-3.2 contains this entry: > > l. Several fixes to the code that manages the list of terminated jobs and > their exit statuses, and the list of active and recently-terminated jobs > to avoid pid aliasing/wraparound and allocation errors. > > I'd try out a newer bash version. Good catch! The script shown in the discussion is just like mine and the order of magnitude of occurrence is the same. Since upgrading bash will not be an option for everyone, I will propose a patch that "sleep" a bit if gnatmake succeeds and the executable is still not present or empty, I'm testing: # workaround bash process management bug trycount=0 while [ $trycount -le 30 ]; do trycount=$(expr $trycount + 1) if [ -s $dir/tests/$chapter/$i/$binmain -a -x $dir/tests/$chapter/$i/$binmain ]; then break else sleep 1 fi done Thanks again for your help, Laurent