Fixes narrowing conversion build errors in test_common
Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to specific test_conformance suite's
CMakeLists.txt where there are many more build errors revealed
from this fix.
Fixes a few simple issues under test_conformance in the process.
Contributes #787
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
---------
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
We compute the reference values using unsigned types exclusively,
even when the input type is signed. This fixes one place where
an signed type was inadvertently used.
The main sources of warnings were:
* Printing of a `size_t` which requires the `%zu` specifier.
* Printing of `cl_long`/`cl_ulong` which is now done using the
`PRI*64` macros to ensure portability across 32 and 64-bit builds.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
After compiling OpenCL CTS with -fsanitize=undefined I stumbled upon
some signed integer overflows.
test_absdiff.cpp:103:24: runtime error: signed integer overflow:
419625160 - -1937831252 cannot be represented in type 'int'
test_absdiff.cpp:101:28: runtime error: signed integer overflow:
1277901399 - -1294103363 cannot be represented in type 'int'
test_absdiff.cpp:140:24: runtime error: signed integer overflow:
8945130301981949496 - -2872789959208163723 cannot be represented in type
'long int'
test_absdiff.cpp:138:29: runtime error: signed integer overflow:
5488544718097069860 - -5558131619970145206 cannot be represented in type
'long int'
The result from these operations was used to compare against the kernel result.
This patch replaces the abs_diff manual computations by a function that handles
the signed integer overflow case.
It only contains a pointer type definition for test functions that
really ought to be provided by testHarness.h.
Signed-off-by: Kévin Petit <kpet@free.fr>
Signed-off-by: Kévin Petit <kpet@free.fr>
* very basic test infrastructure
* move test to integer_ops
* added bitfield_reverse test
* added test for bitfield insert
* add a separate file for bitfield_extract
* cleaned up implementation and all tests are passing
* rename helper file so it can be used by other tests
* remove temporary hacks
* fix formatting
* address code review comments
* remove duplicated code after rebase
* fix formatting
a few naming changes for consistency
more changes for consistency
* fix copyright dates
* remove unused variable
* Update cl_khr_integer_dot_product tests for v2
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Signed-off-by: Marco Cattani <marco.cattani@arm.com>
Change-Id: I97dbd820f1f32f6b377e47d0bf638f36bb91930a
* only query acceleration properties with v2+
Change-Id: I3f13a0cba7f1f686365b10adf81690e089cd3d74
* Tests requiring image support use runTestHarnessWithCheck
Removing special case for images in runTestHarness.
Fixes#710
* Remove imageSupportRequired argument
Tests which require image support now specify this while
calling runTestHarnessWithCheck.
Fixes#710
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>