Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/mi-testsuite] XFAIL mi*-console.exp
Date: Thu, 04 Apr 2002 08:36:00 -0000	[thread overview]
Message-ID: <20020404113615.A31160@nevyn.them.org> (raw)
In-Reply-To: <3CAC6D69.E2A395F4@redhat.com>

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 {


  reply	other threads:[~2002-04-04 16:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-02 16:42 Daniel Jacobowitz
2002-04-02 16:52 ` Michael Snyder
2002-04-02 17:01   ` Daniel Jacobowitz
2002-04-02 17:22     ` Michael Snyder
2002-04-02 17:39       ` Daniel Jacobowitz
2002-04-03  6:14         ` Fernando Nasser
2002-04-04  7:15           ` Fernando Nasser
2002-04-04  8:36             ` Daniel Jacobowitz [this message]
2002-04-04 11:09             ` Andrew Cagney
2002-04-03 20:27 ` Andrew Cagney
2002-04-03 21:13   ` Daniel Jacobowitz
2002-04-04 13:49     ` Andrew Cagney
2002-04-04 13:53       ` Daniel Jacobowitz
2002-04-06 15:04         ` Andrew Cagney
2002-04-04 16:55       ` Fernando Nasser
2002-04-05  6:49         ` Andrew Cagney
2002-04-05  7:22           ` Fernando Nasser
2002-04-05  7:23 Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020404113615.A31160@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=fnasser@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox