This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] OpenCL datatypes test fixes
Ken Werner <ken@linux.vnet.ibm.com> writes:
> On Tuesday, February 15, 2011 10:01:55 pm Ulrich Weigand wrote:
>> Ken Werner wrote:
>> > -gdb_test "whatis c2" "type = char \\\[2\\\]"
>> > +gdb_test "whatis c2" "type = char2|char \\\[2\\\]"
>>
>> Don't we need some parentheses here (and everywere you've
>> introduced alternatives via |)? Otherwise, it seems that
>> this would stop working with the older compilers ...
>
> Hi Ulrich,
>
> Thanks for looking into this patch. Sometimes the GDB testsuite is a mystery
> to me. This time it seems to work without parentheses:
>
> old compiler:
> whatis c2
> type = char [2]
> (gdb) PASS: gdb.opencl/datatypes.exp: whatis c2
>
> new compiler:
> whatis c2
> type = char2
> (gdb) PASS: gdb.opencl/datatypes.exp: whatis c2
>
> Any suggestions?
This passes because "char \\\[2\\\]" matches (a substring of) the first
output, but you really want to match the whole string "type = char [2]".
+gdb_test "whatis c2" "type = char(2| \\\[2\\\])"
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."