This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: testsuite: prefix handling
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> if {$r == 0} {
Pedro> I think checking for $r == 1 (TCL_ERROR) explicitly is more correct.
I agree. My Tcl is rusty :)
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.
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.
The size of the diff is secondary to me; just because we'll have to read
and edit the result, not the patch.
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.
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.
Tom