Fix test names starting with uppercase using gdb_test on a single line.
Changes in v3: Fixed incorrect substitutions. This fixes offender testcases that have test names starting with uppercase when using gdb_test in a single line construct. gdb/testsuite/ChangeLog 2016-12-01 Luis Machado <lgustavo@codesourcery.com> Fix test names starting with uppercase throughout the files. * gdb.arch/i386-mpx-simple_segv.exp * gdb.arch/i386-mpx.exp * gdb.arch/i386-permbkpt.exp * gdb.arch/pa-nullify.exp * gdb.arch/powerpc-d128-regs.exp * gdb.arch/vsx-regs.exp * gdb.base/bfp-test.exp * gdb.base/break.exp * gdb.base/breakpoint-shadow.exp * gdb.base/callfuncs.exp * gdb.base/charset.exp * gdb.base/commands.exp * gdb.base/completion.exp * gdb.base/dfp-test.exp * gdb.base/echo.exp * gdb.base/ending-run.exp * gdb.base/eval.exp * gdb.base/expand-psymtabs.exp * gdb.base/float128.exp * gdb.base/floatn.exp * gdb.base/foll-exec-mode.exp * gdb.base/gdb1056.exp * gdb.base/gdb11531.exp * gdb.base/kill-after-signal.exp * gdb.base/multi-forks.exp * gdb.base/overlays.exp * gdb.base/pending.exp * gdb.base/sepdebug.exp * gdb.base/testenv.exp * gdb.base/valgrind-db-attach.exp * gdb.base/watch_thread_num.exp * gdb.base/watchpoint-cond-gone.exp * gdb.base/watchpoint.exp * gdb.base/watchpoints.exp * gdb.cp/arg-reference.exp * gdb.cp/baseenum.exp * gdb.cp/operator.exp * gdb.cp/shadow.exp * gdb.dwarf2/dw2-op-out-param.exp * gdb.dwarf2/dw2-reg-undefined.exp * gdb.go/chan.exp * gdb.go/hello.exp * gdb.go/integers.exp * gdb.go/methods.exp * gdb.go/package.exp * gdb.guile/scm-parameter.exp * gdb.guile/scm-progspace.exp * gdb.guile/scm-value.exp * gdb.mi/mi-pending.exp * gdb.mi/user-selected-context-sync.exp * gdb.multi/multi-attach.exp * gdb.multi/tids.exp * gdb.opt/clobbered-registers-O2.exp * gdb.pascal/floats.exp * gdb.pascal/integers.exp * gdb.python/py-block.exp * gdb.python/py-events.exp * gdb.python/py-parameter.exp * gdb.python/py-symbol.exp * gdb.python/py-symtab.exp * gdb.python/py-type.exp * gdb.python/py-value.exp * gdb.python/py-xmethods.exp * gdb.python/python.exp * gdb.reverse/break-precsave.exp * gdb.reverse/consecutive-precsave.exp * gdb.reverse/finish-precsave.exp * gdb.reverse/i386-precsave.exp * gdb.reverse/machinestate-precsave.exp * gdb.reverse/sigall-precsave.exp * gdb.reverse/solib-precsave.exp * gdb.reverse/step-precsave.exp * gdb.reverse/until-precsave.exp * gdb.reverse/watch-precsave.exp * gdb.server/ext-attach.exp * gdb.server/ext-restart.exp * gdb.server/ext-run.exp * gdb.server/ext-wrapper.exp * gdb.stabs/gdb11479.exp * gdb.stabs/weird.exp * gdb.threads/attach-many-short-lived-threads.exp * gdb.threads/kill.exp * gdb.threads/watchpoint-fork.exp
This commit is contained in:
parent
bc6c7af4a2
commit
cdc7edd7b1
74 changed files with 502 additions and 414 deletions
|
@ -131,7 +131,7 @@ gdb_py_test_multiple "post event insertion" \
|
|||
"end" ""
|
||||
|
||||
gdb_test "python print (someVal)" "1" "test post event execution"
|
||||
gdb_test "python gdb.post_event(str(1))" "RuntimeError: Posted event is not callable.*" "Test non callable class"
|
||||
gdb_test "python gdb.post_event(str(1))" "RuntimeError: Posted event is not callable.*" "test non callable class"
|
||||
|
||||
# Test (no) pagination of the executed command.
|
||||
gdb_test "show height" {Number of lines gdb thinks are in a page is unlimited\.}
|
||||
|
@ -177,7 +177,7 @@ gdb_test "python print (a)" ".*aliases -- Aliases of other commands.*" "verify h
|
|||
# Test PR 12212, using InfThread.selected_thread() when no inferior is
|
||||
# loaded.
|
||||
gdb_py_test_silent_cmd "python nothread = gdb.selected_thread()" "Attempt to aquire thread with no inferior" 1
|
||||
gdb_test "python print (nothread == None)" "True" "Ensure that no threads are returned"
|
||||
gdb_test "python print (nothread == None)" "True" "ensure that no threads are returned"
|
||||
|
||||
gdb_py_test_multiple "register atexit function" \
|
||||
"python" "" \
|
||||
|
@ -215,56 +215,56 @@ gdb_test "python gdb.decode_line(\"main.c:43\")" \
|
|||
"gdb.error: No source file named main.c.*" "test decode_line no source named main"
|
||||
|
||||
gdb_py_test_silent_cmd "python symtab = gdb.decode_line()" "test decode_line current location" 1
|
||||
gdb_test "python print (len(symtab))" "2" "Test decode_line current location"
|
||||
gdb_test "python print (symtab\[0\])" "None" "Test decode_line expression parse"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line current location"
|
||||
gdb_test "python print (len(symtab))" "2" "test decode_line current location"
|
||||
gdb_test "python print (symtab\[0\])" "None" "test decode_line expression parse"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line current location"
|
||||
|
||||
if { [is_remote host] } {
|
||||
set python_c [string_to_regexp "python.c"]
|
||||
} else {
|
||||
set python_c [string_to_regexp "gdb.python/python.c"]
|
||||
}
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "Test decode_line current location filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].line)" "$lineno" "Test decode_line current location line number"
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "test decode_line current location filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].line)" "$lineno" "test decode_line current location line number"
|
||||
|
||||
gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"python.c:26 if foo\")" "test decode_line python.c:26" 1
|
||||
gdb_test "python print (len(symtab))" "2" "Test decode_line python.c:26 length"
|
||||
gdb_test "python print (symtab\[0\])" "if foo" "Test decode_line expression parse"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line python.c:26 length"
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "Test decode_line python.c:26 filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].line)" "26" "Test decode_line python.c:26 line number"
|
||||
gdb_test "python print (len(symtab))" "2" "test decode_line python.c:26 length"
|
||||
gdb_test "python print (symtab\[0\])" "if foo" "test decode_line expression parse"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line python.c:26 length"
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_c}" "test decode_line python.c:26 filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].line)" "26" "test decode_line python.c:26 line number"
|
||||
|
||||
gdb_test "python gdb.decode_line(\"randomfunc\")" \
|
||||
"gdb.error: Function \"randomfunc\" not defined.*" "test decode_line randomfunc"
|
||||
gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"func1\")" "test decode_line func1()" 1
|
||||
gdb_test "python print (len(symtab))" "2" "Test decode_line func1 length"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line func1 length"
|
||||
gdb_test "python print (len(symtab))" "2" "test decode_line func1 length"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line func1 length"
|
||||
|
||||
if { [is_remote host] } {
|
||||
set python_1_c [string_to_regexp "python-1.c"]
|
||||
} else {
|
||||
set python_1_c [string_to_regexp "gdb.python/python-1.c"]
|
||||
}
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_1_c}" "Test decode_line func1 filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].line)" "19" "Test decode_line func1 line number"
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_1_c}" "test decode_line func1 filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].line)" "19" "test decode_line func1 line number"
|
||||
gdb_py_test_silent_cmd {python symtab = gdb.decode_line ("func1,func2")} \
|
||||
"test decode_line func1,func2" 1
|
||||
gdb_test {python print (symtab[0])} ",func2" "stop at comma in linespec"
|
||||
|
||||
gdb_py_test_silent_cmd "python symtab = gdb.decode_line(\"*0\")" "Test decode_line *0" 1
|
||||
gdb_test "python print (len(symtab))" "2" "Test decode_line *0 result length"
|
||||
gdb_test "python print (symtab\[0\])" "None" "Test decode_line *0 unparsed"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "Test decode_line *0 locations length"
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" "None" "Test decode_line *0 filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].pc)" "0" "Test decode_line *0 pc"
|
||||
gdb_test "python print (len(symtab))" "2" "test decode_line *0 result length"
|
||||
gdb_test "python print (symtab\[0\])" "None" "test decode_line *0 unparsed"
|
||||
gdb_test "python print (len(symtab\[1\]))" "1" "test decode_line *0 locations length"
|
||||
gdb_test "python print (symtab\[1\]\[0\].symtab)" "None" "test decode_line *0 filename"
|
||||
gdb_test "python print (symtab\[1\]\[0\].pc)" "0" "test decode_line *0 pc"
|
||||
|
||||
# gdb.write
|
||||
gdb_test "python print (sys.stderr)" ".*gdb.GdbOutputErrorFile (instance|object) at.*" "Test stderr location"
|
||||
gdb_test "python print (sys.stdout)" ".*gdb.GdbOutputFile (instance|object) at.*" "Test stdout location"
|
||||
gdb_test "python gdb.write(\"Foo\\n\")" "Foo" "Test default write"
|
||||
gdb_test "python gdb.write(\"Error stream\\n\", stream=gdb.STDERR)" "Error stream" "Test stderr write"
|
||||
gdb_test "python gdb.write(\"Normal stream\\n\", stream=gdb.STDOUT)" "Normal stream" "Test stdout write"
|
||||
gdb_test "python gdb.write(\"Log stream\\n\", stream=gdb.STDLOG)" "Log stream" "Test stdlog write"
|
||||
gdb_test "python print (sys.stderr)" ".*gdb.GdbOutputErrorFile (instance|object) at.*" "test stderr location"
|
||||
gdb_test "python print (sys.stdout)" ".*gdb.GdbOutputFile (instance|object) at.*" "test stdout location"
|
||||
gdb_test "python gdb.write(\"Foo\\n\")" "Foo" "test default write"
|
||||
gdb_test "python gdb.write(\"Error stream\\n\", stream=gdb.STDERR)" "Error stream" "test stderr write"
|
||||
gdb_test "python gdb.write(\"Normal stream\\n\", stream=gdb.STDOUT)" "Normal stream" "test stdout write"
|
||||
gdb_test "python gdb.write(\"Log stream\\n\", stream=gdb.STDLOG)" "Log stream" "test stdlog write"
|
||||
|
||||
# Turn on full stack printing for subsequent tests.
|
||||
gdb_py_test_silent_cmd "set python print-stack full" \
|
||||
|
@ -454,9 +454,9 @@ if ![runto_main] then {
|
|||
runto [gdb_get_line_number "Break at func2 call site."]
|
||||
|
||||
gdb_py_test_silent_cmd "python line = gdb.selected_frame().find_sal().line" "Get line number of func2 call site" 1
|
||||
gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line == line)" "True" "Test find_pc_line at func2 call site"
|
||||
gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line == line)" "True" "test find_pc_line at func2 call site"
|
||||
|
||||
gdb_py_test_silent_cmd "step" "Step into func2" 1
|
||||
gdb_py_test_silent_cmd "up" "Step out of func2" 1
|
||||
|
||||
gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line > line)" "True" "Test find_pc_line with resume address"
|
||||
gdb_test "python print (gdb.find_pc_line(gdb.selected_frame().pc()).line > line)" "True" "test find_pc_line with resume address"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue