This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Racy FAIL: gdb.base/auxv.exp + gdb.base/callfuncs.exp [Re: [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]