Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/rfc] KFAIL gdb.c++/annota2.exp watch triggered on a.x
@ 2003-01-03 21:36 David Carlton
  2003-01-03 21:39 ` Daniel Jacobowitz
  2003-01-09 17:10 ` David Carlton
  0 siblings, 2 replies; 11+ messages in thread
From: David Carlton @ 2003-01-03 21:36 UTC (permalink / raw)
  To: gdb-patches; +Cc: Michael Elizabeth Chastain

Here's a patch to KFAIL the test "watch triggered on a.x" in
gdb.c++/annota2.exp, corresponding to PR breakpoints/38.  The test
fails consistently on all the configurations that Michael tests.

This is an obvious candidate for KFAILing.  My only question is when
it should currently be expected to pass.  The PR indicates that it
might pass on some platforms; on the other hand, it fails reliably
on i686-pc-linux-gnu.  So what I did was change the two existing
instances of

  { pass "watch triggered on a.x" }

to

  { setup_kfail "gdb/38" "i686*-*-*"
    pass "watch triggered on a.x" }

but I made the new KFAIL case unconditional.  That seemed to be the
safest thing: that way, any FAIL or KPASS message is interesting.

I'm also a little worried that there are two pass regexps listed
whereas I'm only listing one fail regexp; it seems plausible to me
that I should add a second fail regexp.  But I don't want to do that
without seeing such a pattern in the wild.

I'll commit this on Wednesday unless somebody disagrees with how I'm
handling when to {K,}{FAIL,PASS} or unless somebody turns up more
KFAIL regexps.

David Carlton
carlton@math.stanford.edu

2003-01-03  David Carlton  <carlton@math.stanford.edu>

	* gdb.c++/annota2.exp: KFAIL "watch triggered on a.x".
	Add copyright year 2003.

Index: annota2.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/annota2.exp,v
retrieving revision 1.8
diff -u -p -r1.8 annota2.exp
--- annota2.exp	20 Dec 2002 18:37:15 -0000	1.8
+++ annota2.exp	3 Jan 2003 21:18:08 -0000
@@ -1,4 +1,4 @@
-#   Copyright 1999, 2000, 2001, 2002
+#   Copyright 1999, 2000, 2001, 2002, 2003
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -194,9 +194,13 @@ gdb_expect {
 send_gdb "next\n"
 gdb_expect {
    -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
-	   { pass "watch triggered on a.x" }
+	   { setup_kfail "gdb/38" "i686*-*-*"
+             pass "watch triggered on a.x" }
    -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\n\.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" \
-	   { pass "watch triggered on a.x" }
+	   { setup_kfail "gdb/38" "i686*-*-*"
+             pass "watch triggered on a.x" }
+   -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+	   { kfail "gdb/38" "watch triggered on a.x" }
    -re ".*$gdb_prompt$"  { fail "watch triggered on a.x" }
    timeout    { fail "watch triggered on a.x (timeout)" }
 }


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [patch/rfc] KFAIL gdb.c++/annota2.exp watch triggered on a.x
@ 2003-01-03 22:12 Michael Elizabeth Chastain
  2003-01-03 22:27 ` David Carlton
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Elizabeth Chastain @ 2003-01-03 22:12 UTC (permalink / raw)
  To: carlton, drow; +Cc: gdb-patches

One advantage of David's code is that when the bug gets fixed,
people see a more informative message for a while: "KPASS gdb/38"
rather than "PASS".

One disadvantage is that it adds more file editing steps to the
lifecycle.  David, what edits, exactly, are you envisioning
when "KPASS gdb/38" starts popping up?

You shouldn't delete this part:

  -re "known bad expression" {
    kfail "gdb/NNN" "test name"
  }

... because old bugs have a way of popping up again, especially
when additional configurations get tested.

Michael C


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [patch/rfc] KFAIL gdb.c++/annota2.exp watch triggered on a.x
@ 2003-01-03 23:19 Michael Elizabeth Chastain
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Elizabeth Chastain @ 2003-01-03 23:19 UTC (permalink / raw)
  To: carlton, drow; +Cc: gdb-patches

Daniel J says:
> OK; you're definitely right.  How about a compromise: we agree not to
> remove kfail patterns in the testsuite, but instead replace them with
> specific fail patterns and a commented out reference to the failure.
> That makes life much simpler.

That sounds good to me.

Before the bug fix:

  -re "known bad pattern" {
    kfail "gdb/38" "test name"
  }

After the bug fix:

  -re "known bad pattern" {
    # this was pr gdb/38
    fail "test name"
  }

If somebody leaves a KFAIL pointing to a closed bug, and the KFAIL
fires, then eventually somebody will notice that the KFAIL points to
a closed bug -- which means that the bug has re-appeared.  The bug ID#
then provides valuable history.

If somebody applies the 'bug fix' too soon, or it doesn't work in
all cases, then the person investigating it will see the comment
about "gdb 38" in the test script source pretty quickly.

Michael C


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-01-09 17:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-03 21:36 [patch/rfc] KFAIL gdb.c++/annota2.exp watch triggered on a.x David Carlton
2003-01-03 21:39 ` Daniel Jacobowitz
2003-01-03 21:48   ` David Carlton
2003-01-03 21:51     ` Daniel Jacobowitz
2003-01-03 22:14       ` David Carlton
2003-01-03 22:30         ` Daniel Jacobowitz
2003-01-03 22:57           ` David Carlton
2003-01-09 17:10 ` David Carlton
2003-01-03 22:12 Michael Elizabeth Chastain
2003-01-03 22:27 ` David Carlton
2003-01-03 23:19 Michael Elizabeth Chastain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox