This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/testsuite] Minor fixups for bare metal testing


Some minor testsuite issues I noticed:

* Signals tests should check gdb,nosignals.  Otherwise, they probably
won't compile.

* watchpoints.c included headers it does not need; RealView doesn't
have <unistd.h>, so it showed up as untested instead of passing when I
compared with my GCC results.

* We recognize "Program exited with code 1" and "*** EXIT CODE 0" but
not "Program exited normally".  I was testing setting
needs_status_wrapper on a new target, and the FAIL message for a lot
of tests changed.  Match both patterns.

Tested on arm-none-eabi, and checked in to HEAD.

-- 
Daniel Jacobowitz
CodeSourcery

2010-03-24  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.base/call-signal-resume.exp, gdb.base/unwindonsignal.exp: Skip
	if gdb,nosignals.
	* gdb.base/watchpoints.c: Do not include unnecessary headers.
	* lib/gdb.exp (gdb_test_multiple): Relax pattern for "the program
	exited".

---
 gdb/testsuite/gdb.base/call-signal-resume.exp |    5 +++++
 gdb/testsuite/gdb.base/unwindonsignal.exp     |    5 +++++
 gdb/testsuite/gdb.base/watchpoints.c          |    3 ---
 gdb/testsuite/lib/gdb.exp                     |    2 +-
 4 files changed, 11 insertions(+), 4 deletions(-)

Index: gdb-mainline/gdb/testsuite/gdb.base/call-signal-resume.exp
===================================================================
--- gdb-mainline.orig/gdb/testsuite/gdb.base/call-signal-resume.exp	2010-03-24 12:39:17.000000000 -0700
+++ gdb-mainline/gdb/testsuite/gdb.base/call-signal-resume.exp	2010-03-24 14:12:44.000000000 -0700
@@ -29,6 +29,11 @@ if [target_info exists gdb,noinferiorio]
     continue
 }
 
+if [target_info exists gdb,nosignals] {
+    verbose "Skipping call-signal-resume.exp because of nosignals."
+    continue
+}
+
 set prms_id 0
 set bug_id 0
 
Index: gdb-mainline/gdb/testsuite/gdb.base/unwindonsignal.exp
===================================================================
--- gdb-mainline.orig/gdb/testsuite/gdb.base/unwindonsignal.exp	2010-03-24 12:39:17.000000000 -0700
+++ gdb-mainline/gdb/testsuite/gdb.base/unwindonsignal.exp	2010-03-24 14:12:44.000000000 -0700
@@ -22,6 +22,11 @@ if [target_info exists gdb,noinferiorio]
     continue
 }
 
+if [target_info exists gdb,nosignals] {
+    verbose "Skipping unwindonsignal.exp because of nosignals."
+    continue
+}
+
 set prms_id 0
 set bug_id 0
 
Index: gdb-mainline/gdb/testsuite/gdb.base/watchpoints.c
===================================================================
--- gdb-mainline.orig/gdb/testsuite/gdb.base/watchpoints.c	2010-03-24 12:39:17.000000000 -0700
+++ gdb-mainline/gdb/testsuite/gdb.base/watchpoints.c	2010-03-24 14:12:44.000000000 -0700
@@ -21,9 +21,6 @@
 /* This source is mainly to test what happens when a watchpoint is
    removed while another watchpoint, inserted later is left active.  */
 
-#include <stdio.h>
-#include <unistd.h>
-
 int count = -1;
 int ival1 = -1;
 int ival2 = -1;
Index: gdb-mainline/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb-mainline.orig/gdb/testsuite/lib/gdb.exp	2010-03-24 12:39:17.000000000 -0700
+++ gdb-mainline/gdb/testsuite/lib/gdb.exp	2010-03-24 14:12:44.000000000 -0700
@@ -747,7 +747,7 @@ proc gdb_test_multiple { command message
 	    fail "$errmsg"
 	    set result -1
 	}
-	 -re "EXIT code \[0-9\r\n\]+Program exited normally.*$gdb_prompt $" {
+	 -re "Program exited normally.*$gdb_prompt $" {
 	    if ![string match "" $message] then {
 		set errmsg "$message (the program exited)"
 	    } else {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]