[Bug testsuite/83909] New: Make doesn't report TCL errors in summary
lkrupp at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 16 22:53:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83909
Bug ID: 83909
Summary: Make doesn't report TCL errors in summary
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: lkrupp at gcc dot gnu.org
Target Milestone: ---
This test case in gfortran.dg:
! { dg-do compile }
xxx { dg-error "\\(CLASS)" }
triggers these messages when I run make -j 8 check-fortran:
ERROR: tcl error sourcing
/home/louis/gcc_trunk/gcc/testsuite/gfortran.dg/dg.exp.
ERROR: couldn't compile regular expression pattern: parentheses () not balanced
while executing
"regsub -all "(^|\n)(\[^\n\]+$line\[^\n\]*($pattern)\[^\n\]*\n?)+" $comp_output
"\n" comp_output"
(procedure "saved-dg-test" line 125)
invoked from within
"saved-dg-test /home/louis/gcc_trunk/gcc/testsuite/gfortran.dg/000bad.f90 { -O
} { -pedantic-errors}"
("eval" body line 1)
...
but the messages are buried in the output from Make, and there's no indication
in the test summary (# of passes, failures, etc) that there's been a problem.
The issue seems to be that runtest exits with an error but it runs in a
subprocess, it's followed by successful commands, and the error is never
propagated back to Make.
This patch terminates the action process tree with extreme prejudice and makes
it much more obvious that something has gone wrong:
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 256719)
+++ gcc/Makefile.in (working copy)
@@ -4078,7 +4078,7 @@ check-parallel-% : site.exp
TCL_LIBRARY=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}`
; \
export TCL_LIBRARY ; \
fi ; \
- $(RUNTEST) --tool $(check_p_tool) $(RUNTESTFLAGS); \
+ $(RUNTEST) --tool $(check_p_tool) $(RUNTESTFLAGS) || kill 0; \
if [ -n "$$GCC_RUNTEST_PARALLELIZE_DIR" ] ; then \
touch $${rootme}/$(TESTSUITEDIR)/$(check_p_tool)-parallel/finished;
\
fi ; \
Make's final words look something like this:
make[2]: [Makefile:4083: check-parallel-gfortran] Terminated (ignored)
make[2]: [Makefile:4083: check-parallel-gfortran_6] Terminated (ignored)
got a TERM signal, terminated
I would not be surprised if there were a kinder, gentler way of dealing with
this.
More information about the Gcc-bugs
mailing list