Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Gary Benson <gbenson@redhat.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>,
	 gdb-patches@sourceware.org,  Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH v2] Indicate batch mode failures by exiting with nonzero status
Date: Fri, 31 Aug 2018 14:33:00 -0000	[thread overview]
Message-ID: <87pnxy1u94.fsf@tromey.com> (raw)
In-Reply-To: <CAHegJiJkYTTbRdXwR+da9Cr+A3unhCtQSNwLbbaO4YPqv4TWFA@mail.gmail.com>	(Gary Benson's message of "Fri, 31 Aug 2018 14:30:23 +0100")

>>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:

Gary> Yes please! Is it failing on *every* platform? I looked in gdb.log.xz
Gary> but there's no output from GDB, only the PASS/FAIL lines.  So I don't
Gary> really know what to do, I can't reproduce :/

It fails for me too.  I ran with -v and saw this in the .log:

    RESULT = 11271 exp6 0 0
    PASS: gdb.base/batch-exit-status.exp: -batch: [lindex $result 2] == 0
    PASS: gdb.base/batch-exit-status.exp: -batch: $actual_status == $expect_status
    Quitting /home/tromey/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/tromey/gdb/build/gdb/testsuite/../data-directory 
    doing kill, pid is 11271
    Spawning /home/tromey/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/tromey/gdb/build/gdb/testsuite/../data-directory -batch -jslkflsdjlkfjlksdjf
    RESULT = 11271 exp6 0 0
    PASS: gdb.base/batch-exit-status.exp: -batch -jslkflsdjlkfjlksdjf: [lindex $result 2] == 0
    FAIL: gdb.base/batch-exit-status.exp: -batch -jslkflsdjlkfjlksdjf: $actual_status == $expect_status
    Quitting /home/tromey/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/tromey/gdb/build/gdb/testsuite/../data-directory 
    doing kill, pid is 11271


Note how the PID doesn't change.

I suspect that what is happening is that gdb_spawn_id isn't being reset,
and so we're hitting this code in default_gdb_spawn:

    if [info exists gdb_spawn_id] {
	return 0
    }

Something has to unset this after each invocation.
Maybe calling clear_gdb_spawn_id, but I don't know if that's best or if
there should be something else.

Tom


  reply	other threads:[~2018-08-31 14:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 10:47 Gary Benson
2018-08-22 14:37 ` Eli Zaretskii
2018-08-23  8:00   ` Gary Benson
2018-08-23 16:37 ` Pedro Alves
2018-08-30 20:26 ` Sergio Durigan Junior
2018-08-31 13:30   ` Gary Benson
2018-08-31 14:33     ` Tom Tromey [this message]
2018-08-31 14:42       ` Pedro Alves
2018-09-03 16:12         ` [PATCH] Fix batch exit status test failure on Fedora 28 Gary Benson
2018-09-04 11:39           ` Pedro Alves
2018-09-04 14:37             ` Gary Benson
2018-08-31 15:38     ` [PATCH v2] Indicate batch mode failures by exiting with nonzero status Sergio Durigan Junior

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=87pnxy1u94.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@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