This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA/mi-testsuite] XFAIL mi*-console.exp


On Thu, Apr 04, 2002 at 10:12:41AM -0500, Fernando Nasser wrote:
> I think you all missed this one...
> 
> Fernando Nasser wrote:
> > 
> > Daniel Jacobowitz wrote:
> > >
> > > That's
> > > why I'd rather XFAIL than skip the tests.
> > >
> > 
> > It would be "unsupported" (which means that some feature is not
> > supported in this platform and so we can't run the test).

Probably because we've had this conversation a half-dozen times and I
can never remember what we agreed on.  This seems unintuitive to me
because:
`UNSUPPORTED'
     There is no support for the tested case.  This may mean that a
     conditional feature of an operating system, or of a compiler, is
     not implemented.  DejaGnu also uses this message when a testing
     environment (often a "bare board" target) lacks basic support for
     compiling or running the test case.  For example, a test for the
     system subroutine `gethostname' would never work on a target board
     running only a boot monitor.

This is not a case of the test being inherently unsupported by the
system; it's a case of the code not being there to do it.  Compare to:

`XFAIL'
     A test failed, but it was expected to fail.  This result indicates
     no change in a known bug.  If a test fails because the operating
     system where the test runs lacks some facility required by the
     test, the outcome is `UNSUPPORTED' instead.


That's not how GDB is using XFAIL, although it does seem to be how
we're using UNSUPPORTED (more or less, sometimes less).

In any case, how's this?  It doesn't mark it unsupported and skip the
test; instead it detects the failure which means "no gdb code to
support this" and returns UNSUPPORTED.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2002-04-04  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.mi/mi-console.exp: Accept native console output as an
	XFAIL.  Don't run the test if we don't have inferior IO.
	* gdb.mi/mi0-console.exp: Likewise.

Index: testsuite/gdb.mi/mi-console.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-console.exp,v
retrieving revision 1.7
diff -u -p -r1.7 mi-console.exp
--- mi-console.exp	2001/08/19 01:23:43	1.7
+++ mi-console.exp	2002/04/03 01:00:34
@@ -79,7 +79,8 @@ gdb_expect {
     }
 }
 
-gdb_expect {
+if {![gdb_skip_stdio_test "Hello message"]} {
+  gdb_expect {
     -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
 	pass "Hello message"
     }
@@ -92,11 +93,12 @@ gdb_expect {
 	# multiple event sources to channel the output back through the
 	# MI.
 
-	fail "Hello message (known bug)"
+	unsupported "Hello message (known limitation)"
     }
     timeout {
 	fail "Hello message (timeout)"
     }
+  }
 }
     
 gdb_expect {
Index: testsuite/gdb.mi/mi0-console.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi0-console.exp,v
retrieving revision 1.5
diff -u -p -r1.5 mi0-console.exp
--- mi0-console.exp	2001/08/19 01:23:43	1.5
+++ mi0-console.exp	2002/04/03 01:00:34
@@ -79,7 +79,8 @@ gdb_expect {
     }
 }
 
-gdb_expect {
+if {![gdb_skip_stdio_test "Hello message"]} {
+  gdb_expect {
     -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
 	pass "Hello message"
     }
@@ -92,11 +93,12 @@ gdb_expect {
 	# multiple event sources to channel the output back through the
 	# MI.
 
-	fail "Hello message (known bug)"
+	unsupported "Hello message (known limitation)"
     }
     timeout {
 	fail "Hello message (timeout)"
     }
+  }
 }
     
 gdb_expect {


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