This is the mail archive of the gcc@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]

Re: Need some Unix and /bin/sh expertise for GCC testsuite


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




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