diff options
author | Yao Qi <yao@codesourcery.com> | 2014-09-15 16:41:39 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-10-15 15:33:15 +0800 |
commit | 46dc13946233b4b5ac2b34fb78e19fe60cd0606a (patch) | |
tree | 724deec47076eb3895685be726f9ec8da8a03172 /gdb/testsuite | |
parent | eeed9cc785ca447868967e5c84dae63e9ca8e6c2 (diff) | |
download | fsf-binutils-gdb-46dc13946233b4b5ac2b34fb78e19fe60cd0606a.zip fsf-binutils-gdb-46dc13946233b4b5ac2b34fb78e19fe60cd0606a.tar.gz fsf-binutils-gdb-46dc13946233b4b5ac2b34fb78e19fe60cd0606a.tar.bz2 |
Clean up gdb.python/ tests
This patch is to clean up various gdb.python/*.exp tests, such as
removing trailing ".*" from the pattern and fix one typo I find during
reading the code.
gdb/testsuite:
2014-10-15 Yao Qi <yao@codesourcery.com>
* gdb.python/python.exp: Remove trailing ".*". Fix typo
locationn.
* gdb.python/py-symbol.exp: Remove trailing ".*" in the
pattern.
* gdb.python/py-symtab.exp: Likewise.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-symbol.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-symtab.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/python.exp | 6 |
4 files changed, 15 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1029e32..79fc861 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2014-10-15 Yao Qi <yao@codesourcery.com> + + * gdb.python/py-symbol.exp: Remove trailing ".*" in the + pattern. + * gdb.python/py-symtab.exp: Likewise. + * gdb.python/python.exp: Remove trailing ".*". Fix typo + locationn. + 2014-10-14 Joel Brobecker <brobecker@adacore.com> * gdb.ada/addr_arith: New testcase. diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp index 9b6ba2e..eadbcad 100644 --- a/gdb/testsuite/gdb.python/py-symbol.exp +++ b/gdb/testsuite/gdb.python/py-symbol.exp @@ -117,7 +117,7 @@ gdb_test "python print (t\[0\].addr_class == gdb.SYMBOL_LOC_CONST)" "True" "Test gdb_test "python print (t\[0\].type)" "enum tag" "Get type" # Test symtab attribute. -gdb_test "python print (t\[0\].symtab)" "gdb.python/py-symbol.c.*" "Get symtab" +gdb_test "python print (t\[0\].symtab)" "gdb.python/py-symbol.c" "Get symtab" # C++ tests # Recompile binary. diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp index e6ac9c3..d8f7d48 100644 --- a/gdb/testsuite/gdb.python/py-symtab.exp +++ b/gdb/testsuite/gdb.python/py-symtab.exp @@ -50,16 +50,16 @@ gdb_py_test_silent_cmd "step" "Step to the next line" 0 gdb_py_test_silent_cmd "python new_pc = gdb.selected_frame().find_sal().pc" "Get new PC" 0 # Test sal. -gdb_test "python print (sal.symtab)" ".*gdb.python/py-symbol.c.*" "Test symtab" +gdb_test "python print (sal.symtab)" ".*gdb.python/py-symbol.c" "Test symtab" gdb_test "python print (sal.pc)" "${decimal}" "Test sal.pc" gdb_test "python print (sal.last == (new_pc - 1))" "True" "Test sal.last" gdb_test "python print (sal.line)" "$line_no" "Test sal.line" gdb_test "python print (sal.is_valid())" "True" "Test sal.is_valid" # Test symbol table. -gdb_test "python print (symtab.filename)" ".*gdb.python/py-symbol.c.*" "Test symtab.filename" +gdb_test "python print (symtab.filename)" ".*gdb.python/py-symbol.c" "Test symtab.filename" gdb_test "python print (symtab.objfile)" "<gdb.Objfile object at ${hex}>" "Test symtab.objfile" -gdb_test "python print (symtab.fullname())" "testsuite/gdb.python/py-symbol.c.*" "Test symtab.fullname" +gdb_test "python print (symtab.fullname())" "testsuite/gdb.python/py-symbol.c" "Test symtab.fullname" gdb_test "python print (symtab.is_valid())" "True" "Test symtab.is_valid()" gdb_test "python print (\"qq\" in global_symbols)" "True" "Test qq in global symbols" gdb_test "python print (\"func\" in global_symbols)" "True" "Test func in global symbols" diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index 49f6e88..748700b 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -189,14 +189,14 @@ gdb_py_test_silent_cmd "python symtab = gdb.decode_line()" "test decode_line cur 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 (symtab\[1\]\[0\].symtab)" ".*gdb.python/python.c.*" "Test decode_line current locationn filename" +gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/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)" ".*gdb.python/python.c.*" "Test decode_line python.c:26 filename" +gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/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\")" \ @@ -204,7 +204,7 @@ gdb_test "python gdb.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 (symtab\[1\]\[0\].symtab)" ".*gdb.python/python-1.c.*" "Test decode_line func1 filename" +gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*gdb.python/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 |