aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2014-07-14 19:55:31 +0100
committerPedro Alves <palves@redhat.com>2014-07-14 20:30:41 +0100
commitbd29394088b5685d336a501fadca88b25ed777bc (patch)
tree2b8d810c13fb9cc90d48ef9cea307033152e3739 /gdb/testsuite/gdb.trace
parent9d1e69a21488cb5b8b7553c8df18ee5c3f4d82e3 (diff)
downloadgdb-bd29394088b5685d336a501fadca88b25ed777bc.zip
gdb-bd29394088b5685d336a501fadca88b25ed777bc.tar.gz
gdb-bd29394088b5685d336a501fadca88b25ed777bc.tar.bz2
testsuite: Introduce gdb_assert
Often we'll do something like: if {$ok} { fail "whatever" } else { pass "whatever" } This adds a helper procedure for that, and converts one random place to use it, as an example. 2014-07-14 Pedro Alves <palves@redhat.com> * lib/gdb.exp (gdb_assert): New procedure. * gdb.trace/backtrace.exp (gdb_backtrace_tdp_4): Use it.
Diffstat (limited to 'gdb/testsuite/gdb.trace')
-rw-r--r--gdb/testsuite/gdb.trace/backtrace.exp7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp
index a74fc3f..cb50f06 100644
--- a/gdb/testsuite/gdb.trace/backtrace.exp
+++ b/gdb/testsuite/gdb.trace/backtrace.exp
@@ -256,11 +256,8 @@ proc gdb_backtrace_tdp_4 { msg depth traceframe } {
# Output of 'tdump' on frame 0 and frame 1 should be
# identical.
- if ![string compare $output_string0 $output_string1] {
- pass "tdump output"
- } else {
- fail "tdump output"
- }
+ gdb_assert ![string compare $output_string0 $output_string1] \
+ "tdump output"
}
}