Make test messages in gdb.mi/mi-var-display.exp unique
authorYao Qi <yao@codesourcery.com>
Thu, 7 Aug 2014 07:01:22 +0000 (15:01 +0800)
committerYao Qi <yao@codesourcery.com>
Sat, 9 Aug 2014 00:40:17 +0000 (08:40 +0800)
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-09  Yao Qi  <yao@codesourcery.com>

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

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-var-display.exp

index 0bda4d0..aa2eae0 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-09  Yao Qi  <yao@codesourcery.com>
+
+       PR testsuite/13443
+       * gdb.mi/mi-var-display.exp: Make test messages unique.
+
 2014-08-04  Tom Tromey  <tromey@redhat.com>
 
        * gdb.base/sss-bp-on-user-bp-2.exp: Expect output from "set debug
index d20c6f0..2db4a7d 100644 (file)
@@ -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=\"\{...\}\"" \