Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: [patch] Racy FAIL: gdb.base/auxv.exp + gdb.base/callfuncs.exp 	[Re: [patch/rfc] Recognize non-DW_AT_location <value optimized out> 	symbols]
Date: Fri, 20 Mar 2009 18:51:00 -0000	[thread overview]
Message-ID: <20090320183838.GA8318@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20090320182215.GC12530@adacore.com>

On Fri, 20 Mar 2009 19:22:15 +0100, Joel Brobecker wrote:
> That fixes the C++ problem, and I was fairly confident about it

Thanks for the analysis, going to check more the pros/cons of your patch.


> but a testcase run seems to indicate the following regressions:
> 
> +------------+------------+----------------------------------------------------+
> |       PASS | FAIL       | callfuncs.exp: gdb function calls preserve reg ... |
> |            |            | ... ister contents                                 |
> |       PASS | FAIL       | callfuncs.exp: continue after stop in call dum ... |
> |            |            | ... my preserves register contents                 |
> |       PASS | FAIL       | callfuncs.exp: finish after stop in call dummy ... |
> |            |            | ...  preserves register contents                   |
> |       PASS | FAIL       | callfuncs.exp: return after stop in call dummy ... |
> |            |            | ...  preserves register contents                   |
> |       PASS | FAIL       | callfuncs.exp: nested call dummies preserve re ... |
> |            |            | ... gister contents                                |
> +------------+------------+----------------------------------------------------+

Is the attached testsuite fix from
  http://cvs.fedora.redhat.com/viewvc/rpms/gdb/devel/gdb-6.7-testsuite-stable-results.patch?revision=1.6
OK to check-in?


Thanks,
Jan


gdb/testsuite/
2009-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix a racy FAIL.
	* gdb.base/auxv.exp (fetch_auxv): Fix trailing newlines consumption.
	* gdb.base/callfuncs.exp (fetch_all_registers): Likewise.

--- ./gdb/testsuite/gdb.base/auxv.exp	2009-02-11 00:54:54.000000000 +0100
+++ ./gdb/testsuite/gdb.base/auxv.exp	2009-02-11 00:51:30.000000000 +0100
@@ -78,8 +78,10 @@ proc fetch_auxv {test} {
 
     set auxv_lines {}
     set bad -1
+    # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer
+    # corrupting the next matches.
     if {[gdb_test_multiple "info auxv" $test {
-	-re "info auxv\[\r\n\]+" {
+	-re "info auxv\r\n" {
 	    exp_continue
 	}
 	-ex "The program has no auxiliary information now" {
@@ -94,20 +96,20 @@ proc fetch_auxv {test} {
 	    set bad 1
 	    exp_continue
 	}
-	-re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\[\r\n\]+" {
+	-re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\r\n" {
 	    lappend auxv_lines $expect_out(0,string)
 	    exp_continue
 	}
-	-re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\[\r\n\]+" {
+	-re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\r\n" {
 	    warning "Unrecognized tag value: $expect_out(0,string)"
 	    set bad 1
 	    lappend auxv_lines $expect_out(0,string)
 	    exp_continue
 	}
-	-re ".*$gdb_prompt $" {
+	-re "$gdb_prompt $" {
 	    incr bad
 	}
-	-re "^\[^\r\n\]+\[\r\n\]+" {
+	-re "^\[^\r\n\]+\r\n" {
 	    if {!$bad} {
 		warning "Unrecognized output: $expect_out(0,string)"
 		set bad 1
--- ./gdb/testsuite/gdb.base/callfuncs.exp	2009-01-03 06:58:03.000000000 +0100
+++ ./gdb/testsuite/gdb.base/callfuncs.exp	2009-02-11 00:51:42.000000000 +0100
@@ -249,15 +249,17 @@ proc fetch_all_registers {test} {
 
     set all_registers_lines {}
     set bad -1
+    # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer
+    # corrupting the next matches.
     if {[gdb_test_multiple "info all-registers" $test {
-	-re "info all-registers\[\r\n\]+" {
+	-re "info all-registers\r\n" {
 	    exp_continue
 	}
 	-ex "The program has no registers now" {
 	    set bad 1
 	    exp_continue
 	}
-	-re "^bspstore\[ \t\]+\[^\r\n\]+\[\r\n\]+" {
+	-re "^bspstore\[ \t\]+\[^\r\n\]+\r\n" {
 	    if [istarget "ia64-*-*"] {
 		# Filter out bspstore which is specially tied to bsp,
 		# giving spurious differences.
@@ -266,14 +268,14 @@ proc fetch_all_registers {test} {
 	    }
 	    exp_continue
 	}
-	-re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\[\r\n\]+" {
+	-re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\r\n" {
 	    lappend all_registers_lines $expect_out(0,string)
 	    exp_continue
 	}
-	-re ".*$gdb_prompt $" {
+	-re "$gdb_prompt $" {
 	    incr bad
 	}
-	-re "^\[^\r\n\]+\[\r\n\]+" {
+	-re "^\[^\r\n\]+\r\n" {
 	    if {!$bad} {
 		warning "Unrecognized output: $expect_out(0,string)"
 		set bad 1


  reply	other threads:[~2009-03-20 18:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 21:15 [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols Jan Kratochvil
2009-03-20 15:17 ` Joel Brobecker
2009-03-20 15:51   ` Joel Brobecker
2009-03-20 18:22     ` Jan Kratochvil
2009-03-20 18:39   ` Joel Brobecker
2009-03-20 18:51     ` Jan Kratochvil [this message]
2009-03-20 19:54       ` [patch] Racy FAIL: gdb.base/auxv.exp + gdb.base/callfuncs.exp [Re: [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols] Joel Brobecker
2009-03-20 21:54         ` Daniel Jacobowitz
2009-03-23 17:36         ` Joel Brobecker
2009-03-23 17:45           ` Jan Kratochvil
2009-03-23 22:52             ` Joel Brobecker
2009-03-24 23:50               ` [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols [Re: [patch] Racy FAIL: gdb.base/auxv.exp + gdb.base/callfuncs.exp] Jan Kratochvil
2009-03-25 10:03                 ` [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols Jan Kratochvil
2009-03-26  0:38                   ` Joel Brobecker
2009-03-26 17:02                     ` Jan Kratochvil
2009-03-20 19:18     ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090320183838.GA8318@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox