From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com
Subject: Re: testsuite: prefix handling
Date: Tue, 21 Feb 2012 20:08:00 -0000 [thread overview]
Message-ID: <4F43E459.9070706@redhat.com> (raw)
In-Reply-To: <87wr7gt63r.fsf@fleche.redhat.com>
On 02/21/2012 06:05 PM, Tom Tromey wrote:
>
> Pedro> Only a few tests weren't converted to use with_test_prefix by this
> Pedro> patch. Those are ones that I found that:
>
> Pedro> - would require a large reindent
> Pedro> - or with_test_prefix wasn't a 1-1 replacement
>
> I don't mind large reindents in a situation like this.
> I think the resulting code would be better.
> It is up to you, though; I also don't mind the status quo.
I really dislike mixing in a lot of formatting changes with
code changes, so I was really avoiding it. It's a harder patch to
read/prove right, and a harder patch to maintain as well. If someone
sent me over this change mixed in with a lots of reindents, and hadn't
at least sent me a -W diff, I'd groan. :-) We can always do
a "reindent" patch as follow up, perhaps even as multiple patches.
>
> Pedro> WDYT?
>
> Pedro> -proc altivec_abi_tests { extra_flags force_abi } {
> Pedro> +proc altivec_abi_tests { prefix extra_flags force_abi } { with_test_prefix $prefix {
> [...]
> Pedro> +}}
>
> I think newlines and reindentation would result in prettier code.
Honestly, I kind of liked the current formatting -- I was kind of reading it
as a function attribute. But I don't mind seeing this re-indented either.
But that's a lower priority to me.
> Pedro> - altivec_abi_tests "additional_flags=-maltivec" "auto"
> Pedro> + altivec_abi_tests " default ABI, auto:" "additional_flags=-maltivec" "auto"
>
> It would be both prettier and better encapsulation if with_test_prefix
> supplied the space.
Thing is I stumbled on tests that don't currently output a space. So I'm not
sure we should always require spaces. Changing those would make this patch
not an identity patch -- it'd produce different gdb.sum output compared to
the current mainline. I can try making with_test_prefix always add the space
instead as follow up, and see which tests are those, and if we'd get something
non-sensical. Probably not.
>
> Pedro> +# Test files shall make sure all the test result lines in gdb.sum are
> Pedro> +# unique in a test run, so that comparing the gdb.sum files of two
> Pedro> +# test runs gives correct results. Test files that exercise
> Pedro> +# variations of the same tests more than once, shall prefix the
> Pedro> +# different test invocations with different identifying strings in
> Pedro> +# order to make them unique.
> [...]
>
> I love the comment.
:-)
--
Pedro Alves
next prev parent reply other threads:[~2012-02-21 19:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 19:37 [PATCH 0/2] gdb.threads/attach-into-signal.exp: prepare for gdbserver Pedro Alves
2012-02-17 19:38 ` [PATCH 1/2] gdb.threads/attach-into-signal.exp: cleanup Pedro Alves
2012-02-17 20:55 ` Tom Tromey
2012-02-17 21:00 ` Pedro Alves
2012-02-17 22:04 ` Tom Tromey
2012-02-20 13:27 ` Pedro Alves
2012-02-21 16:05 ` testsuite: prefix handling Pedro Alves
2012-02-21 18:18 ` Jan Kratochvil
2012-02-21 19:28 ` Pedro Alves
2012-02-21 19:54 ` Tom Tromey
2012-02-21 19:17 ` Tom Tromey
2012-02-21 20:08 ` Pedro Alves [this message]
2012-02-21 20:59 ` Pedro Alves
2012-02-21 21:02 ` Tom Tromey
2012-02-21 22:08 ` Pedro Alves
2012-02-21 21:00 ` Tom Tromey
2012-02-21 22:03 ` Pedro Alves
2012-02-17 21:31 ` [PATCH 1/2] gdb.threads/attach-into-signal.exp: cleanup Pedro Alves
2012-03-01 11:47 ` Pedro Alves
2012-02-17 23:55 ` Joel Brobecker
2012-02-20 8:57 ` Jan Kratochvil
2012-02-17 19:52 ` [PATCH 2/2] gdb.threads/attach-into-signal.exp: don't rely on linux native target's internal debug output Pedro Alves
2012-02-20 9:41 ` Jan Kratochvil
2012-02-20 12:32 ` Pedro Alves
2012-02-20 12:34 ` Jan Kratochvil
2012-02-20 12:37 ` Pedro Alves
2012-02-21 18:17 ` Edjunior Barbosa Machado
2012-02-21 19:11 ` Pedro Alves
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=4F43E459.9070706@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=tromey@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