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>