Commit Graph

12 Commits

Author SHA1 Message Date
Marcin Hajder
aa49f3bb53 Added few missing format cases for zero and blank space padding (#2016)
according to work plan for issue #1058
2024-08-13 09:50:07 -07:00
Marcin Hajder
19cb042985 Extended printf test to support more vector cases (#2019)
according to work plan for issue
https://github.com/KhronosGroup/OpenCL-CTS/issues/1058
2024-08-06 08:45:58 -07:00
David Neto
0be82dce5e [printf] Test empty format string, and empty arg string (#2018)
Issue: #1058
2024-07-23 20:11:34 +01:00
David Neto
5b5e43e1fb [printf]: input value should be exactly representable as 32-bit float (#2015)
Fixed: #2009
2024-07-18 14:08:43 -07:00
Marcin Hajder
8cd2b7d799 Extended printf test with new mixed format cases (#1988)
According to work plan from issue #1058

Added new case `TYPE_MIXED_FORMAT_RANDOM` which focus on three factors:

-data before conversion flags - this is randomly generated ascii string
-randomly generated conversion flags - integer or floating point, for
each flag specific argument is generated
-data after conversion flags - this is randomly generated ascii string

Moreover, due to fact in case of `TYPE_MIXED_FORMAT_RANDOM` test is
generated on the fly, logging of negative result was extended.
2024-07-09 08:47:31 -07:00
Karol Herbst
89923f8004 Extend printf tests with more %% corner cases (#1986)
We've had a couple of bugs inside mesa/rusticl processing %% correctly.
I've added those cases locally to make sure all corner cases are
properly handled.
2024-07-02 09:30:03 -07:00
Marcin Hajder
582fea57dc Extended printf test with new strings cases (#1951)
According to work plan from issue #1058

Corrections to general test:
-removed duplication of separate tests for each element of
`PrintfTestType` vector, instead `doTest` procedure would iterate over
vector related to specific `PrintfTestType` automaticaly
-fixed procedure to assemble kernel source so it can accept only one
parameter of the function ( eg. `printf("%%");` )
-incorporated important modifications from #1940 to avoid expected
conflicts
-warnings fixes, minor corrections, clang format

Extension for string testing:
-special symbols
-nested symbols
-all ascii characters 
-added new type of test `TYPE_FORMAT_STRING` to verify format string
only (according to request from the issue)
2024-06-18 08:44:18 -07:00
Marcin Hajder
88a707dd13 Corrections for printf test with floating point limits arguments (#1940)
According to work plan from issue #1058
2024-05-21 08:38:04 -07:00
Marcin Hajder
20ab003053 Added cl_half support for test_printf (#1622)
* Added support to test half floats with printf calls (issue #142, printf)

* Added corrections related to rounding and casting halfs (issue #142, printf)

* Reusing similar function (issue #142, printf)

* Corrected path without cl_khr_fp16 support (issue #142, printf)

* Cosmetic fix for order of vector tests (issue #142, printf)

* Added correction related to vendor test review (issue #142, printf)
2023-03-28 08:57:03 -07:00
Sven van Haastregt
6554c49018 [NFCI] Remove unused variables and enable -Wunused-variable (#1483)
Remove unused variables throughout the code base and enable the
`-Wunused-variable` warning flag globally to prevent new unused
variable issues being introduced in the future.

This is mostly a non-functional change, with one exception:

 - In `test_conformance/api/test_kernel_arg_info.cpp`, an error check
   of the clGetDeviceInfo return value was added.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2022-09-08 12:54:36 +01:00
Jeremy Kemp
ce39ffdda7 Printf fixes for reference results #673 #675 (#680)
* Moved float tests that expect limits into their own sub-test.

These are harder to test generically on the CPU so have them be their own test which will retain hard-coded reference results.

* Remove unused variable.

* Switched reference result type from (char**) to (vector::const char*)

* printf: generate reference results where possible #673 #675

The reference results had two issues:
- They did not take into account the rounding mode of the device.
- Scientific notation results did not have trailing zero's, meaning that the exponent could be a single digit, despite the requirement being at least two digits.

This change introduces runtime generated reference results for types with numerical representations (float, int, hex, etc) where a direct mapping to standard C99 (sn)printf is possible to execute on the CPU.

* Trim leading zeroes from the exponent when verifying result #675.

There is no limit on how many leading zeros may be in the exponent, so strip them all.

* Switched to using get_default_rounding_mode.
2020-04-15 14:30:29 +01:00
James Price
40f50d77a3 Rename test .c sources to .cpp where necessary (#604)
Remove hacks to force language from CMake files.

Closes KhronosGroup/OpenCL-CTS#25
2020-02-21 17:34:31 +00:00