Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Handle eof in gdb_internal_error_resync
Date: Mon, 6 Sep 2021 17:48:33 +0200	[thread overview]
Message-ID: <ed694054-dc99-4c7e-aab1-f1cb8d2bf612@suse.de> (raw)
In-Reply-To: <20210905063948.GA22464@delia>

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

[ was: Re: [PATCH][gdb/testsuite] Simplify
gdb.dwarf2/locexpr-data-member-location.exp ]

On 9/5/21 8:39 AM, Tom de Vries wrote:
> Then fix the:
> ...
> ERROR: : spawn id exp9 not open
> ...
> by handling eof in gdb_internal_error_resync.

I've fixed this in a separate patch.

Thanks,
- Tom

[-- Attachment #2: 0001-gdb-testsuite-Handle-eof-in-gdb_internal_error_resync.patch --]
[-- Type: text/x-patch, Size: 1533 bytes --]

[gdb/testsuite] Handle eof in gdb_internal_error_resync

Before commit 5a20fadc841 the test-case
gdb.dwarf2/locexpr-data-member-location.exp fails like this:
...
FAIL: gdb.dwarf2/locexpr-data-member-location.exp: running to bar in runto \
  (GDB internal error)
ERROR: : spawn id exp9 not open
    while executing
"expect {
-i exp9 -timeout 10
            -re "Quit this debugging session\\? \\(y or n\\) $" {
                send_gdb "n\n" answer
                incr count
            }
            -re "Create ..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $body" NONE : spawn id exp9 not open
ERROR: Could not resync from internal error (timeout)
...

Fix the:
...
ERROR: : spawn id exp9 not open
...
by handling eof in gdb_internal_error_resync, such that we have instead:
...
FAIL: gdb.dwarf2/locexpr-data-member-location.exp: running to bar in runto \
  (GDB internal error)
ERROR: Could not resync from internal error (eof)
...

Tested on x86_64-linux.

---
 gdb/testsuite/lib/gdb.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 00336bd588e..cdda51529fb 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -770,6 +770,10 @@ proc gdb_internal_error_resync {} {
 		perror "Could not resync from internal error (timeout)"
 		return 0
 	    }
+	    eof {
+		perror "Could not resync from internal error (eof)"
+		return 0
+	    }
 	}
     }
     perror "Could not resync from internal error (resync count exceeded)"

  reply	other threads:[~2021-09-06 15:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05  6:39 [PATCH][gdb/testsuite] Simplify gdb.dwarf2/locexpr-data-member-location.exp Tom de Vries via Gdb-patches
2021-09-06 15:48 ` Tom de Vries via Gdb-patches [this message]
2021-09-06 23:28 ` [committed][gdb/testsuite] Handle internal-error in gdb_run_cmd Tom de Vries via Gdb-patches
2021-09-07  8:21 ` [committed][gdb/testsuite] Handle internal-error in gdb_unload Tom de Vries via Gdb-patches
2021-09-07  8:52 ` [PATCH][gdb/testsuite] Simplify gdb.dwarf2/locexpr-data-member-location.exp Tom de Vries via Gdb-patches
2021-09-08  0:34   ` Simon Marchi via Gdb-patches

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=ed694054-dc99-4c7e-aab1-f1cb8d2bf612@suse.de \
    --to=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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