Make test messages in gdb.mi/mi-var-display.exp unique

Message ID 1407459885-7734-1-git-send-email-yao@codesourcery.com
State Committed
Headers

Commit Message

Yao Qi Aug. 8, 2014, 1:04 a.m. UTC
  When I fix a bug in gdb.mi/mi-var-display.exp, I find its test
messages aren't unique, which makes some confusions for me.

$ cat testsuite/gdb.sum | grep "PASS" | sort | uniq -c | sort -n
...
 2 PASS: gdb.mi/mi-var-display.exp: set format variable bar
 2 PASS: gdb.mi/mi-var-display.exp: set format variable foo
 2 PASS: gdb.mi/mi-var-display.exp: set format variable weird.func_ptr
 2 PASS: gdb.mi/mi-var-display.exp: set format variable weird.func_ptr_ptr
 2 PASS: gdb.mi/mi-var-display.exp: show format variable foo
 3 PASS: gdb.mi/mi-var-display.exp: eval variable foo

This patch is to make test messages in mi-var-display.exp unique.

gdb/testsuite:

2014-08-08  Yao Qi  <yao@codesourcery.com>

	PR testsuite/13443
	* gdb.mi/mi-var-display.exp: Make test messages unique.
---
 gdb/testsuite/gdb.mi/mi-var-display.exp | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
  

Comments

Tom Tromey Aug. 8, 2014, 1:56 p.m. UTC | #1
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:

Yao> 2014-08-08  Yao Qi  <yao@codesourcery.com>

Yao> 	PR testsuite/13443
Yao> 	* gdb.mi/mi-var-display.exp: Make test messages unique.

This is ok.  Thanks for doing this.

Tom
  

Patch

diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index d20c6f0..2db4a7d 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -81,7 +81,7 @@  mi_gdb_test "-var-evaluate-expression bar" \
 # Desc: change format of bar to hex
 mi_gdb_test "-var-set-format bar hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"0x849\"" \
-	"set format variable bar"
+	"set format variable bar in hex"
 
 # Test: c_variable-6.6
 # Desc: value of bar with new format
@@ -97,7 +97,7 @@  mi_gdb_test "-var-assign bar 3" \
 
 mi_gdb_test "-var-set-format bar decimal" \
 	"\\^done,format=\"decimal\",value=\"3\"" \
-	"set format variable bar"
+	"set format variable bar in decimal"
 
 mi_gdb_test "-var-evaluate-expression bar" \
 	"\\^done,value=\"3\"" \
@@ -121,29 +121,29 @@  mi_gdb_test "-var-info-type foo" \
 # Desc: format of variable foo
 mi_gdb_test "-var-show-format foo" \
 	"\\^done,format=\"natural\"" \
-	"show format variable foo"
+	"show format variable foo in natural"
 
 # Test: c_variable-6.14
 # Desc: value of variable foo
 mi_gdb_test "-var-evaluate-expression foo" \
 	"\\^done,value=\"$hex\"" \
-	"eval variable foo"
+	"eval variable foo in natural"
 
 # Test: c_variable-6.15
 # Desc: change format of var to octal
 mi_gdb_test "-var-set-format foo octal" \
 	"\\^done,format=\"octal\",value=\"$octal\"" \
-	"set format variable foo"
+	"set format variable foo in octal"
 
 mi_gdb_test "-var-show-format foo" \
 	"\\^done,format=\"octal\"" \
-	"show format variable foo"
+	"show format variable foo in octal"
 
 # Test: c_variable-6.16
 # Desc: value of foo with new format
 mi_gdb_test "-var-evaluate-expression foo" \
 	"\\^done,value=\"\[0-7\]+\"" \
-	"eval variable foo"
+	"eval variable foo in octal"
 
 # Test: c_variable-6.17
 # Desc: change value of foo
@@ -153,13 +153,13 @@  mi_gdb_test "-var-assign foo 3" \
 
 mi_gdb_test "-var-set-format foo decimal" \
 	"\\^done,format=\"decimal\",value=\"3\"" \
-	"set format variable foo"
+	"set format variable foo decimal"
 
 # Test: c_variable-6.18
 # Desc: check new value of foo
 mi_gdb_test "-var-evaluate-expression foo" \
 	"\\^done,value=\"3\"" \
-	"eval variable foo"
+	"eval variable foo in decimal"
 
 
 # Test: c_variable-6.19
@@ -175,7 +175,7 @@  mi_gdb_test "-var-show-format foo" \
 
 mi_gdb_test "-var-evaluate-expression -f octal foo" \
 	"\\^done,value=\"03\"" \
-	"eval variable foo in octal"
+	"eval variable -f octal foo"
 
 mi_gdb_test "-var-show-format foo" \
 	"\\^done,format=\"decimal\"" \
@@ -183,7 +183,7 @@  mi_gdb_test "-var-show-format foo" \
 
 mi_gdb_test "-var-evaluate-expression -f decimal foo" \
 	"\\^done,value=\"3\"" \
-	"eval variable foo in decimal"
+	"eval variable -f decimal foo"
 
 mi_gdb_test "-var-show-format foo" \
 	"\\^done,format=\"decimal\"" \
@@ -191,7 +191,7 @@  mi_gdb_test "-var-show-format foo" \
 
 mi_gdb_test "-var-evaluate-expression -f nat foo" \
 	"\\^done,value=\"0x3\"" \
-	"eval variable foo in natural"
+	"eval variable -f nat foo"
 
 mi_gdb_test "-var-show-format foo" \
 	"\\^done,format=\"decimal\"" \
@@ -234,7 +234,7 @@  mi_list_varobj_children weird {
 # Desc: change format of weird.func_ptr and weird.func_ptr_ptr
 mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"$hex\"" \
-	"set format variable weird.func_ptr"
+	"set format variable weird.func_ptr in hex (1)"
 
 mi_gdb_test "-var-show-format weird.func_ptr" \
 	"\\^done,format=\"hexadecimal\"" \
@@ -242,7 +242,7 @@  mi_gdb_test "-var-show-format weird.func_ptr" \
 
 mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"$hex\"" \
-	"set format variable weird.func_ptr_ptr"
+	"set format variable weird.func_ptr_ptr in hex"
 
 mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
 	"\\^done,format=\"hexadecimal\"" \
@@ -280,7 +280,7 @@  mi_gdb_test "-var-set-format weird.long_array natural" \
 
 mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"$hex\"" \
-	"set format variable weird.func_ptr"
+	"set format variable weird.func_ptr in hex (2)"
 
 mi_gdb_test "-var-set-format weird.func_ptr_struct hexadecimal" \
 	"\\^done,format=\"hexadecimal\",value=\"$hex\"" \
@@ -288,7 +288,7 @@  mi_gdb_test "-var-set-format weird.func_ptr_struct hexadecimal" \
 
 mi_gdb_test "-var-set-format weird.func_ptr_ptr natural" \
 	"\\^done,format=\"natural\",value=\"0x0\"" \
-	"set format variable weird.func_ptr_ptr"
+	"set format variable weird.func_ptr_ptr in natural"
 
 mi_gdb_test "-var-set-format weird.u1 natural" \
 	"\\^done,format=\"natural\",value=\"\{...\}\"" \