automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Improve and extend test cond5.test.


From: Stefano Lattarini
Subject: Re: [PATCH] Improve and extend test cond5.test.
Date: Thu, 24 Jun 2010 23:15:22 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

At Thursday 24 June 2010, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Thu, Jun 24, 2010 at 10:32:02PM CEST:
> > At Thursday 24 June 2010, Ralf Wildenhues wrote:
> > >  Do you have an old system?
> >
> > Well, it's not new :-)
> >
> > $ cat /proc/cpuinfo
> > model name      : AMD Athlon(tm) XP 1800+
> >
> > $ free | awk '(NR == 2) { print $2 }'
> > 774904
> 
> Hehe.
> model name      : Intel(R) Pentium(R) M processor 1.80GHz
> 1035964
> 
> The RAM upgrade helped wonders.
Tell me about it.  My original RAM size was 256Mb  :-)

> >
> > I think that the possibility of a spurious failure here is very
> > very low.  But I might be wrong, and it would fine by me having,
> > say, 100 tries every 3 seconds instead of 30 tries every 10
> > seconds.  Your call.
> 
> Just to avoid a possible misunderstanding here: the issue I want to
> avoid is that we kill an unrelated process due to PID reuse.
> That would be ugly.
Oops.  You're right.

A test-specific wrapper script migth help here, e.g.:

  cat >foo.sh <<END
  #!/bin/sh
  : > witness
  $AUTOMAKE 2>stderr &
  pid=$!
  echo $pid > witness
  wait $pid
  rc=$?
  rm -f witness
  exit $?
  END

Then we use "$SHELL foo.sh &" instead of "$AUTOMAKE &" and
"test -f witness" instead of "kill -0 $pid".  If automake seems to 
hang, we do "kill `cat witness`", which should eliminate (or extremely 
reduce) any race condition.  Do you think it would be worth the 
hassle?

Regards,
    Stefano



reply via email to

[Prev in Thread] Current Thread [Next in Thread]