public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* patch testsuite - verbose logging
@ 2022-07-06 17:25 Frank Ch. Eigler
  2022-07-12 13:49 ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2022-07-06 17:25 UTC (permalink / raw)
  To: dwz

Hi -

The following patch puts "sh -x" tracing data into the dwz.log file.
Accidentally, this makes debuginfod-involving tests pass, since their
stderr DEBUGINFOD_PRGRESS traffic show up in stdout rather than stderr
(which is recorded as a fail).

diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index 811767f57918..73fe73716302 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -116,7 +116,8 @@ foreach test $tests {
     exec mkdir $dir
 
     cd $dir
-    if { [catch { exec sh -e $test } msg] } {
+    if { [catch { exec sh -x -e $test 2>@ stdout } msg] } {
+        verbose -log "$msg"
 	if { [lindex $::errorCode 0] == "CHILDSTATUS" && \
 		 [lindex $::errorCode 2] == 77 } {
 	    unsupported "$test"
@@ -126,6 +127,7 @@ foreach test $tests {
 	    fail "$test"
 	}
     } else {
+        verbose -log "$msg"
 	if { [file exists dwz.info ] } {
 	    set info [exec cat dwz.info]
 	    verbose -log "$test:" 1

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

* Re: patch testsuite - verbose logging
  2022-07-06 17:25 patch testsuite - verbose logging Frank Ch. Eigler
@ 2022-07-12 13:49 ` Mark Wielaard
  2022-07-12 14:09   ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2022-07-12 13:49 UTC (permalink / raw)
  To: Frank Ch. Eigler, dwz

Hi Frank,

On Wed, 2022-07-06 at 13:25 -0400, Frank Ch. Eigler via Dwz wrote:
> The following patch puts "sh -x" tracing data into the dwz.log file.

I agree it would be good to have a bit more information in the dwz.log
file. But -x is very verbose. I might get lost. But maybe others think
it is fine. I am not against it. But I think just capturing stdout and
verbose log it is fine. We can add some extra echos in the tests.

> Accidentally, this makes debuginfod-involving tests pass, since their
> stderr DEBUGINFOD_PRGRESS traffic show up in stdout rather than
> stderr
> (which is recorded as a fail).

I think that is a reason to not do the 2>@ redirection.
We did recently find an issue with gdb-add-index because it had error
output. And I think we would like to know if the tests accidentially
triggered debuginfod because that really isn't supposed to happen. So
if it does I think we want the testcase to fail so we can investigate
why debuginfod is trying to fetch something when it shouldn't.

Cheers,

Mark

> diff --git a/testsuite/dwz.tests/dwz-tests.exp
> b/testsuite/dwz.tests/dwz-tests.exp
> index 811767f57918..73fe73716302 100644
> --- a/testsuite/dwz.tests/dwz-tests.exp
> +++ b/testsuite/dwz.tests/dwz-tests.exp
> @@ -116,7 +116,8 @@ foreach test $tests {
>      exec mkdir $dir
>  
>      cd $dir
> -    if { [catch { exec sh -e $test } msg] } {
> +    if { [catch { exec sh -x -e $test 2>@ stdout } msg] } {
> +        verbose -log "$msg"
>  	if { [lindex $::errorCode 0] == "CHILDSTATUS" && \
>  		 [lindex $::errorCode 2] == 77 } {
>  	    unsupported "$test"
> @@ -126,6 +127,7 @@ foreach test $tests {
>  	    fail "$test"
>  	}
>      } else {
> +        verbose -log "$msg"
>  	if { [file exists dwz.info ] } {
>  	    set info [exec cat dwz.info]
>  	    verbose -log "$test:" 1

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

* Re: patch testsuite - verbose logging
  2022-07-12 13:49 ` Mark Wielaard
@ 2022-07-12 14:09   ` Frank Ch. Eigler
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2022-07-12 14:09 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: dwz

Hi -

> I agree it would be good to have a bit more information in the dwz.log
> file. But -x is very verbose. I might get lost. But maybe others think
> it is fine. I am not against it. But I think just capturing stdout and
> verbose log it is fine. We can add some extra echos in the tests.

There is no 'verbose log' content in the .log file possible at the
present in the sense of RUNTESTFLAGS=-v.  These log files are for
helping someone debug failing tests, so normally one does not need to
look at them, let alone get lost.

> > Accidentally, this makes debuginfod-involving tests pass, since their
> > stderr DEBUGINFOD_PRGRESS traffic show up in stdout rather than
> > stderr (which is recorded as a fail).
> 
> I think that is a reason to not do the 2>@ redirection.
> We did recently find an issue with gdb-add-index because it had error
> output.  And I think we would like to know if the tests accidentially
> triggered debuginfod [...]

A simpler cure to that is to have the testuite makefile driver unset
$DEBUGINFOD_URLS before invoking dejagnu.

- FChE

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

end of thread, other threads:[~2022-07-12 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 17:25 patch testsuite - verbose logging Frank Ch. Eigler
2022-07-12 13:49 ` Mark Wielaard
2022-07-12 14:09   ` Frank Ch. Eigler

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).