mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
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:
@ -74,7 +74,7 @@ proc test_value_creation {} {
|
||||
}
|
||||
|
||||
# Test address attribute is None in a non-addressable value
|
||||
gdb_test "python print ('result = %s' % i.address)" "= None" "Test address attribute in non-addressable value"
|
||||
gdb_test "python print ('result = %s' % i.address)" "= None" "test address attribute in non-addressable value"
|
||||
}
|
||||
|
||||
proc test_value_numeric_ops {} {
|
||||
@ -250,10 +250,10 @@ proc test_value_in_inferior {} {
|
||||
}
|
||||
|
||||
# Smoke-test is_optimized_out attribute
|
||||
gdb_test "python print ('result = %s' % arg0.is_optimized_out)" "= False" "Test is_optimized_out attribute"
|
||||
gdb_test "python print ('result = %s' % arg0.is_optimized_out)" "= False" "test is_optimized_out attribute"
|
||||
|
||||
# Test address attribute
|
||||
gdb_test "python print ('result = %s' % arg0.address)" "= 0x\[\[:xdigit:\]\]+" "Test address attribute"
|
||||
gdb_test "python print ('result = %s' % arg0.address)" "= 0x\[\[:xdigit:\]\]+" "test address attribute"
|
||||
|
||||
# Test displaying a variable that is temporarily at a bad address.
|
||||
# But if we can examine what's at memory address 0, then we'll also be
|
||||
@ -295,16 +295,16 @@ proc test_value_in_inferior {} {
|
||||
gdb_test "print st" "\"divide et impera\""
|
||||
gdb_py_test_silent_cmd "python st = gdb.history (0)" "get value from history" 1
|
||||
gdb_test "python print (st.string ())" "divide et impera" "Test string with no length"
|
||||
gdb_test "python print (st.string (length = -1))" "divide et impera" "Test string (length = -1) is all of the string"
|
||||
gdb_test "python print (st.string (length = -1))" "divide et impera" "test string (length = -1) is all of the string"
|
||||
gdb_test "python print (st.string (length = 6))" "divide"
|
||||
gdb_test "python print (\"---\"+st.string (length = 0)+\"---\")" "------" "Test string (length = 0) is empty"
|
||||
gdb_test "python print (len(st.string (length = 0)))" "0" "Test length is 0"
|
||||
gdb_test "python print (\"---\"+st.string (length = 0)+\"---\")" "------" "test string (length = 0) is empty"
|
||||
gdb_test "python print (len(st.string (length = 0)))" "0" "test length is 0"
|
||||
|
||||
|
||||
# Fetch a string that has embedded nulls.
|
||||
gdb_test "print nullst" "\"divide\\\\000et\\\\000impera\".*"
|
||||
gdb_py_test_silent_cmd "python nullst = gdb.history (0)" "get value from history" 1
|
||||
gdb_test "python print (nullst.string ())" "divide" "Test string to first null"
|
||||
gdb_test "python print (nullst.string ())" "divide" "test string to first null"
|
||||
# Python cannot print strings that contain the null (\0) character.
|
||||
# For the purposes of this test, use repr()
|
||||
gdb_py_test_silent_cmd "python nullst = nullst.string (length = 9)" "get string beyond null" 1
|
||||
@ -325,18 +325,18 @@ proc test_lazy_strings {} {
|
||||
gdb_py_test_silent_cmd "python sptr = gdb.history (0)" "Get value from history" 1
|
||||
|
||||
gdb_py_test_silent_cmd "python lstr = sptr.lazy_string()" "Aquire lazy string" 1
|
||||
gdb_test "python print (lstr.type)" "const char \*." "Test lazy-string type name equality"
|
||||
gdb_test "python print (sptr.type)" "const char \*." "Test string type name equality"
|
||||
gdb_test "python print (lstr.type)" "const char \*." "test lazy-string type name equality"
|
||||
gdb_test "python print (sptr.type)" "const char \*." "test string type name equality"
|
||||
|
||||
# Prevent symbol on address 0x0 being printed.
|
||||
gdb_test_no_output "set print symbol off"
|
||||
gdb_test "print sn" "0x0"
|
||||
|
||||
gdb_py_test_silent_cmd "python snptr = gdb.history (0)" "Get value from history" 1
|
||||
gdb_test "python snstr = snptr.lazy_string(length=5)" ".*Cannot create a lazy string with address.*" "Test lazy string"
|
||||
gdb_test "python snstr = snptr.lazy_string(length=5)" ".*Cannot create a lazy string with address.*" "test lazy string"
|
||||
gdb_py_test_silent_cmd "python snstr = snptr.lazy_string(length=0)" "Succesfully create a lazy string" 1
|
||||
gdb_test "python print (snstr.length)" "0" "Test lazy string length"
|
||||
gdb_test "python print (snstr.address)" "0" "Test lazy string address"
|
||||
gdb_test "python print (snstr.length)" "0" "test lazy string length"
|
||||
gdb_test "python print (snstr.address)" "0" "test lazy string address"
|
||||
}
|
||||
|
||||
|
||||
@ -389,7 +389,7 @@ proc test_value_after_death {} {
|
||||
gdb_test "kill" "" "kill the inferior" \
|
||||
"Kill the program being debugged. .y or n. $" \
|
||||
"y"
|
||||
gdb_test "file" "" "Discard the symbols" \
|
||||
gdb_test "file" "" "discard the symbols" \
|
||||
"Discard symbol table from.*y or n. $" \
|
||||
"y"
|
||||
|
||||
@ -428,7 +428,7 @@ proc test_subscript_regression {exefile lang} {
|
||||
"Obtain address" 1
|
||||
gdb_py_test_silent_cmd "python rptr = gdb.history(0)" \
|
||||
"Obtains value from GDB" 1
|
||||
gdb_test "python print (rptr\[0\])" "2" "Check pointer passed as reference"
|
||||
gdb_test "python print (rptr\[0\])" "2" "check pointer passed as reference"
|
||||
|
||||
# Just the most basic test of dynamic_cast -- it is checked in
|
||||
# the C++ tests.
|
||||
@ -454,19 +454,19 @@ proc test_subscript_regression {exefile lang} {
|
||||
"Create a value for subscript test" 1
|
||||
|
||||
# Try to access an int with a subscript. This should fail.
|
||||
gdb_test "python print (intv)" "1" "Baseline print of an int Python value"
|
||||
gdb_test "python print (intv)" "1" "baseline print of an int Python value"
|
||||
gdb_test "python print (intv\[0\])" "gdb.error: Cannot subscript requested type.*" \
|
||||
"Attempt to access an integer with a subscript"
|
||||
|
||||
# Try to access a string with a subscript. This should pass.
|
||||
gdb_test "python print (stringv)" "foo." "Baseline print of a string Python value"
|
||||
gdb_test "python print (stringv\[0\])" "f." "Attempt to access a string with a subscript"
|
||||
gdb_test "python print (stringv)" "foo." "baseline print of a string Python value"
|
||||
gdb_test "python print (stringv\[0\])" "f." "attempt to access a string with a subscript"
|
||||
|
||||
# Try to access an int array via a pointer with a subscript. This should pass.
|
||||
gdb_py_test_silent_cmd "print p" "Build pointer to array" 1
|
||||
gdb_py_test_silent_cmd "python pointer = gdb.history(0)" "" 1
|
||||
gdb_test "python print (pointer\[0\])" "1" "Access array via pointer with int subscript"
|
||||
gdb_test "python print (pointer\[intv\])" "2" "Access array via pointer with value subscript"
|
||||
gdb_test "python print (pointer\[0\])" "1" "access array via pointer with int subscript"
|
||||
gdb_test "python print (pointer\[intv\])" "2" "access array via pointer with value subscript"
|
||||
|
||||
# Try to access a single dimension array with a subscript to the
|
||||
# result. This should fail.
|
||||
@ -477,7 +477,7 @@ proc test_subscript_regression {exefile lang} {
|
||||
# dimensions. This should pass.
|
||||
gdb_py_test_silent_cmd "print {\"fu \",\"foo\",\"bar\"}" "Build array" 1
|
||||
gdb_py_test_silent_cmd "python marray = gdb.history(0)" "" 1
|
||||
gdb_test "python print (marray\[1\]\[2\])" "o." "Test multiple subscript"
|
||||
gdb_test "python print (marray\[1\]\[2\])" "o." "test multiple subscript"
|
||||
}
|
||||
|
||||
# A few tests of gdb.parse_and_eval.
|
||||
@ -500,10 +500,10 @@ proc test_value_hash {} {
|
||||
"three = gdb.Value(3)" "" \
|
||||
"vdict = {one:\"one str\",two:\"two str\",three:\"three str\"}" "" \
|
||||
"end"
|
||||
gdb_test "python print (vdict\[one\])" "one str" "Test dictionary hash"
|
||||
gdb_test "python print (vdict\[two\])" "two str" "Test dictionary hash"
|
||||
gdb_test "python print (vdict\[three\])" "three str" "Test dictionary hash"
|
||||
gdb_test "python print (one.__hash__() == hash(one))" "True" "Test inbuilt hash"
|
||||
gdb_test "python print (vdict\[one\])" "one str" "test dictionary hash"
|
||||
gdb_test "python print (vdict\[two\])" "two str" "test dictionary hash"
|
||||
gdb_test "python print (vdict\[three\])" "three str" "test dictionary hash"
|
||||
gdb_test "python print (one.__hash__() == hash(one))" "True" "test inbuilt hash"
|
||||
}
|
||||
|
||||
# Build C version of executable. C++ is built later.
|
||||
|
Reference in New Issue
Block a user