This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][gdb/testsuite] Rewrite catch-follow-exec.exp
- From: Gary Benson <gbenson at redhat dot com>
- To: Tom de Vries <tdevries at suse dot de>
- Cc: gdb-patches at sourceware dot org, Pedro Alves <palves at redhat dot com>
- Date: Tue, 9 Oct 2018 14:51:56 +0100
- Subject: Re: [PATCH][gdb/testsuite] Rewrite catch-follow-exec.exp
- References: <20181005101122.GA23867@delia>
Tom de Vries wrote:
> append FLAGS " \"$binfile\""
> append FLAGS " -batch"
> + append FLAGS " -ex \"target native\""
> append FLAGS " -ex \"catch exec\""
> append FLAGS " -ex \"set follow-exec-mode new\""
I'm a little confused with this part, doesn't this force the test to
run on the host?
> + # We're not testing the "status returned by the spawned process",
> + # because it's currently one, and we suspect it will be zero after
> + # fixing PR23368 - "gdb goes to into background when hitting exec
> + # catchpoint with follow-exec-mode new"
> + #gdb_assert { [lindex $result 3] == 0 }
I'm not sure we should commit commented-out code. Why not have the
test assert { [lindex $result 3] == 1 } if that's what's happening
now, with the comment reworded to indicate that it might need changing
to zero when PR23368 is fixed. That way, when PR23368 *is* fixed,
whoever's fixing it gets a failing test, they investigate, find the
comment, and update it as part of their series.
Everything else looks good.
Cheers,
Gary