public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix "spawn id XYZ not open" errors in gdb.mi/mi-exec-run.exp
Date: Mon, 28 Feb 2022 15:31:23 +0100	[thread overview]
Message-ID: <CAJVr-EN2pmk340-rsjcif1wyP1ZrrEVGm_mKM5TWS0DLooxtOw@mail.gmail.com> (raw)
In-Reply-To: <20220224174113.1620498-1-keiths@redhat.com>

On Thu, Feb 24, 2022 at 6:42 PM Keith Seitz via Gdb-patches <
gdb-patches@sourceware.org> wrote:

> Running mi-exec-run.exp on native-extended-gdbserver/-m{32,64}
> causes several Tcl errors to appear. For example,
>
> (gdb)
> ERROR: : spawn id exp20 not open
>     while executing
> "expect {
> -i exp11 -timeout 10
>                 -i "$inferior_spawn_id"
>                 -re ".*Cannot exec.*Permission denied" {
>                     set saw_perm_error 1
>                     verbose -log "saw..."
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel $body" NONE : spawn id exp20 not open
> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate:
> force-fail=1: run failure detected (eof)
>
> This is happening because of the way this test is implemented:
>
>         while {1} {
>             gdb_expect {
>                 -i "$inferior_spawn_id"
>                 -re ".*Cannot exec.*Permission denied" {
>                     set saw_perm_error 1
>                     verbose -log "saw mi error"
>                 }
>                 -i "$gdb_spawn_id"
>                 -re "\\^error,msg=\"During startup program exited with
> code 127" {
>                     set saw_mi_error 1
>                     verbose -log "saw mi error"
>                 }
>                # and so on
>             }
>         }
> I can see this ERROR on Fedora Rawhide when running:
>

 make check RUNTESTFLAGS="--target_board native-extended-gdbserver"
 TESTS=gdb.mi/mi-exec-run.exp

I'm using glibc-2.35.9000-6.fc37.x86_64 and gcc-12.0.1-0.9.fc37.x86_64.
After applying this patch the TCL errors are gone and I can see one FAIL:

Running
/root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.mi/mi-exec-run.exp
...
FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate:
force-fail=0: breakpoint hit reported on console (timeout)

=== gdb Summary ===

# of expected passes 13
# of unexpected failures 1

  reply	other threads:[~2022-02-28 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 17:41 Keith Seitz
2022-02-28 14:31 ` Alexandra Petlanova Hajkova [this message]
2022-02-28 17:32 ` Andrew Burgess
2022-02-28 19:57   ` Keith Seitz

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=CAJVr-EN2pmk340-rsjcif1wyP1ZrrEVGm_mKM5TWS0DLooxtOw@mail.gmail.com \
    --to=ahajkova@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).