aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/var-cmd.c
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2020-05-25 13:25:50 -0300
committerLuis Machado <luis.machado@linaro.org>2020-05-27 09:24:09 -0300
commitc2b750436a9db8cf491ddeb316bc71e4b65110b6 (patch)
tree165e1ef0ce74433f818a2e26aa2b0aafe340c664 /gdb/testsuite/gdb.mi/var-cmd.c
parenta6dbf402de65fe66f4ec99b56527dfd00d077cb6 (diff)
downloadgdb-c2b750436a9db8cf491ddeb316bc71e4b65110b6.zip
gdb-c2b750436a9db8cf491ddeb316bc71e4b65110b6.tar.gz
gdb-c2b750436a9db8cf491ddeb316bc71e4b65110b6.tar.bz2
Fix some duplicate test names
While doing a testsuite run on aarch64-linux, I noticed a bunch of duplicated test name results. It annoyed me a little, so I decided to go ahead and fix the worst offenders. The following patch brings the duplicate test names down from 461 to 137. The remaining ones are mostly scattered across the testsuite, with 1 to 3 duplicates per testcase. We can fix those as we go. gdb/testsuite/ChangeLog: 2020-05-27 Luis Machado <luis.machado@linaro.org> * gdb.arch/aarch64-sighandler-regs.exp: Fix duplicated test names. * gdb.arch/aarch64-tagged-pointer.exp: Likewise. * gdb.arch/arm-disassembler-options.exp: Likewise. * gdb.arch/arm-disp-step.exp: Likewise. * gdb.arch/thumb-prologue.exp: Likewise. * gdb.base/async.exp: Likewise. * gdb.base/auxv.exp: Likewise. * gdb.base/complex-parts.exp: Likewise. * gdb.base/ena-dis-br.exp: Likewise. * gdb.base/foll-exec.exp: Likewise. * gdb.base/permissions.exp: Likewise. * gdb.base/relocate.exp: Likewise. * gdb.base/return2.exp: Likewise. * gdb.base/sigbpt.exp: Likewise. * gdb.base/siginfo-obj.exp: Likewise. * gdb.cp/converts.exp: Likewise. * gdb.cp/exceptprint.exp: Likewise. * gdb.cp/inherit.exp: Likewise. * gdb.cp/nsnoimports.exp: Likewise. * gdb.cp/virtbase2.exp: Likewise. * gdb.mi/mi-var-cmd.exp: Likewise. * gdb.mi/var-cmd.c: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.mi/var-cmd.c')
-rw-r--r--gdb/testsuite/gdb.mi/var-cmd.c98
1 files changed, 55 insertions, 43 deletions
diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c
index 39c4602..0529b67 100644
--- a/gdb/testsuite/gdb.mi/var-cmd.c
+++ b/gdb/testsuite/gdb.mi/var-cmd.c
@@ -366,23 +366,25 @@ void do_frozen_tests ()
int v2 = 4;
/*:
- mi_create_varobj V1 v1 "create varobj for v1"
- mi_create_varobj V2 v2 "create varobj for v2"
-
- mi_list_varobj_children "V1" {
- {"V1.i" "i" "0" "int"}
- {"V1.nested" "nested" "2" "struct {...}"}
- } "list children of v1"
-
- mi_list_varobj_children "V1.nested" {
- {"V1.nested.j" "j" "0" "int"}
- {"V1.nested.k" "k" "0" "int"}
- } "list children of v1.nested"
-
- mi_check_varobj_value V1.i 1 "check V1.i: 1"
- mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
- mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
- mi_check_varobj_value V2 4 "check V2: 4"
+ with_test_prefix "create varobj V1 and V2" {
+ mi_create_varobj V1 v1 "create varobj for v1"
+ mi_create_varobj V2 v2 "create varobj for v2"
+
+ mi_list_varobj_children "V1" {
+ {"V1.i" "i" "0" "int"}
+ {"V1.nested" "nested" "2" "struct {...}"}
+ } "list children of v1"
+
+ mi_list_varobj_children "V1.nested" {
+ {"V1.nested.j" "j" "0" "int"}
+ {"V1.nested.k" "k" "0" "int"}
+ } "list children of v1.nested"
+
+ mi_check_varobj_value V1.i 1 "check V1.i: 1"
+ mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
+ mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
+ mi_check_varobj_value V2 4 "check V2: 4"
+ }
:*/
v2 = 5;
/*:
@@ -400,40 +402,50 @@ void do_frozen_tests ()
v1.nested.j = 8;
v1.nested.k = 9;
/*:
- set_frozen V1 1
- mi_varobj_update * {} "update varobjs: nothing changed"
- mi_check_varobj_value V1.i 1 "check V1.i: 1"
- mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
- mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
+ with_test_prefix "frozen V1" {
+ set_frozen V1 1
+ mi_varobj_update * {} "update varobjs: nothing changed"
+ mi_check_varobj_value V1.i 1 "check V1.i: 1"
+ mi_check_varobj_value V1.nested.j 2 "check V1.nested.j: 2"
+ mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
+ }
# Check that explicit update for elements of structures
# works.
- # Update v1.j
- mi_varobj_update V1.nested.j {V1.nested.j} "update V1.nested.j"
- mi_check_varobj_value V1.i 1 "check V1.i: 1"
- mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
- mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
- # Update v1.nested, check that children is updated.
- mi_varobj_update V1.nested {V1.nested.k} "update V1.nested"
- mi_check_varobj_value V1.i 1 "check V1.i: 1"
- mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
- mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"
- # Update v1.i
- mi_varobj_update V1.i {V1.i} "update V1.i"
- mi_check_varobj_value V1.i 7 "check V1.i: 7"
+ with_test_prefix "update v1.j" {
+ # Update v1.j
+ mi_varobj_update V1.nested.j {V1.nested.j} "update V1.nested.j"
+ mi_check_varobj_value V1.i 1 "check V1.i: 1"
+ mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
+ mi_check_varobj_value V1.nested.k 3 "check V1.nested.k: 3"
+ }
+ with_test_prefix "update v1.nested" {
+ # Update v1.nested, check that children is updated.
+ mi_varobj_update V1.nested {V1.nested.k} "update V1.nested"
+ mi_check_varobj_value V1.i 1 "check V1.i: 1"
+ mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
+ mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"
+ }
+ with_test_prefix "update v1.i" {
+ # Update v1.i
+ mi_varobj_update V1.i {V1.i} "update V1.i"
+ mi_check_varobj_value V1.i 7 "check V1.i: 7"
+ }
:*/
v1.i = 10;
v1.nested.j = 11;
v1.nested.k = 12;
/*:
# Check that unfreeze itself does not updates the values.
- set_frozen V1 0
- mi_check_varobj_value V1.i 7 "check V1.i: 7"
- mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
- mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"
- mi_varobj_update V1 {V1.i V1.nested.j V1.nested.k} "update V1"
- mi_check_varobj_value V1.i 10 "check V1.i: 10"
- mi_check_varobj_value V1.nested.j 11 "check V1.nested.j: 11"
- mi_check_varobj_value V1.nested.k 12 "check V1.nested.k: 12"
+ with_test_prefix "unfrozen V1" {
+ set_frozen V1 0
+ mi_check_varobj_value V1.i 7 "check V1.i: 7"
+ mi_check_varobj_value V1.nested.j 8 "check V1.nested.j: 8"
+ mi_check_varobj_value V1.nested.k 9 "check V1.nested.k: 9"
+ mi_varobj_update V1 {V1.i V1.nested.j V1.nested.k} "update V1"
+ mi_check_varobj_value V1.i 10 "check V1.i: 10"
+ mi_check_varobj_value V1.nested.j 11 "check V1.nested.j: 11"
+ mi_check_varobj_value V1.nested.k 12 "check V1.nested.k: 12"
+ }
:*/
/*: END: frozen :*/