Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom de Vries <tdevries@suse.de>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3][gdb/testsuite] Fix global array leaks
Date: Tue, 2 Jun 2020 14:24:41 +0100	[thread overview]
Message-ID: <6c56aebe-c54a-5b86-a13a-d0432e544c5c@redhat.com> (raw)
In-Reply-To: <b4fbb91f-c4d5-f7ce-e3b5-c1402dca6fce@suse.de>

On 6/2/20 2:07 PM, Tom de Vries wrote:
> On 22-05-2020 22:13, Tom Tromey wrote:
>>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>>
>> Tom> Several test-cases define global arrays, which remain set after the test-case
>> Tom> has run.  This has the potential to cause tcl errors.
>>
>> Tom> Fix this by wrapping each test-case in a namespace.  Add a README entry on how
>> Tom> to do that.
>>
>> Tom> Tested on x86_64-linux.
>>
>> Tom> Any comments?
>>
>> This seems fine to me, but doesn't all the code in the namespace{} need
>> to be reindented?
> 
> I'm not sure.
> 
> I based the style on what I saw Pedro doing here (
> https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=gdb/testsuite/gdb.multi/multi-kill.exp;h=03bf8449cf87694c0153e2bbb2ff476cccb1e342;hp=ce6075045fc4a9e99987067bc22e4a86e089f9d5;hb=272c36b87f81fd64e5f4669730da72c39d0716b3;hpb=013707794a67269dd34fd8ae6e354e982c547dc0
> ).
> 

I was going by:

 - we don't indent within-namespace code in C++.  And I think that's a good thing, since if
   we assume the end goal of everything being inside a namespace, then the indentation is
   just a waste of horizontal space.  TCL's usual practice may be different, I don't know.

 - reindenting everything in preexisting files seems like a lot of churn for little gain.

Thanks,
Pedro Alves



      reply	other threads:[~2020-06-02 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 16:29 Tom de Vries
2020-05-22 20:13 ` Tom Tromey
2020-06-02 13:07   ` Tom de Vries
2020-06-02 13:24     ` Pedro Alves [this message]

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=6c56aebe-c54a-5b86-a13a-d0432e544c5c@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    --cc=tom@tromey.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