This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: contrib/repro_fail: filter out "-ignore SIGHUP" from spawn line
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 06 May 2013 12:02:03 -0400
- Subject: Re: PATCH: contrib/repro_fail: filter out "-ignore SIGHUP" from spawn line
- References: <1366907428 dot 13869 dot 28 dot camel at surprise> <51796B25 dot 1020908 at google dot com> <1366913420 dot 13869 dot 33 dot camel at surprise>
On Thu, 2013-04-25 at 14:10 -0400, David Malcolm wrote:
> On Thu, 2013-04-25 at 13:43 -0400, Diego Novillo wrote:
> > On 2013-04-25 12:30 , David Malcolm wrote:
> >
> > > diff --git a/contrib/ChangeLog b/contrib/ChangeLog
> > > index 9f4505b..01afcb5 100644
> > > --- a/contrib/ChangeLog
> > > +++ b/contrib/ChangeLog
> > > @@ -1,3 +1,7 @@
> > > +2013-04-25 David Malcolm <dmalcolm@redhat.com>
> > > +
> > > + * repro_fail: filter out "-ignore SIGHUP" from the spawn lines
> > > +
> >
> > This is OK, thanks. It works with the regular spawn lines too, right?
> > (looks like it should).
>
> All of the spawn lines in my.log files have the "-ignore SIGHUP", so I
> hand-edited some to remove that part, and it does indeed work on such
> lines.
BTW, I don't have commit rights to GCC (am reattaching the patch for
convenience)
[I believe the copyright assignment requirements are covered by an
agreement the FSF has with my employer (Red Hat)]
FWIW the "-ignore SIGHUP" I ran into appears to come from a patch
applied downstream in Fedora packages of DejaGnu [1], but which appears
to be effectively the same as one that's in DejaGnu git (albeit not yet
within a released tarball):
http://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=commitdiff;h=50a378f626fcdbaf30202a36bf73738de08a53bf
2011-03-15 H.J. Lu <hjl.tools@gmail.com>
* lib/remote.exp (local_exec): Ignore SIGHUP.
so if I'm reading this right, any attempt to run repro_fail by someone
using a git build of dejagnu needs the patch.
Hope this is helpful
Dave
[1]
http://pkgs.fedoraproject.org/cgit/dejagnu.git/diff/dejagnu-1.5-smp-1.patch?h=f17&id=0c9228fc0093b3de82defbd8de02a65d4ae5f526
commit 86cdd0c0c76cbe0feb169de7ba0c48c5bc13b845
Author: David Malcolm <dmalcolm@redhat.com>
Date: Tue Apr 30 17:17:05 2013 -0400
repro_fail: filter out "-ignore SIGHUP" from the spawn lines
2013-04-25 David Malcolm <dmalcolm@redhat.com>
* repro_fail: filter out "-ignore SIGHUP" from the spawn lines
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 48db27b..6cc7e82 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-25 David Malcolm <dmalcolm@redhat.com>
+
+ * repro_fail: filter out "-ignore SIGHUP" from the spawn lines
+
2013-04-22 Sofiane Naci <sofiane.naci@arm.com>
* config-list.mk (LIST): Add aarch64-elf and aarch64-linux-gnu.
diff --git a/contrib/repro_fail b/contrib/repro_fail
index b28a712..9ea79f2 100755
--- a/contrib/repro_fail
+++ b/contrib/repro_fail
@@ -4,7 +4,7 @@
#
# Contributed by Diego Novillo <dnovillo@google.com>
#
-# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -56,7 +56,9 @@ logf="$2"
shift 2
# Find the commands in LOGF that reference PATTERN.
-lines=$(grep -E "^spawn .*$pattern" $logf | sed -e 's/^spawn //')
+lines=$(grep -E "^spawn .*$pattern" $logf \
+ | sed -e 's/^spawn -ignore SIGHUP //' \
+ | sed -e 's/^spawn //')
if [ -z "$lines" ] ; then
echo "Could not find a spawn command for pattern $pattern"
exit 1