mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-30 05:23:49 +08:00
gdb/testsuite: resolve some duplicate testnames in gdb.mi
Set of fixes to resolve some duplicate test names in the gdb.mi/ directory. There should be no real test changes after this set of fixes, they are all either: - Adding with_test_prefix type constructs to make test names unique, or - Changing the test name to be more descriptive, or better reflect the test being run.
This commit is contained in:
parent
b622494ee3
commit
b6846ba57b
@ -55,11 +55,12 @@ mi_gdb_test "402-stack-list-frames" "402\\^done,stack=\\\[frame=\{level=\"0\",ad
|
||||
#
|
||||
mi_send_resuming_command "exec-continue" "testing exec continue"
|
||||
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" "finished exec continue"
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" \
|
||||
"finished exec continue after calling foo"
|
||||
|
||||
mi_gdb_test "404-stack-list-frames 0 0" \
|
||||
"404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \
|
||||
"list stack frames"
|
||||
"list stack frames, back in main after calling foo"
|
||||
|
||||
|
||||
#
|
||||
@ -79,16 +80,17 @@ mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \
|
||||
|
||||
mi_gdb_test "407-stack-list-frames" \
|
||||
"407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \
|
||||
"list stack frames"
|
||||
"list stack frames, with signal handler and dummy frame"
|
||||
|
||||
|
||||
mi_send_resuming_command "exec-continue" "testing exec continue"
|
||||
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" "finished exec continue"
|
||||
mi_expect_stop "really-no-reason" "" "" "" "" "" \
|
||||
"finished exec continue after calling have_a_very_merry_interrupt"
|
||||
|
||||
mi_gdb_test "409-stack-list-frames 0 0" \
|
||||
"409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \
|
||||
"list stack frames"
|
||||
"list stack frames, back in main after calling have_a_very_merry_interrupt"
|
||||
|
||||
#
|
||||
# Call bar() by hand, which should get an exception while running.
|
||||
|
@ -899,7 +899,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_
|
||||
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
|
||||
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
|
||||
{\*\*\*\*psnp->char_ptr} 0 char}
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.18
|
||||
# Desc: number of children of *(*(*(psnp->char_ptr)))
|
||||
@ -1077,7 +1077,7 @@ mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" {
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
|
||||
# Test: c_variable-5.42
|
||||
# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
|
||||
@ -1090,7 +1090,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.44
|
||||
# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
|
||||
@ -1101,13 +1101,13 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
# Test: c_variable-5.43B
|
||||
# Desc: children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" {} \
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.44B
|
||||
# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
|
||||
"\\^done,numchild=\"0\"" \
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.45
|
||||
# Desc: children of psnp->ptrs[0]->next->next
|
||||
|
@ -218,7 +218,7 @@ void use_rtti_with_multiple_inheritence_test ()
|
||||
} "list children of ptr.First (with RTTI) in $testname"
|
||||
mi_list_varobj_children "VAR.First.public" {
|
||||
{ VAR.First.public.F F 0 int }
|
||||
} "list children of ptr.Base.public (with RTTI) in $testname"
|
||||
} "list children of ptr.First.public (with RTTI) in $testname"
|
||||
mi_list_varobj_children "VAR.Base" {
|
||||
{ VAR.Base.public public 1 }
|
||||
} "list children of ptr.Base (with RTTI) in $testname"
|
||||
@ -307,6 +307,7 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
/*:
|
||||
set testname skip_type_update_when_not_use_rtti
|
||||
|
||||
with_test_prefix "ptr is nullptr" {
|
||||
set_print_object off $testname
|
||||
mi_create_varobj_checked PTR ptr {Base \*} \
|
||||
"create varobj for ptr in $testname"
|
||||
@ -320,11 +321,13 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
{ S.public.ptr ptr 1 {Base \*} }
|
||||
} "list children of s.public in $testname"
|
||||
check_derived_children_without_rtti S.public.ptr s.ptr $testname
|
||||
}
|
||||
:*/
|
||||
|
||||
ptr = &d;
|
||||
s.ptr = &d;
|
||||
/*:
|
||||
with_test_prefix "ptr points at d" {
|
||||
mi_varobj_update PTR {PTR PTR.public.A} \
|
||||
"update ptr to derived type in $testname"
|
||||
check_derived_without_rtti PTR ptr $testname
|
||||
@ -332,11 +335,13 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
mi_varobj_update S {S.public.ptr S.public.ptr.public.A} \
|
||||
"update s to derived type in $testname"
|
||||
check_derived_without_rtti S.public.ptr s.ptr $testname
|
||||
}
|
||||
:*/
|
||||
|
||||
ptr = 0;
|
||||
s.ptr = 0;
|
||||
/*:
|
||||
with_test_prefix "ptr is nullptr again" {
|
||||
mi_varobj_update PTR {PTR PTR.public.A} \
|
||||
"update ptr back to base type in $testname"
|
||||
mi_delete_varobj PTR "delete varobj for ptr in $testname"
|
||||
@ -344,6 +349,7 @@ void skip_type_update_when_not_use_rtti_test ()
|
||||
mi_varobj_update S {S.public.ptr S.public.ptr.public.A} \
|
||||
"update s back to base type in $testname"
|
||||
mi_delete_varobj S "delete varobj for s in $testname"
|
||||
}
|
||||
:*/
|
||||
return;
|
||||
/*: END: skip_type_update_when_not_use_rtti :*/
|
||||
|
@ -131,7 +131,7 @@ proc test_watchpoint_triggering {} {
|
||||
mi_execute_to "exec-continue" "watchpoint-scope" "callee3" ".*" \
|
||||
".*basics.c" $line_callee3_close_brace \
|
||||
{"" "wpnum=\"2\""} \
|
||||
"watchpoint trigger"
|
||||
"watchpoint scope"
|
||||
}
|
||||
|
||||
proc test_watchpoint_all {mi_mode type} {
|
||||
|
@ -49,6 +49,7 @@ foreach name {different breakhere_different breakhere_validity breakhere_invalid
|
||||
|
||||
# Test various kinds of `set print entry-values'.
|
||||
|
||||
with_test_prefix "entry-values=no" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
@ -65,7 +66,9 @@ mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
|
||||
mi_send_resuming_command "exec-continue" "no: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "no: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "no: invalid: -stack-list-variables"
|
||||
}
|
||||
|
||||
with_test_prefix "entry-values=only" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
@ -82,7 +85,9 @@ mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
|
||||
mi_send_resuming_command "exec-continue" "only: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "only: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "only: invalid: -stack-list-variables"
|
||||
}
|
||||
|
||||
with_test_prefix "entry-values=preferred" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
@ -99,7 +104,9 @@ mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
|
||||
mi_send_resuming_command "exec-continue" "preferred: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "preferred: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "preferred: invalid: -stack-list-variables"
|
||||
}
|
||||
|
||||
with_test_prefix "entry-values=if-needed" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
@ -116,7 +123,9 @@ mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
|
||||
mi_send_resuming_command "exec-continue" "if-needed: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "if-needed: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "if-needed: invalid: -stack-list-variables"
|
||||
}
|
||||
|
||||
with_test_prefix "entry-values=both" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
@ -133,7 +142,9 @@ mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
|
||||
mi_send_resuming_command "exec-continue" "both: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"},{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "both: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"},{name="inv@entry",arg="1",value="<optimized out>"}\]} "both: invalid: -stack-list-variables"
|
||||
}
|
||||
|
||||
with_test_prefix "entry-values=compact" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
@ -150,7 +161,9 @@ mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
|
||||
mi_send_resuming_command "exec-continue" "compact: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "compact: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "compact: invalid: -stack-list-variables"
|
||||
}
|
||||
|
||||
with_test_prefix "entry-values=default" {
|
||||
if {[mi_runto_main] == -1} {
|
||||
return -1
|
||||
}
|
||||
@ -167,3 +180,4 @@ mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
|
||||
mi_send_resuming_command "exec-continue" "default: invalid: continue"
|
||||
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "default: invalid: stop"
|
||||
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "default: invalid: -stack-list-variables"
|
||||
}
|
||||
|
@ -839,7 +839,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_
|
||||
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
|
||||
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
|
||||
{\*\*\*\*psnp->char_ptr} 0 char}
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
|
||||
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.18
|
||||
# Desc: number of children of *(*(*(psnp->char_ptr)))
|
||||
@ -1018,7 +1018,7 @@ mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" {
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
|
||||
# Test: c_variable-5.42
|
||||
# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
|
||||
@ -1031,7 +1031,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
|
||||
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
|
||||
{\*\*\*\*char_ptr} 0 char}
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr after counting children"
|
||||
|
||||
# Test: c_variable-5.44
|
||||
# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
|
||||
@ -1042,13 +1042,13 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_
|
||||
# Test: c_variable-5.43B
|
||||
# Desc: children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" {} \
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.44B
|
||||
# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
|
||||
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
|
||||
"\\^done,numchild=\"0\"" \
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
||||
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr"
|
||||
|
||||
# Test: c_variable-5.45
|
||||
# Desc: children of psnp->ptrs[0]->next->next
|
||||
|
Loading…
Reference in New Issue
Block a user