* [patch] OpenCL datatypes test fixes
@ 2011-02-15 20:11 Ken Werner
2011-02-15 21:06 ` Ulrich Weigand
0 siblings, 1 reply; 10+ messages in thread
From: Ken Werner @ 2011-02-15 20:11 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: Text/Plain, Size: 352 bytes --]
Hi,
The attached patch fixes a few things of the gdb.opencl/datatypes.exp
testcase:
- Allow "false" when printing the content of a bool variable.
- Expect correct OpenCL names for vector types.
- Use the uc3 variable name instead of referring to the uchar3 built-in type.
- Escape the asterisk at the half pointer test.
Ok to apply?
Regards
Ken
[-- Attachment #2: opencl-testsuite.patch --]
[-- Type: text/x-patch, Size: 14117 bytes --]
gdb/testsuite/ChangeLog
2011-02-15 Ken Werner <ken.werner@de.ibm.com>
* gdb.opencl/datatypes.exp: Allow "false" when printing the content of
a bool variable. Expect correct OpenCL names for vector types. Use the
uc3 variable name instead of referring to the uchar3 built-in type.
Escape the asterisk at the half pointer test.
Index: gdb/testsuite/gdb.opencl/datatypes.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.opencl/datatypes.exp,v
retrieving revision 1.4
diff -p -u -r1.4 datatypes.exp
--- gdb/testsuite/gdb.opencl/datatypes.exp 31 Jan 2011 19:05:23 -0000 1.4
+++ gdb/testsuite/gdb.opencl/datatypes.exp 15 Feb 2011 18:44:36 -0000
@@ -229,178 +229,178 @@ set have_cl_khr_fp16 [get_integer_valueo
# Check OpenCL data types (DWARF)
gdb_test "whatis b" "type = bool"
-gdb_test "p sizeof(b)" " = 4"
-gdb_test "print b" " = 0"
+gdb_test "p sizeof(b)" " = 1"
+gdb_test "print b" " = false|0"
gdb_test "whatis c" "type = char"
gdb_test "p sizeof(c)" " = 1"
gdb_test "print/d c" " = 1"
-gdb_test "whatis c2" "type = char \\\[2\\\]"
+gdb_test "whatis c2" "type = char2|char \\\[2\\\]"
gdb_test "p sizeof(c2)" " = 2"
gdb_test "print c2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis c3" "type = char \\\[3\\\]"
+ gdb_test "whatis c3" "type = char3|char \\\[3\\\]"
gdb_test "p sizeof(c3)" " = 4"
gdb_test "print c3" " = \\{1, 2, 3\\}"
}
-gdb_test "whatis c4" "type = char \\\[4\\\]"
+gdb_test "whatis c4" "type = char4|char \\\[4\\\]"
gdb_test "p sizeof(c4)" " = 4"
gdb_test "print c4" " = \\{1, 2, 3, 4\\}"
-gdb_test "whatis c8" "type = char \\\[8\\\]"
+gdb_test "whatis c8" "type = char8|char \\\[8\\\]"
gdb_test "p sizeof(c8)" " = 8"
gdb_test "print c8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
-gdb_test "whatis c16" "type = char \\\[16\\\]"
+gdb_test "whatis c16" "type = char16|char \\\[16\\\]"
gdb_test "p sizeof(c16)" " = 16"
gdb_test "print c16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
gdb_test "whatis uc" "type = (uchar|unsigned char)"
gdb_test "p sizeof(uc)" " = 1"
gdb_test "print/d uc" " = 1"
-gdb_test "whatis uc2" "type = (uchar|unsigned char) \\\[2\\\]"
+gdb_test "whatis uc2" "type = uchar2|(uchar|unsigned char) \\\[2\\\]"
gdb_test "p sizeof(uc2)" " = 2"
gdb_test "print uc2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis uc3" "type = (uchar|unsigned char) \\\[3\\\]"
- gdb_test "p sizeof(uchar3)" " = 4"
+ gdb_test "whatis uc3" "type = uchar3|(uchar|unsigned char) \\\[3\\\]"
+ gdb_test "p sizeof(uc3)" " = 4"
gdb_test "print uc3" " = \\{1, 2, 3\\}"
}
-gdb_test "whatis uc4" "type = (uchar|unsigned char) \\\[4\\\]"
+gdb_test "whatis uc4" "type = uchar4|(uchar|unsigned char) \\\[4\\\]"
gdb_test "p sizeof(uc4)" " = 4"
gdb_test "print uc4" " = \\{1, 2, 3, 4\\}"
-gdb_test "whatis uc8" "type = (uchar|unsigned char) \\\[8\\\]"
+gdb_test "whatis uc8" "type = uchar8|(uchar|unsigned char) \\\[8\\\]"
gdb_test "p sizeof(uc8)" " = 8"
gdb_test "print uc8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
-gdb_test "whatis uc16" "type = (uchar|unsigned char) \\\[16\\\]"
+gdb_test "whatis uc16" "type = uchar16|(uchar|unsigned char) \\\[16\\\]"
gdb_test "p sizeof(uc16)" " = 16"
gdb_test "print uc16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
gdb_test "whatis s" "type = short"
gdb_test "p sizeof(s)" " = 2"
gdb_test "print s" " = -1"
-gdb_test "whatis s2" "type = short \\\[2\\\]"
+gdb_test "whatis s2" "type = short2|short \\\[2\\\]"
gdb_test "p sizeof(s2)" " = 4"
gdb_test "print s2" " = \\{-1, -2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis s3" "type = short \\\[3\\\]"
+ gdb_test "whatis s3" "type = short3|short \\\[3\\\]"
gdb_test "p sizeof(s3)" " = 8"
gdb_test "print s3" " = \\{-1, -2, -3\\}"
}
-gdb_test "whatis s4" "type = short \\\[4\\\]"
+gdb_test "whatis s4" "type = short4|short \\\[4\\\]"
gdb_test "p sizeof(s4)" " = 8"
gdb_test "print s4" " = \\{-1, -2, -3, -4\\}"
-gdb_test "whatis s8" "type = short \\\[8\\\]"
+gdb_test "whatis s8" "type = short8|short \\\[8\\\]"
gdb_test "p sizeof(s8)" " = 16"
gdb_test "print s8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}"
-gdb_test "whatis s16" "type = short \\\[16\\\]"
+gdb_test "whatis s16" "type = short16|short \\\[16\\\]"
gdb_test "p sizeof(s16)" " = 32"
gdb_test "print s16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}"
gdb_test "whatis us" "type = (ushort|unsigned short)"
gdb_test "p sizeof(us)" " = 2"
gdb_test "print us" " = 1"
-gdb_test "whatis us2" "type = (ushort|unsigned short) \\\[2\\\]"
+gdb_test "whatis us2" "type = ushort2|(ushort|unsigned short) \\\[2\\\]"
gdb_test "p sizeof(us2)" " = 4"
gdb_test "print us2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis us3" "type = (ushort|unsigned short) \\\[3\\\]"
+ gdb_test "whatis us3" "type = ushort3|(ushort|unsigned short) \\\[3\\\]"
gdb_test "p sizeof(us3)" " = 8"
gdb_test "print us3" " = \\{1, 2, 3\\}"
}
-gdb_test "whatis us4" "type = (ushort|unsigned short) \\\[4\\\]"
+gdb_test "whatis us4" "type = ushort4|(ushort|unsigned short) \\\[4\\\]"
gdb_test "p sizeof(us4)" " = 8"
gdb_test "print us4" " = \\{1, 2, 3, 4\\}"
-gdb_test "whatis us8" "type = (ushort|unsigned short) \\\[8\\\]"
+gdb_test "whatis us8" "type = ushort8|(ushort|unsigned short) \\\[8\\\]"
gdb_test "p sizeof(us8)" " = 16"
gdb_test "print us8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
-gdb_test "whatis us16" "type = (ushort|unsigned short) \\\[16\\\]"
+gdb_test "whatis us16" "type = ushort16|(ushort|unsigned short) \\\[16\\\]"
gdb_test "p sizeof(us16)" " = 32"
gdb_test "print us16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
gdb_test "whatis i" "type = int"
gdb_test "p sizeof(i)" " = 4"
gdb_test "print i" " = -1"
-gdb_test "whatis i2" "type = int \\\[2\\\]"
+gdb_test "whatis i2" "type = int2|int \\\[2\\\]"
gdb_test "p sizeof(i2)" " = 8"
gdb_test "print i2" " = \\{-1, -2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis i3" "type = int \\\[3\\\]"
+ gdb_test "whatis i3" "type = int3|int \\\[3\\\]"
gdb_test "p sizeof(i3)" " = 16"
gdb_test "print i3" " = \\{-1, -2, -3\\}"
}
-gdb_test "whatis i4" "type = int \\\[4\\\]"
+gdb_test "whatis i4" "type = int4|int \\\[4\\\]"
gdb_test "p sizeof(i4)" " = 16"
gdb_test "print i4" " = \\{-1, -2, -3, -4\\}"
-gdb_test "whatis i8" "type = int \\\[8\\\]"
+gdb_test "whatis i8" "type = int8|int \\\[8\\\]"
gdb_test "p sizeof(i8)" " = 32"
gdb_test "print i8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}"
-gdb_test "whatis i16" "type = int \\\[16\\\]"
+gdb_test "whatis i16" "type = int16|int \\\[16\\\]"
gdb_test "p sizeof(i16)" " = 64"
gdb_test "print i16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}"
gdb_test "whatis ui" "type = (uint|unsigned int)"
gdb_test "p sizeof(ui)" " = 4"
gdb_test "print ui" " = 1"
-gdb_test "whatis ui2" "type = (uint|unsigned int) \\\[2\\\]"
+gdb_test "whatis ui2" "type = uint2|(uint|unsigned int) \\\[2\\\]"
gdb_test "p sizeof(ui2)" " = 8"
gdb_test "print ui2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis ui3" "type = (uint|unsigned int) \\\[3\\\]"
+ gdb_test "whatis ui3" "type = uint3|(uint|unsigned int) \\\[3\\\]"
gdb_test "p sizeof(ui3)" " = 16"
gdb_test "print ui3" " = \\{1, 2, 3\\}"
}
-gdb_test "whatis ui4" "type = (uint|unsigned int) \\\[4\\\]"
+gdb_test "whatis ui4" "type = uint4|(uint|unsigned int) \\\[4\\\]"
gdb_test "p sizeof(ui4)" " = 16"
gdb_test "print ui4" " = \\{1, 2, 3, 4\\}"
-gdb_test "whatis ui8" "type = (uint|unsigned int) \\\[8\\\]"
+gdb_test "whatis ui8" "type = uint8|(uint|unsigned int) \\\[8\\\]"
gdb_test "p sizeof(ui8)" " = 32"
gdb_test "print ui8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
-gdb_test "whatis ui16" "type = (uint|unsigned int) \\\[16\\\]"
+gdb_test "whatis ui16" "type = uint16|(uint|unsigned int) \\\[16\\\]"
gdb_test "p sizeof(ui16)" " = 64"
gdb_test "print ui16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
gdb_test "whatis l" "type = long"
gdb_test "p sizeof(l)" " = 8"
gdb_test "print l" " = -1"
-gdb_test "whatis l2" "type = long \\\[2\\\]"
+gdb_test "whatis l2" "type = long2|long \\\[2\\\]"
gdb_test "p sizeof(l2)" " = 16"
gdb_test "print l2" " = \\{-1, -2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis l3" "type = long \\\[3\\\]"
+ gdb_test "whatis l3" "type = long3|long \\\[3\\\]"
gdb_test "p sizeof(l3)" " = 32"
gdb_test "print l3" " = \\{-1, -2, -3\\}"
}
-gdb_test "whatis l4" "type = long \\\[4\\\]"
+gdb_test "whatis l4" "type = long4|long \\\[4\\\]"
gdb_test "p sizeof(l4)" " = 32"
gdb_test "print l4" " = \\{-1, -2, -3, -4\\}"
-gdb_test "whatis l8" "type = long \\\[8\\\]"
+gdb_test "whatis l8" "type = long8|long \\\[8\\\]"
gdb_test "p sizeof(l8)" " = 64"
gdb_test "print l8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}"
-gdb_test "whatis l16" "type = long \\\[16\\\]"
+gdb_test "whatis l16" "type = long16|long \\\[16\\\]"
gdb_test "p sizeof(l16)" " = 128"
gdb_test "print l16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}"
gdb_test "whatis ul" "type = (ulong|unsigned long)"
gdb_test "p sizeof(ul)" " = 8"
gdb_test "print ul" " = 1"
-gdb_test "whatis ul2" "type = (ulong|unsigned long) \\\[2\\\]"
+gdb_test "whatis ul2" "type = ulong2|(ulong|unsigned long) \\\[2\\\]"
gdb_test "p sizeof(ul2)" " = 16"
gdb_test "print ul2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis ul3" "type = (ulong|unsigned long) \\\[3\\\]"
+ gdb_test "whatis ul3" "type = ulong3|(ulong|unsigned long) \\\[3\\\]"
gdb_test "p sizeof(ul3)" " = 32"
gdb_test "print ul3" " = \\{1, 2, 3\\}"
}
-gdb_test "whatis ul4" "type = (ulong|unsigned long) \\\[4\\\]"
+gdb_test "whatis ul4" "type = ulong4|(ulong|unsigned long) \\\[4\\\]"
gdb_test "p sizeof(ul4)" " = 32"
gdb_test "print ul4" " = \\{1, 2, 3, 4\\}"
-gdb_test "whatis ul8" "type = (ulong|unsigned long) \\\[8\\\]"
+gdb_test "whatis ul8" "type = ulong8|(ulong|unsigned long) \\\[8\\\]"
gdb_test "p sizeof(ul8)" " = 64"
gdb_test "print ul8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
-gdb_test "whatis ul16" "type = (ulong|unsigned long) \\\[16\\\]"
+gdb_test "whatis ul16" "type = ulong16|(ulong|unsigned long) \\\[16\\\]"
gdb_test "p sizeof(ul16)" " = 128"
gdb_test "print ul16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
-gdb_test "whatis ph" "type = half *"
+gdb_test "whatis ph" "type = half \\*"
gdb_test "whatis *ph" "type = half"
gdb_test "p sizeof(*ph)" " = 2"
@@ -408,21 +408,21 @@ if { ${have_cl_khr_fp16} } {
gdb_test "whatis h" "type = half"
gdb_test "p sizeof(h)" " = 2"
gdb_test "print h" " = 1"
- gdb_test "whatis h2" "type = half \\\[2\\\]"
+ gdb_test "whatis h2" "type = half2|half \\\[2\\\]"
gdb_test "p sizeof(h2)" " = 4"
gdb_test "print h2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis h3" "type = half \\\[3\\\]"
+ gdb_test "whatis h3" "type = half3|half \\\[3\\\]"
gdb_test "p sizeof(h3)" " = 8"
gdb_test "print h3" " = \\{1, 2, 3\\}"
}
- gdb_test "whatis h4" "type = half \\\[4\\\]"
+ gdb_test "whatis h4" "type = half4|half \\\[4\\\]"
gdb_test "p sizeof(h4)" " = 8"
gdb_test "print h4" " = \\{1, 2, 3, 4\\}"
- gdb_test "whatis h8" "type = half \\\[8\\\]"
+ gdb_test "whatis h8" "type = half8|half \\\[8\\\]"
gdb_test "p sizeof(h8)" " = 16"
gdb_test "print h8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
- gdb_test "whatis h16" "type = half \\\[16\\\]"
+ gdb_test "whatis h16" "type = half16|half \\\[16\\\]"
gdb_test "p sizeof(h16)" " = 16"
gdb_test "print h16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
}
@@ -430,21 +430,21 @@ if { ${have_cl_khr_fp16} } {
gdb_test "whatis f" "type = float"
gdb_test "p sizeof(f)" " = 4"
gdb_test "print f" " = 1"
-gdb_test "whatis f2" "type = float \\\[2\\\]"
+gdb_test "whatis f2" "type = float2|float \\\[2\\\]"
gdb_test "p sizeof(f2)" " = 8"
gdb_test "print f2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis f3" "type = float \\\[3\\\]"
+ gdb_test "whatis f3" "type = float3|float \\\[3\\\]"
gdb_test "p sizeof(f3)" " = 16"
gdb_test "print f3" " = \\{1, 2, 3\\}"
}
-gdb_test "whatis f4" "type = float \\\[4\\\]"
+gdb_test "whatis f4" "type = float4|float \\\[4\\\]"
gdb_test "p sizeof(f4)" " = 16"
gdb_test "print f4" " = \\{1, 2, 3, 4\\}"
-gdb_test "whatis f8" "type = float \\\[8\\\]"
+gdb_test "whatis f8" "type = float8|float \\\[8\\\]"
gdb_test "p sizeof(f8)" " = 32"
gdb_test "print f8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
-gdb_test "whatis f16" "type = float \\\[16\\\]"
+gdb_test "whatis f16" "type = float16|float \\\[16\\\]"
gdb_test "p sizeof(f16)" " = 64"
gdb_test "print f16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
@@ -452,21 +452,21 @@ if { ${have_cl_khr_fp64} } {
gdb_test "whatis d" "type = double"
gdb_test "p sizeof(d)" " = 8"
gdb_test "print d" " = 1"
- gdb_test "whatis d2" "type = double \\\[2\\\]"
+ gdb_test "whatis d2" "type = double2|double \\\[2\\\]"
gdb_test "p sizeof(d2)" " = 16"
gdb_test "print d2" " = \\{1, 2\\}"
if { ${opencl_version} >= 110 } {
- gdb_test "whatis d3" "type = double \\\[3\\\]"
+ gdb_test "whatis d3" "type = double3|double \\\[3\\\]"
gdb_test "p sizeof(d3)" " = 32"
gdb_test "print d3" " = \\{1, 2, 3\\}"
}
- gdb_test "whatis d4" "type = double \\\[4\\\]"
+ gdb_test "whatis d4" "type = double4|double \\\[4\\\]"
gdb_test "p sizeof(d4)" " = 32"
gdb_test "print d4" " = \\{1, 2, 3, 4\\}"
- gdb_test "whatis d8" "type = double \\\[8\\\]"
+ gdb_test "whatis d8" "type = double8|double \\\[8\\\]"
gdb_test "p sizeof(d8)" " = 64"
gdb_test "print d8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}"
- gdb_test "whatis d16" "type = double \\\[16\\\]"
+ gdb_test "whatis d16" "type = double16|double \\\[16\\\]"
gdb_test "p sizeof(d16)" " = 128"
gdb_test "print d16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
}
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [patch] OpenCL datatypes test fixes 2011-02-15 20:11 [patch] OpenCL datatypes test fixes Ken Werner @ 2011-02-15 21:06 ` Ulrich Weigand 2011-02-16 10:15 ` Ken Werner 0 siblings, 1 reply; 10+ messages in thread From: Ulrich Weigand @ 2011-02-15 21:06 UTC (permalink / raw) To: Ken Werner; +Cc: gdb-patches 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 ... Otherwise, this looks good to me. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-15 21:06 ` Ulrich Weigand @ 2011-02-16 10:15 ` Ken Werner 2011-02-16 10:24 ` Jan Kratochvil 2011-02-16 10:33 ` Andreas Schwab 0 siblings, 2 replies; 10+ messages in thread From: Ken Werner @ 2011-02-16 10:15 UTC (permalink / raw) To: Ulrich Weigand; +Cc: gdb-patches 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? Regards Ken ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-16 10:15 ` Ken Werner @ 2011-02-16 10:24 ` Jan Kratochvil 2011-02-16 10:33 ` Andreas Schwab 1 sibling, 0 replies; 10+ messages in thread From: Jan Kratochvil @ 2011-02-16 10:24 UTC (permalink / raw) To: Ken Werner; +Cc: Ulrich Weigand, gdb-patches On Wed, 16 Feb 2011 11:08:54 +0100, Ken Werner wrote: > 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 But if it prints: whatis c2 type = const char [2] it will also PASS. It should not. That is currently the line gdb_test "whatis c2" "type = char2|char \\\[2\\\]" means: gdb_test "whatis c2" "(type = char2|char \\\[2\\\])" which also means: gdb_test "whatis c2" ".*(type = char2|char \\\[2\\\])" which is not right. Thanks, Jan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-16 10:15 ` Ken Werner 2011-02-16 10:24 ` Jan Kratochvil @ 2011-02-16 10:33 ` Andreas Schwab 2011-02-16 13:03 ` Ken Werner 1 sibling, 1 reply; 10+ messages in thread From: Andreas Schwab @ 2011-02-16 10:33 UTC (permalink / raw) To: Ken Werner; +Cc: Ulrich Weigand, gdb-patches 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." ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-16 10:33 ` Andreas Schwab @ 2011-02-16 13:03 ` Ken Werner 2011-02-16 13:55 ` Ulrich Weigand 0 siblings, 1 reply; 10+ messages in thread From: Ken Werner @ 2011-02-16 13:03 UTC (permalink / raw) To: Andreas Schwab, Jan Kratochvil; +Cc: Ulrich Weigand, gdb-patches On Wednesday, February 16, 2011 11:24:21 am Andreas Schwab wrote: > 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\\\])" Does this also mean: gdb_test "whatis c2" "type = .*(char(2| \\\[2\\\]))" as suggested by Jan? My intension was to exactly match either "char2" or "char [2]". Thanks Ken ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-16 13:03 ` Ken Werner @ 2011-02-16 13:55 ` Ulrich Weigand 2011-02-16 14:31 ` Ken Werner 0 siblings, 1 reply; 10+ messages in thread From: Ulrich Weigand @ 2011-02-16 13:55 UTC (permalink / raw) To: Ken Werner; +Cc: Andreas Schwab, Jan Kratochvil, gdb-patches Ken Werner wrote: > On Wednesday, February 16, 2011 11:24:21 am Andreas Schwab wrote: > > Ken Werner <ken@linux.vnet.ibm.com> writes: > > > On Tuesday, February 15, 2011 10:01:55 pm Ulrich Weigand wrote: > > > > 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\\\])" > > Does this also mean: > gdb_test "whatis c2" "type = .*(char(2| \\\[2\\\]))" > as suggested by Jan? No, the implicit ".*" is only at the *beginning* of the match string, not somewhere in the middle, so that gdb_test "whatis c2" "type = char(2| \\\[2\\\])" is equivalent to gdb_test "whatis c2" ".*type = char(2| \\\[2\\\])" which is equivalent to gdb_test "whatis c2" "(.*type = char2|.*type = char \\\[2\\\])" if you prefer ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-16 13:55 ` Ulrich Weigand @ 2011-02-16 14:31 ` Ken Werner 2011-02-16 14:40 ` Ulrich Weigand 0 siblings, 1 reply; 10+ messages in thread From: Ken Werner @ 2011-02-16 14:31 UTC (permalink / raw) To: Ulrich Weigand; +Cc: Andreas Schwab, Jan Kratochvil, gdb-patches [-- Attachment #1: Type: Text/Plain, Size: 958 bytes --] On Wednesday, February 16, 2011 2:09:54 pm Ulrich Weigand wrote: > Ken Werner wrote: > > On Wednesday, February 16, 2011 11:24:21 am Andreas Schwab wrote: > > > Ken Werner <ken@linux.vnet.ibm.com> writes: > > > > On Tuesday, February 15, 2011 10:01:55 pm Ulrich Weigand wrote: > > > 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\\\])" > > > > Does this also mean: > > gdb_test "whatis c2" "type = .*(char(2| \\\[2\\\]))" > > > > as suggested by Jan? > > No, the implicit ".*" is only at the *beginning* of the match string, > not somewhere in the middle, so that > gdb_test "whatis c2" "type = char(2| \\\[2\\\])" > is equivalent to > gdb_test "whatis c2" ".*type = char(2| \\\[2\\\])" Ah, now it makes sense - thank you! Attached is an updated version of the patch. Ken [-- Attachment #2: opencl-testsuite.patch --] [-- Type: text/x-patch, Size: 14041 bytes --] gdb/testsuite/ChangeLog 2011-02-16 Ken Werner <ken.werner@de.ibm.com> * gdb.opencl/datatypes.exp: Allow "false" when printing the content of a bool variable. Expect correct OpenCL names for vector types. Use the uc3 variable name instead of referring to the uchar3 built-in type. Escape the asterisk at the half pointer test. Index: gdb/testsuite/gdb.opencl/datatypes.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.opencl/datatypes.exp,v retrieving revision 1.5 diff -p -u -r1.5 datatypes.exp --- gdb/testsuite/gdb.opencl/datatypes.exp 15 Feb 2011 20:10:13 -0000 1.5 +++ gdb/testsuite/gdb.opencl/datatypes.exp 16 Feb 2011 13:51:43 -0000 @@ -230,177 +230,177 @@ set have_cl_khr_fp16 [get_integer_valueo # Check OpenCL data types (DWARF) gdb_test "whatis b" "type = bool" gdb_test "p sizeof(b)" " = 1" -gdb_test "print b" " = 0" +gdb_test "print b" " = (false|0)" gdb_test "whatis c" "type = char" gdb_test "p sizeof(c)" " = 1" gdb_test "print/d c" " = 1" -gdb_test "whatis c2" "type = char \\\[2\\\]" +gdb_test "whatis c2" "type = char(2| \\\[2\\\])" gdb_test "p sizeof(c2)" " = 2" gdb_test "print c2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis c3" "type = char \\\[3\\\]" + gdb_test "whatis c3" "type = char(3| \\\[3\\\])" gdb_test "p sizeof(c3)" " = 4" gdb_test "print c3" " = \\{1, 2, 3\\}" } -gdb_test "whatis c4" "type = char \\\[4\\\]" +gdb_test "whatis c4" "type = char(4| \\\[4\\\])" gdb_test "p sizeof(c4)" " = 4" gdb_test "print c4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis c8" "type = char \\\[8\\\]" +gdb_test "whatis c8" "type = char(8| \\\[8\\\])" gdb_test "p sizeof(c8)" " = 8" gdb_test "print c8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis c16" "type = char \\\[16\\\]" +gdb_test "whatis c16" "type = char(16| \\\[16\\\])" gdb_test "p sizeof(c16)" " = 16" gdb_test "print c16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis uc" "type = (uchar|unsigned char)" gdb_test "p sizeof(uc)" " = 1" gdb_test "print/d uc" " = 1" -gdb_test "whatis uc2" "type = (uchar|unsigned char) \\\[2\\\]" +gdb_test "whatis uc2" "type = (uchar2|(uchar|unsigned char) \\\[2\\\])" gdb_test "p sizeof(uc2)" " = 2" gdb_test "print uc2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis uc3" "type = (uchar|unsigned char) \\\[3\\\]" - gdb_test "p sizeof(uchar3)" " = 4" + gdb_test "whatis uc3" "type = (uchar3|(uchar|unsigned char) \\\[3\\\])" + gdb_test "p sizeof(uc3)" " = 4" gdb_test "print uc3" " = \\{1, 2, 3\\}" } -gdb_test "whatis uc4" "type = (uchar|unsigned char) \\\[4\\\]" +gdb_test "whatis uc4" "type = (uchar4|(uchar|unsigned char) \\\[4\\\])" gdb_test "p sizeof(uc4)" " = 4" gdb_test "print uc4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis uc8" "type = (uchar|unsigned char) \\\[8\\\]" +gdb_test "whatis uc8" "type = (uchar8|(uchar|unsigned char) \\\[8\\\])" gdb_test "p sizeof(uc8)" " = 8" gdb_test "print uc8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis uc16" "type = (uchar|unsigned char) \\\[16\\\]" +gdb_test "whatis uc16" "type = (uchar16|(uchar|unsigned char) \\\[16\\\])" gdb_test "p sizeof(uc16)" " = 16" gdb_test "print uc16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis s" "type = short" gdb_test "p sizeof(s)" " = 2" gdb_test "print s" " = -1" -gdb_test "whatis s2" "type = short \\\[2\\\]" +gdb_test "whatis s2" "type = short(2| \\\[2\\\])" gdb_test "p sizeof(s2)" " = 4" gdb_test "print s2" " = \\{-1, -2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis s3" "type = short \\\[3\\\]" + gdb_test "whatis s3" "type = short(3| \\\[3\\\])" gdb_test "p sizeof(s3)" " = 8" gdb_test "print s3" " = \\{-1, -2, -3\\}" } -gdb_test "whatis s4" "type = short \\\[4\\\]" +gdb_test "whatis s4" "type = short(4| \\\[4\\\])" gdb_test "p sizeof(s4)" " = 8" gdb_test "print s4" " = \\{-1, -2, -3, -4\\}" -gdb_test "whatis s8" "type = short \\\[8\\\]" +gdb_test "whatis s8" "type = short(8| \\\[8\\\])" gdb_test "p sizeof(s8)" " = 16" gdb_test "print s8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}" -gdb_test "whatis s16" "type = short \\\[16\\\]" +gdb_test "whatis s16" "type = short(16| \\\[16\\\])" gdb_test "p sizeof(s16)" " = 32" gdb_test "print s16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}" gdb_test "whatis us" "type = (ushort|unsigned short)" gdb_test "p sizeof(us)" " = 2" gdb_test "print us" " = 1" -gdb_test "whatis us2" "type = (ushort|unsigned short) \\\[2\\\]" +gdb_test "whatis us2" "type = (ushort2|(ushort|unsigned short) \\\[2\\\])" gdb_test "p sizeof(us2)" " = 4" gdb_test "print us2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis us3" "type = (ushort|unsigned short) \\\[3\\\]" + gdb_test "whatis us3" "type = (ushort3|(ushort|unsigned short) \\\[3\\\])" gdb_test "p sizeof(us3)" " = 8" gdb_test "print us3" " = \\{1, 2, 3\\}" } -gdb_test "whatis us4" "type = (ushort|unsigned short) \\\[4\\\]" +gdb_test "whatis us4" "type = (ushort4|(ushort|unsigned short) \\\[4\\\])" gdb_test "p sizeof(us4)" " = 8" gdb_test "print us4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis us8" "type = (ushort|unsigned short) \\\[8\\\]" +gdb_test "whatis us8" "type = (ushort8|(ushort|unsigned short) \\\[8\\\])" gdb_test "p sizeof(us8)" " = 16" gdb_test "print us8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis us16" "type = (ushort|unsigned short) \\\[16\\\]" +gdb_test "whatis us16" "type = (ushort16|(ushort|unsigned short) \\\[16\\\])" gdb_test "p sizeof(us16)" " = 32" gdb_test "print us16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis i" "type = int" gdb_test "p sizeof(i)" " = 4" gdb_test "print i" " = -1" -gdb_test "whatis i2" "type = int \\\[2\\\]" +gdb_test "whatis i2" "type = int(2| \\\[2\\\])" gdb_test "p sizeof(i2)" " = 8" gdb_test "print i2" " = \\{-1, -2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis i3" "type = int \\\[3\\\]" + gdb_test "whatis i3" "type = int(3| \\\[3\\\])" gdb_test "p sizeof(i3)" " = 16" gdb_test "print i3" " = \\{-1, -2, -3\\}" } -gdb_test "whatis i4" "type = int \\\[4\\\]" +gdb_test "whatis i4" "type = int(4| \\\[4\\\])" gdb_test "p sizeof(i4)" " = 16" gdb_test "print i4" " = \\{-1, -2, -3, -4\\}" -gdb_test "whatis i8" "type = int \\\[8\\\]" +gdb_test "whatis i8" "type = int(8| \\\[8\\\])" gdb_test "p sizeof(i8)" " = 32" gdb_test "print i8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}" -gdb_test "whatis i16" "type = int \\\[16\\\]" +gdb_test "whatis i16" "type = int(16| \\\[16\\\])" gdb_test "p sizeof(i16)" " = 64" gdb_test "print i16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}" gdb_test "whatis ui" "type = (uint|unsigned int)" gdb_test "p sizeof(ui)" " = 4" gdb_test "print ui" " = 1" -gdb_test "whatis ui2" "type = (uint|unsigned int) \\\[2\\\]" +gdb_test "whatis ui2" "type = (uint2|(uint|unsigned int) \\\[2\\\])" gdb_test "p sizeof(ui2)" " = 8" gdb_test "print ui2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis ui3" "type = (uint|unsigned int) \\\[3\\\]" + gdb_test "whatis ui3" "type = (uint3|(uint|unsigned int) \\\[3\\\])" gdb_test "p sizeof(ui3)" " = 16" gdb_test "print ui3" " = \\{1, 2, 3\\}" } -gdb_test "whatis ui4" "type = (uint|unsigned int) \\\[4\\\]" +gdb_test "whatis ui4" "type = (uint4|(uint|unsigned int) \\\[4\\\])" gdb_test "p sizeof(ui4)" " = 16" gdb_test "print ui4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis ui8" "type = (uint|unsigned int) \\\[8\\\]" +gdb_test "whatis ui8" "type = (uint8|(uint|unsigned int) \\\[8\\\])" gdb_test "p sizeof(ui8)" " = 32" gdb_test "print ui8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis ui16" "type = (uint|unsigned int) \\\[16\\\]" +gdb_test "whatis ui16" "type = (uint16|(uint|unsigned int) \\\[16\\\])" gdb_test "p sizeof(ui16)" " = 64" gdb_test "print ui16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis l" "type = long" gdb_test "p sizeof(l)" " = 8" gdb_test "print l" " = -1" -gdb_test "whatis l2" "type = long \\\[2\\\]" +gdb_test "whatis l2" "type = long(2| \\\[2\\\])" gdb_test "p sizeof(l2)" " = 16" gdb_test "print l2" " = \\{-1, -2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis l3" "type = long \\\[3\\\]" + gdb_test "whatis l3" "type = long(3| \\\[3\\\])" gdb_test "p sizeof(l3)" " = 32" gdb_test "print l3" " = \\{-1, -2, -3\\}" } -gdb_test "whatis l4" "type = long \\\[4\\\]" +gdb_test "whatis l4" "type = long(4| \\\[4\\\])" gdb_test "p sizeof(l4)" " = 32" gdb_test "print l4" " = \\{-1, -2, -3, -4\\}" -gdb_test "whatis l8" "type = long \\\[8\\\]" +gdb_test "whatis l8" "type = long(8| \\\[8\\\])" gdb_test "p sizeof(l8)" " = 64" gdb_test "print l8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}" -gdb_test "whatis l16" "type = long \\\[16\\\]" +gdb_test "whatis l16" "type = long(16| \\\[16\\\])" gdb_test "p sizeof(l16)" " = 128" gdb_test "print l16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}" gdb_test "whatis ul" "type = (ulong|unsigned long)" gdb_test "p sizeof(ul)" " = 8" gdb_test "print ul" " = 1" -gdb_test "whatis ul2" "type = (ulong|unsigned long) \\\[2\\\]" +gdb_test "whatis ul2" "type = (ulong2|(ulong|unsigned long) \\\[2\\\])" gdb_test "p sizeof(ul2)" " = 16" gdb_test "print ul2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis ul3" "type = (ulong|unsigned long) \\\[3\\\]" + gdb_test "whatis ul3" "type = (ulong3|(ulong|unsigned long) \\\[3\\\])" gdb_test "p sizeof(ul3)" " = 32" gdb_test "print ul3" " = \\{1, 2, 3\\}" } -gdb_test "whatis ul4" "type = (ulong|unsigned long) \\\[4\\\]" +gdb_test "whatis ul4" "type = (ulong4|(ulong|unsigned long) \\\[4\\\])" gdb_test "p sizeof(ul4)" " = 32" gdb_test "print ul4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis ul8" "type = (ulong|unsigned long) \\\[8\\\]" +gdb_test "whatis ul8" "type = (ulong8|(ulong|unsigned long) \\\[8\\\])" gdb_test "p sizeof(ul8)" " = 64" gdb_test "print ul8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis ul16" "type = (ulong|unsigned long) \\\[16\\\]" +gdb_test "whatis ul16" "type = (ulong16|(ulong|unsigned long) \\\[16\\\])" gdb_test "p sizeof(ul16)" " = 128" gdb_test "print ul16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" -gdb_test "whatis ph" "type = half *" +gdb_test "whatis ph" "type = half \\*" gdb_test "whatis *ph" "type = half" gdb_test "p sizeof(*ph)" " = 2" @@ -408,21 +408,21 @@ if { ${have_cl_khr_fp16} } { gdb_test "whatis h" "type = half" gdb_test "p sizeof(h)" " = 2" gdb_test "print h" " = 1" - gdb_test "whatis h2" "type = half \\\[2\\\]" + gdb_test "whatis h2" "type = half(2| \\\[2\\\])" gdb_test "p sizeof(h2)" " = 4" gdb_test "print h2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis h3" "type = half \\\[3\\\]" + gdb_test "whatis h3" "type = half(3| \\\[3\\\])" gdb_test "p sizeof(h3)" " = 8" gdb_test "print h3" " = \\{1, 2, 3\\}" } - gdb_test "whatis h4" "type = half \\\[4\\\]" + gdb_test "whatis h4" "type = half(4| \\\[4\\\])" gdb_test "p sizeof(h4)" " = 8" gdb_test "print h4" " = \\{1, 2, 3, 4\\}" - gdb_test "whatis h8" "type = half \\\[8\\\]" + gdb_test "whatis h8" "type = half(8| \\\[8\\\])" gdb_test "p sizeof(h8)" " = 16" gdb_test "print h8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" - gdb_test "whatis h16" "type = half \\\[16\\\]" + gdb_test "whatis h16" "type = half(16| \\\[16\\\])" gdb_test "p sizeof(h16)" " = 16" gdb_test "print h16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" } @@ -430,21 +430,21 @@ if { ${have_cl_khr_fp16} } { gdb_test "whatis f" "type = float" gdb_test "p sizeof(f)" " = 4" gdb_test "print f" " = 1" -gdb_test "whatis f2" "type = float \\\[2\\\]" +gdb_test "whatis f2" "type = float(2| \\\[2\\\])" gdb_test "p sizeof(f2)" " = 8" gdb_test "print f2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis f3" "type = float \\\[3\\\]" + gdb_test "whatis f3" "type = float(3| \\\[3\\\])" gdb_test "p sizeof(f3)" " = 16" gdb_test "print f3" " = \\{1, 2, 3\\}" } -gdb_test "whatis f4" "type = float \\\[4\\\]" +gdb_test "whatis f4" "type = float(4| \\\[4\\\])" gdb_test "p sizeof(f4)" " = 16" gdb_test "print f4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis f8" "type = float \\\[8\\\]" +gdb_test "whatis f8" "type = float(8| \\\[8\\\])" gdb_test "p sizeof(f8)" " = 32" gdb_test "print f8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis f16" "type = float \\\[16\\\]" +gdb_test "whatis f16" "type = float(16| \\\[16\\\])" gdb_test "p sizeof(f16)" " = 64" gdb_test "print f16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" @@ -452,21 +452,21 @@ if { ${have_cl_khr_fp64} } { gdb_test "whatis d" "type = double" gdb_test "p sizeof(d)" " = 8" gdb_test "print d" " = 1" - gdb_test "whatis d2" "type = double \\\[2\\\]" + gdb_test "whatis d2" "type = double(2| \\\[2\\\])" gdb_test "p sizeof(d2)" " = 16" gdb_test "print d2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis d3" "type = double \\\[3\\\]" + gdb_test "whatis d3" "type = double(3| \\\[3\\\])" gdb_test "p sizeof(d3)" " = 32" gdb_test "print d3" " = \\{1, 2, 3\\}" } - gdb_test "whatis d4" "type = double \\\[4\\\]" + gdb_test "whatis d4" "type = double(4| \\\[4\\\])" gdb_test "p sizeof(d4)" " = 32" gdb_test "print d4" " = \\{1, 2, 3, 4\\}" - gdb_test "whatis d8" "type = double \\\[8\\\]" + gdb_test "whatis d8" "type = double(8| \\\[8\\\])" gdb_test "p sizeof(d8)" " = 64" gdb_test "print d8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" - gdb_test "whatis d16" "type = double \\\[16\\\]" + gdb_test "whatis d16" "type = double(16| \\\[16\\\])" gdb_test "p sizeof(d16)" " = 128" gdb_test "print d16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" } ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-16 14:31 ` Ken Werner @ 2011-02-16 14:40 ` Ulrich Weigand 2011-02-16 15:38 ` Ken Werner 0 siblings, 1 reply; 10+ messages in thread From: Ulrich Weigand @ 2011-02-16 14:40 UTC (permalink / raw) To: Ken Werner; +Cc: Andreas Schwab, Jan Kratochvil, gdb-patches Ken Werner wrote: > 2011-02-16 Ken Werner <ken.werner@de.ibm.com> > > * gdb.opencl/datatypes.exp: Allow "false" when printing the content of > a bool variable. Expect correct OpenCL names for vector types. Use the > uc3 variable name instead of referring to the uchar3 built-in type. > Escape the asterisk at the half pointer test. This is OK. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch] OpenCL datatypes test fixes 2011-02-16 14:40 ` Ulrich Weigand @ 2011-02-16 15:38 ` Ken Werner 0 siblings, 0 replies; 10+ messages in thread From: Ken Werner @ 2011-02-16 15:38 UTC (permalink / raw) To: Ulrich Weigand; +Cc: Andreas Schwab, Jan Kratochvil, gdb-patches On Wednesday, February 16, 2011 3:31:28 pm Ulrich Weigand wrote: > Ken Werner wrote: > > 2011-02-16 Ken Werner <ken.werner@de.ibm.com> > > > > * gdb.opencl/datatypes.exp: Allow "false" when printing the content of > > a bool variable. Expect correct OpenCL names for vector types. Use the > > uc3 variable name instead of referring to the uchar3 built-in type. > > Escape the asterisk at the half pointer test. > > This is OK. Patch applied: http://sourceware.org/ml/gdb-cvs/2011-02/msg00113.html Thanks Ken ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-02-16 14:40 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-02-15 20:11 [patch] OpenCL datatypes test fixes Ken Werner 2011-02-15 21:06 ` Ulrich Weigand 2011-02-16 10:15 ` Ken Werner 2011-02-16 10:24 ` Jan Kratochvil 2011-02-16 10:33 ` Andreas Schwab 2011-02-16 13:03 ` Ken Werner 2011-02-16 13:55 ` Ulrich Weigand 2011-02-16 14:31 ` Ken Werner 2011-02-16 14:40 ` Ulrich Weigand 2011-02-16 15:38 ` Ken Werner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox