Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@freebsd.org>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3] Add a 'starti' command.
Date: Wed, 15 Nov 2017 20:11:00 -0000	[thread overview]
Message-ID: <1615021.krJEU3LQPO@ralph.baldwin.cx> (raw)
In-Reply-To: <86inerwm8t.fsf@gmail.com>

On Friday, November 03, 2017 01:00:18 PM Yao Qi wrote:
> John Baldwin <jhb@FreeBSD.org> writes:
> 
> > +# Continue to the start of main().  The constructor should have run so
> > +# 'x' should be 1.
> > +
> > +gdb_breakpoint main
> > +gdb_test_sequence "continue" "" {
> > +    "\\$2 = 1"
> > +    ".*Breakpoint .*main \\(\\) at .*starti.c.*"
> 
> Here is a test failure, captured by buildbot,
> https://sourceware.org/ml/gdb-testers/2017-q3/msg04381.html
> 
> (gdb) gdb_expect_list pattern: /\$2 = 1/
> continue^M
> Continuing.^M
> $2 = 1^M
> gdb_expect_list pattern: /.*Breakpoint .*main \(\) at .*starti.c.*/
> ^M
> Breakpoint 1, Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing: ^M
> main () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.base/starti.c:29^M
> 29        return 0;^M
> (gdb) gdb_expect_list pattern: //
> FAIL: gdb.base/starti.exp: continue (pattern 3 + sentinel) (timeout)
> 
> Can you take a look?

Hmm, so it seems the python exception adds a newline which throws the regex
match off as 'main \(\)' is now on a second line.  The 'start.exp' test
only looks for the 'main' bit and not the preceding 'Breakpoint', so
something like this instead?

commit ec4df1376eee46840faa5857ed6fb497df2e7a69
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Wed Nov 15 12:08:13 2017 -0800

    Relax final regex in starti.exp test.
    
    Python exceptions from unwinders can interrupt the output between
    'Breakpoint <n>' and the function name, so use a simpler regex that
    only looks for the function name and filename similar to the regex
    used in start.exp.
    
    gdb/testsuite/ChangeLog:
    
            * gdb.base/starti.exp ("continue" test): Loosen regex.

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index bb8dd7923d..601b43cde2 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-15  John Baldwin  <jhb@FreeBSD.org>
+
+	* gdb.base/starti.exp ("continue" test): Loosen regex.
+
 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* gdb.tui/completionn.exp (test_tab_completion): Add space in
diff --git a/gdb/testsuite/gdb.base/starti.exp b/gdb/testsuite/gdb.base/starti.exp
index 98167ce5c7..78d092e5fd 100644
--- a/gdb/testsuite/gdb.base/starti.exp
+++ b/gdb/testsuite/gdb.base/starti.exp
@@ -47,5 +47,5 @@ gdb_test_sequence "" "starti" {
 gdb_breakpoint main
 gdb_test_sequence "continue" "" {
     "\\$2 = 1"
-    ".*Breakpoint .*main \\(\\) at .*starti.c.*"
+    "main \\(\\) at .*starti.c.*"
 }


-- 
John Baldwin


  reply	other threads:[~2017-11-15 20:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 22:08 John Baldwin
2017-09-18 23:15 ` John Baldwin
2017-09-19 14:35 ` Pedro Alves
2017-09-19 18:23   ` John Baldwin
2017-09-19 18:29     ` Pedro Alves
2017-11-03 13:00 ` Yao Qi
2017-11-15 20:11   ` John Baldwin [this message]
2017-11-15 20:23     ` Pedro Alves
2017-11-15 23:32       ` John Baldwin
2017-11-16 10:54         ` Pedro Alves
2017-11-16 12:38           ` [pushed] Fix gdb.base/starti.exp racy test (Re: [PATCH v3] Add a 'starti' command.) Pedro Alves
2017-11-16 18:00             ` John Baldwin
2017-11-16 18:15               ` Pedro Alves
2017-11-16  9:55       ` [PATCH v3] Add a 'starti' command Yao Qi

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=1615021.krJEU3LQPO@ralph.baldwin.cx \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.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