diff options
author | Keith Seitz <keiths@redhat.com> | 2018-08-16 14:37:49 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2018-08-16 17:00:16 -0700 |
commit | c1854f1d5a8fb5d86c7ac6d118348759cfa8c393 (patch) | |
tree | 382128e97e9ee88d7513e6f7153f6fa2708b46b4 /gdb | |
parent | 2cdcc33021214e77c2c185aa78ad4f9ae1b9e565 (diff) | |
download | binutils-c1854f1d5a8fb5d86c7ac6d118348759cfa8c393.zip binutils-c1854f1d5a8fb5d86c7ac6d118348759cfa8c393.tar.gz binutils-c1854f1d5a8fb5d86c7ac6d118348759cfa8c393.tar.bz2 |
Use gdb_test_no_output for compile tests expected to pass
There is a small think-o in compile.exp:
if { $srcfile3 != "" } {
gdb_test "p constvar" " = 3"
gdb_test "info addr constvar" {Symbol "constvar" is constant\.}
gdb_test "compile code globalvar = constvar;"; # INCORRECT
gdb_test "print globalvar" " = 3" "print constvar value"
} else {
untested "print constvar value"
}
The line marked INCORRECT runs a simple "compile code" which is expected
to succeed. When this happens, the compile plug-in and GDB will not
output anything. The use of gdb_test matches against anything.
This is certainly not the intent, and this patch corrects the two instances
of this in the file. [The rest of gdb.compile looks okay.]
testsuite/ChangeLog:
* gdb.compile/compile.exp: Use gdb_test_no_output for "compile code"
tests expected to pass.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.compile/compile.exp | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1b4dde5..84ef82f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-08-16 Keith Seitz <keiths@redhat.com> + + * gdb.compile/compile.exp: Use gdb_test_no_output for "compile code" + tests expected to pass. + 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz> * gdb.mi/mi-disassemble.exp (test_disassembly_only): Add tests for diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index 4303c02..2ed5577 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -256,7 +256,7 @@ gdb_test "print union_object.intfield" " = 7" # LOC_UNRESOLVED tests. gdb_test "print unresolved" " = 20" -gdb_test "compile code globalvar = unresolved;" +gdb_test_no_output "compile code globalvar = unresolved;" gdb_test "print globalvar" " = 20" "print unresolved value" # Test shadowing with global and static variables. @@ -353,7 +353,7 @@ if { $srcfile3 != "" } { gdb_test "p constvar" " = 3" gdb_test "info addr constvar" {Symbol "constvar" is constant\.} - gdb_test "compile code globalvar = constvar;" + gdb_test_no_output "compile code globalvar = constvar;" gdb_test "print globalvar" " = 3" "print constvar value" } else { untested "print constvar value" |