Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFA-v2] testsuite: Add a test for passing of environment variables to inferior
Date: Tue, 04 Oct 2011 17:27:00 -0000	[thread overview]
Message-ID: <m3ipo4oeft.fsf@fleche.redhat.com> (raw)
In-Reply-To: <12954.5351061553$1317744599@news.gmane.org> (Pierre Muller's	message of "Tue, 4 Oct 2011 18:09:19 +0200")

>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre> 2011-10-04  Pierre Muller  <muller@ics.u-strasbg.fr>

Pierre> 	Add tests for passing of environment variables to inferior.
Pierre> 	* gdb.base/testenv.c: New test source.
Pierre> 	* gdb.base/testenv.exp: New expect test.

Thanks for doing this.

Pierre> +#ifdef PROTOTYPES
Pierre> +int main (int argc, char **argv, char **envp)

You don't need to handle the no PROTOTYPES case any more.

Pierre> +if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
Pierre> +     untested testenv.exp
Pierre> +     return -1
Pierre> +}
Pierre> +
Pierre> +# Start with a fresh gdb
Pierre> +
Pierre> +gdb_exit
Pierre> +gdb_start
Pierre> +gdb_reinitialize_dir $srcdir/$subdir
Pierre> +gdb_load ${binfile}

You can use prepare_for_testing instead.

Pierre> +runto main

There's a special runto_main proc for this.

Pierre> +gdb_exit
Pierre> +
Pierre> +set env(TEST_GDB_GLOBAL) "Global environment value"
Pierre> +
Pierre> +gdb_start
Pierre> +gdb_reinitialize_dir $srcdir/$subdir
Pierre> +gdb_load ${binfile}

You can use clean_restart here.

Tom


  parent reply	other threads:[~2011-10-04 17:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-04 12:36 [RFA] " Pierre Muller
2011-10-04 13:45 ` Corinna Vinschen
2011-10-04 14:43   ` Eli Zaretskii
2011-10-04 14:48     ` Pierre Muller
2011-10-04 14:50   ` Pierre Muller
2011-10-04 15:13     ` Corinna Vinschen
2011-10-04 16:09       ` [RFA-v2] " Pierre Muller
2011-10-04 16:11       ` [RFA] " Pierre Muller
2011-10-05 11:40         ` Corinna Vinschen
2011-10-05 12:08           ` Pierre Muller
2011-10-05 12:52             ` Corinna Vinschen
2011-10-06 14:51               ` Christopher Faylor
2011-10-06 15:03                 ` Corinna Vinschen
2011-10-07 12:26                   ` Christopher Faylor
2011-10-07 13:53                     ` Corinna Vinschen
     [not found]       ` <12954.5351061553$1317744599@news.gmane.org>
2011-10-04 17:27         ` Tom Tromey [this message]
2011-10-04 21:35           ` [RFA-v3] " Pierre Muller
     [not found]           ` <29288.743020925$1317764135@news.gmane.org>
2011-10-05 13:53             ` Tom Tromey
2011-10-05 14:25               ` Pierre Muller

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=m3ipo4oeft.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /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