This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[testsuite] Check 'info proc' supported earlier
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 1 Jun 2012 20:43:51 +0800
- Subject: [testsuite] Check 'info proc' supported earlier
I saw the following fail when testing tic6x-elf gdb,
info proc
Not supported on this target.
(gdb) FAIL: gdb.base/info-proc.exp: info proc without a process
looks like test case should check whether `info proc' is supported
earlier. This patch is obvious, and I'll commit it in two or three
days if no comments.
gdb/testsuite:
2012-06-01 Yao Qi <yao@codesourcery.com>
* gdb.base/info-proc.exp: Return if target doesn't support
'info proc'.
---
gdb/testsuite/gdb.base/info-proc.exp | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp
index 14bd1ee..1cefb6d 100644
--- a/gdb/testsuite/gdb.base/info-proc.exp
+++ b/gdb/testsuite/gdb.base/info-proc.exp
@@ -47,25 +47,24 @@ gdb_load ${binfile}
gdb_test "help info proc" "Show /proc process information about .*"
-gdb_test "info proc" "No current process.*" "info proc without a process"
-
-if { ! [ runto_main ] } then {
- untested info-proc.exp
- return -1
-}
-
-# Does this gdb support info proc?
-gdb_test_multiple "info proc" "info proc" {
+gdb_test_multiple "info proc" "info proc without a process" {
+ -re "No current process.*$gdb_prompt $" {
+ pass "info proc without a process"
+ }
-re "Not supported on this target.*$gdb_prompt $" {
# info proc command not supported -- nothing to test here.
unsupported "gdb does not support info proc on this target"
return -1;
}
- -re "process ${decimal}.*$gdb_prompt $" {
- pass "info proc with process"
- }
}
+if { ! [ runto_main ] } then {
+ untested info-proc.exp
+ return -1
+}
+
+gdb_test "info proc" "process ${decimal}.*" "info proc with process"
+
gdb_test "info proc mapping" \
".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*" \
"info proc mapping"
--
1.7.0.4