public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug testsuite/12647] New: racy: gdb.mi/ must not use gdb_test_multiple
Date: Thu, 07 Apr 2011 05:15:00 -0000	[thread overview]
Message-ID: <bug-12647-4717@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=12647

           Summary: racy: gdb.mi/ must not use gdb_test_multiple
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


gdb_test_multiple contains
         -re "\r\n$gdb_prompt $" {
            if ![string match "" $message] then {
                fail "$message"

but this may falsely match an unfinished output expected to be matched by:
    gdb_test_multiple "-environment-path" "-environment-path" {
        -re "\\\^done,path=\"\(.*\)\"\r\n$mi_gdb_prompt" {

as mi_gdb_prompt is (without the angle brackets, ^M as \r\n delimiter):
<[(]gdb[)] ^M
>
while gdb_prompt is (without the angle brackets):
<\(gdb\)>

Unfortunately there ar 23 uses of gdb_test_multiple in gdb.mi/*.exp.

 PASS: gdb.mi/mi2-basics.exp: environment-pwd operation
 -environment-path^M
 ^done,path="/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"^M
-(gdb) ^M
+(gdb) FAIL: gdb.mi/mi2-basics.exp: -environment-path
 Expecting: ^(207-environment-path[^M

]+)?(207\^done,path="/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"[^M
 ]+[(]gdb[)] ^M
 [ ]*)
+^M
 207-environment-path^M
 207^done,path="/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"^M
 (gdb) ^M
-PASS: gdb.mi/mi2-basics.exp: environment-path no-args operation
+FAIL: gdb.mi/mi2-basics.exp: environment-path no-args operation

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


             reply	other threads:[~2011-04-07  5:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07  5:15 jan.kratochvil at redhat dot com [this message]
2011-04-07  8:09 ` [Bug testsuite/12647] " jan.kratochvil at redhat dot com
2011-04-07  8:16 ` jan.kratochvil at redhat dot com
2011-04-07 10:31 ` pedro at codesourcery dot com
2011-04-07 10:32 ` pedro at codesourcery dot com
2011-05-05 18:19 ` mpolacek at redhat dot com
2024-01-14 15:04 ` vries at gcc dot gnu.org

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=bug-12647-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).