diff mbox

[v2] Remove unneeded pattern matching in gdb.base/maint.exp

Message ID 1480705356-15200-1-git-send-email-lgustavo@codesourcery.com
State New
Headers show

Commit Message

Luis Machado Dec. 2, 2016, 7:02 p.m. UTC
Thanks for clarifying the gdb_prompt situation. Updated patch attached.

Btw, check-read1 did catch the problem with a couple failures. I didn't know
about that one.

--

This gets rid of more useless pattern matching cases in gdb.base/maint.exp.

gdb/testsuite/ChangeLog:

2016-12-02  Luis Machado  <lgustavo@codesourcery.com>

	* gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when
	possible.
	Remove useless pattern-matching code.
---
 gdb/testsuite/gdb.base/maint.exp | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

Comments

Pedro Alves Dec. 2, 2016, 7:10 p.m. UTC | #1
On 12/02/2016 07:02 PM, Luis Machado wrote:
> Thanks for clarifying the gdb_prompt situation. Updated patch attached.
> 
> Btw, check-read1 did catch the problem with a couple failures. I didn't know
> about that one.

There's more about it in gdb/testsuite/README.

> This gets rid of more useless pattern matching cases in gdb.base/maint.exp.
> 
> gdb/testsuite/ChangeLog:
> 
> 2016-12-02  Luis Machado  <lgustavo@codesourcery.com>
> 
> 	* gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when
> 	possible.
> 	Remove useless pattern-matching code.

OK.

Thanks,
Pedro Alves
Luis Machado Dec. 2, 2016, 7:37 p.m. UTC | #2
On 12/02/2016 01:10 PM, Pedro Alves wrote:
> On 12/02/2016 07:02 PM, Luis Machado wrote:
>> Thanks for clarifying the gdb_prompt situation. Updated patch attached.
>>
>> Btw, check-read1 did catch the problem with a couple failures. I didn't know
>> about that one.
>
> There's more about it in gdb/testsuite/README.
>
>> This gets rid of more useless pattern matching cases in gdb.base/maint.exp.
>>
>> gdb/testsuite/ChangeLog:
>>
>> 2016-12-02  Luis Machado  <lgustavo@codesourcery.com>
>>
>> 	* gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when
>> 	possible.
>> 	Remove useless pattern-matching code.
>
> OK.
>
> Thanks,
> Pedro Alves
>

Thanks. Pushed now.
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 17c606b..c66c9ed 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -290,25 +290,13 @@  gdb_test_multiple "maint print msymbols msymbols_output2 ${testfile}" "maint pri
     -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" {
     	gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" {
 	    -re "msymbols_output2\r\n$gdb_prompt $" {
-	    	gdb_test_multiple "shell grep factorial msymbols_output2" "maint print msymbols" {
-		    -re "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*$gdb_prompt $" {
-		    	pass "maint print msymbols"
-		    }
-		    -re ".*$gdb_prompt $" {
-		        fail "maint print msymbols"
-		    }
-		}
-		gdb_test "shell rm -f msymbols_output2" ".*" \
-		    "shell rm -f msymbols_output2"
-	    }
-	    -re ".*$gdb_prompt $" {
-		fail "maint print msymbols"
+		gdb_test "shell grep factorial msymbols_output2" \
+		    "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*" \
+		    "maint print msymbols"
+		gdb_test "shell rm -f msymbols_output2" ".*"
 	    }
 	}
     }
-    -re ".*$gdb_prompt $" {
-	fail "maint print msymbols"
-    }
 }
 gdb_test "cd ${mydir}" \
     "Working directory [string_to_regexp ${mydir}]\..*" \