public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Report DejaGnu ERROR messages in dg-extract-results
@ 2016-09-20 10:03 Christophe Lyon
  2016-09-20 14:57 ` Jeff Law
  2016-09-23 11:54 ` Rainer Orth
  0 siblings, 2 replies; 4+ messages in thread
From: Christophe Lyon @ 2016-09-20 10:03 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

Hello,

We recently faced a problem where a DejaGnu error went un-noticed
(https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01879.html).

To help identify these problems earlier, here is a patch for
dg-extract-results that makes such error obvious in the final summary:

                === gcc Summary ===

# of DejaGnu errors             1
# of expected passes            104885
# of unexpected failures        43
# of unexpected successes       2
# of expected failures          276
# of unsupported tests          2284


OK?

Thanks,

Christophe

[-- Attachment #2: dejagnu-error-extract.log.txt --]
[-- Type: text/plain, Size: 186 bytes --]

contrib/ChangeLog:

2016-09-20  Christophe Lyon  <christophe.lyon@linaro.org>

	* dg-extract-results.py: Report DejaGnu error in the final
	summary.
	* dg-extract-results.sh: Likewise.


[-- Attachment #3: dejagnu-error-extract.patch.txt --]
[-- Type: text/plain, Size: 4130 bytes --]

diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 7db5e64..4b02a5b 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -134,6 +134,7 @@ class Prog:
         self.end_line = None
         # Known summary types.
         self.count_names = [
+            '# of DejaGnu errors\t\t',
             '# of expected passes\t\t',
             '# of unexpected failures\t',
             '# of unexpected successes\t',
@@ -245,6 +246,10 @@ class Prog:
             segment = Segment (filename, file.tell())
             variation.header = segment
 
+        # Parse the rest of the summary (the '# of ' lines).
+        if len (variation.counts) == 0:
+            variation.counts = self.zero_counts()
+
         # Parse up until the first line of the summary.
         if num_variations == 1:
             end = '\t\t=== ' + tool.name + ' Summary ===\n'
@@ -291,6 +296,11 @@ class Prog:
                 harness.results.append ((key, line))
                 if not first_key and sort_logs:
                     first_key = key
+                if line.startswith ('ERROR: (DejaGnu)'):
+                    for i in range (len (self.count_names)):
+                        if 'DejaGnu errors' in self.count_names[i]:
+                            variation.counts[i] += 1
+                            break
 
             # 'Using ...' lines are only interesting in a header.  Splitting
             # the test up into parallel runs leads to more 'Using ...' lines
@@ -309,9 +319,6 @@ class Prog:
             segment.lines -= final_using
             harness.add_segment (first_key, segment)
 
-        # Parse the rest of the summary (the '# of ' lines).
-        if len (variation.counts) == 0:
-            variation.counts = self.zero_counts()
         while True:
             before = file.tell()
             line = file.readline()
diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
index 5a8e67e..519d49c 100755
--- a/contrib/dg-extract-results.sh
+++ b/contrib/dg-extract-results.sh
@@ -369,10 +369,11 @@ EOF
 BEGIN {
   variant="$VAR"
   tool="$TOOL"
-  passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0;
+  passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0;
   curvar=""; insummary=0
 }
 /^Running target /		{ curvar = \$3; next }
+/^ERROR: \(DejaGnu\)/		{ if (variant == curvar) dgerrorcnt += 1 }
 /^# of /			{ if (variant == curvar) insummary = 1 }
 /^# of expected passes/		{ if (insummary == 1) passcnt += \$5; next; }
 /^# of unexpected successes/	{ if (insummary == 1) xpasscnt += \$5; next; }
@@ -390,6 +391,7 @@ BEGIN {
 { next }
 END {
   printf ("\t\t=== %s Summary for %s ===\n\n", tool, variant)
+  if (dgerrorcnt != 0) printf ("# of DejaGnu errors\t\t%d\n", dgerrorcnt)
   if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
   if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
   if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
@@ -419,8 +421,9 @@ TOTAL_AWK=${TMP}/total.awk
 cat << EOF > $TOTAL_AWK
 BEGIN {
   tool="$TOOL"
-  passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0
+  passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0
 }
+/^# of DejaGnu errors/		{ dgerrorcnt += \$5 }
 /^# of expected passes/		{ passcnt += \$5 }
 /^# of unexpected failures/	{ failcnt += \$5 }
 /^# of unexpected successes/	{ xpasscnt += \$5 }
@@ -431,7 +434,8 @@ BEGIN {
 /^# of unresolved testcases/	{ unrescnt += \$5 }
 /^# of unsupported tests/	{ unsupcnt += \$5 }
 END {
-  printf ("\n\t\t=== %s Summary ===\n\n", tool)
+  printf ("\n\t\t=== %s MySummary ===\n\n", tool)
+  if (dgerrorcnt != 0) printf ("# of DejaGnu errors\t\t%d\n", dgerrorcnt)
   if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
   if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
   if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Report DejaGnu ERROR messages in dg-extract-results
  2016-09-20 10:03 Report DejaGnu ERROR messages in dg-extract-results Christophe Lyon
@ 2016-09-20 14:57 ` Jeff Law
  2016-09-23 11:54 ` Rainer Orth
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Law @ 2016-09-20 14:57 UTC (permalink / raw)
  To: Christophe Lyon, gcc-patches

On 09/20/2016 03:26 AM, Christophe Lyon wrote:
> Hello,
>
> We recently faced a problem where a DejaGnu error went un-noticed
> (https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01879.html).
>
> To help identify these problems earlier, here is a patch for
> dg-extract-results that makes such error obvious in the final summary:
>
>                 === gcc Summary ===
>
> # of DejaGnu errors             1
> # of expected passes            104885
> # of unexpected failures        43
> # of unexpected successes       2
> # of expected failures          276
> # of unsupported tests          2284
>
>
> OK?
OK.
jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Report DejaGnu ERROR messages in dg-extract-results
  2016-09-20 10:03 Report DejaGnu ERROR messages in dg-extract-results Christophe Lyon
  2016-09-20 14:57 ` Jeff Law
@ 2016-09-23 11:54 ` Rainer Orth
  2016-09-24  5:46   ` Christophe Lyon
  1 sibling, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2016-09-23 11:54 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

Hi Christophe,

> We recently faced a problem where a DejaGnu error went un-noticed
> (https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01879.html).

I just noticed that your patch contained an unrelated and bogus change,
reverted as follows.  This will only show up on targets that lack (a
sufficiently recent version of) python, Solaris 10 in my case.

	Rainer


2016-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* dg-extract-results.sh: Revert bogus change.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dge.patch --]
[-- Type: text/x-patch, Size: 596 bytes --]

diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
--- a/contrib/dg-extract-results.sh
+++ b/contrib/dg-extract-results.sh
@@ -434,7 +434,7 @@ BEGIN {
 /^# of unresolved testcases/	{ unrescnt += \$5 }
 /^# of unsupported tests/	{ unsupcnt += \$5 }
 END {
-  printf ("\n\t\t=== %s MySummary ===\n\n", tool)
+  printf ("\n\t\t=== %s Summary ===\n\n", tool)
   if (dgerrorcnt != 0) printf ("# of DejaGnu errors\t\t%d\n", dgerrorcnt)
   if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
   if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Report DejaGnu ERROR messages in dg-extract-results
  2016-09-23 11:54 ` Rainer Orth
@ 2016-09-24  5:46   ` Christophe Lyon
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe Lyon @ 2016-09-24  5:46 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

On 23 September 2016 at 13:37, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> Hi Christophe,
>
>> We recently faced a problem where a DejaGnu error went un-noticed
>> (https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01879.html).
>
> I just noticed that your patch contained an unrelated and bogus change,
> reverted as follows.  This will only show up on targets that lack (a
> sufficiently recent version of) python, Solaris 10 in my case.
>

Oops sorry, it was debug code I forgot to remove.

Thanks!

>         Rainer
>
>
> 2016-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>         * dg-extract-results.sh: Revert bogus change.
>
>
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-24  2:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 10:03 Report DejaGnu ERROR messages in dg-extract-results Christophe Lyon
2016-09-20 14:57 ` Jeff Law
2016-09-23 11:54 ` Rainer Orth
2016-09-24  5:46   ` Christophe Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).