public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug testsuite/30288] [gdb/cli, editing off] FAIL: gdb.base/trace-commands.exp: nested trace-commands test (pattern 2)
Date: Fri, 31 Mar 2023 15:15:39 +0000	[thread overview]
Message-ID: <bug-30288-4717-4BEfB7nTDa@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30288-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30288

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=89447229c7961dd99d5167f2ebcc5d8973d5d5ae

commit 89447229c7961dd99d5167f2ebcc5d8973d5d5ae
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Mar 31 17:15:37 2023 +0200

    [gdb/testsuite] Fix gdb.threads/threadapply.exp with editing off

    With test-case gdb.threads/threadapply.exp and editing set to on, we have:
    ...
    (gdb) define remove^M
    Type commands for definition of "remove".^M
    End with a line saying just "end".^M
    >remove-inferiors 3^M
    >end^M
    (gdb)
    ...
    but with editing set to off, we run into:
    ...
    (gdb) define remove^M
    Type commands for definition of "remove".^M
    End with a line saying just "end".^M
    >remove-inferiors 3^M
    end^M
    >(gdb) FAIL: gdb.threads/threadapply.exp: thread_set=all: try remove: \
      define remove (timeout)
    ...

    The commands are issued by this test:
    ...
            gdb_define_cmd "remove" {
                "remove-inferiors 3"
            }
    ...
    which does:
    - gdb_test_multiple "define remove", followed by
    - gdb_test_multiple "remove-inferiors 3\nend".

    Proc gdb_test_multiple has special handling for multi-line commands, which
    splits it up into subcommands, and for each subcommand issues it and then
    waits for the resulting prompt (the secondary prompt ">" for all but the
last
    subcommand).

    However, that doesn't work as expected in this case because the initial
    gdb_test_multiple "define remove" fails to match all resulting output, and
    consequently the secondary prompt resulting from "define remove" is counted
as
    if it was the one resulting from "remove-inferiors 3".

    Fix this by matching the entire output of "define remove", including the
    secondary prompt.

    Tested on x86_64-linux.

    PR testsuite/30288
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30288

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-03-31 15:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 16:45 [Bug cli/30288] New: " vries at gcc dot gnu.org
2023-03-30  4:14 ` [Bug cli/30288] " vries at gcc dot gnu.org
2023-03-31 14:05 ` [Bug testsuite/30288] " vries at gcc dot gnu.org
2023-03-31 15:15 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-31 15:15 ` cvs-commit at gcc dot gnu.org
2023-03-31 15:16 ` vries at gcc dot gnu.org
2023-03-31 15:33 ` 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-30288-4717-4BEfB7nTDa@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).