Commit Graph

21 Commits

Author SHA1 Message Date
Ahmed Hesham
671ea7b286 Migrate computeinfo suite to the new test registration framework (#2320)
Contributes to #2181.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
2025-03-11 21:52:28 +00:00
Sven van Haastregt
7693ffe0a5 Fix more 32-bit Wformat warnings (#2185)
This fixes occurrences where the previous wrong specifier appears to
work in a typical 64-bit build, but causes a Wformat warning in 32-bit
builds.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-12-17 09:55:37 -08:00
ellnor01
617e7cb233 Re-enabling narrowing errors (#1144)
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>
2024-10-08 09:54:32 -07:00
Sven van Haastregt
8558eb88d7 computeinfo: add CL_DEVICE_HALF_FP_CONFIG (#2001)
The computeinfo test already checks that the cl_khr_fp16 extension is
available before querying `CL_DEVICE_HALF_FP_CONFIG`, but never actually
made the `CL_DEVICE_HALF_FP_CONFIG` query.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-07-16 09:52:18 -07:00
Sven van Haastregt
89cd9660be computeinfo: fix memory leak (#2002)
Even on the common code path (i.e., no error paths taken),
test_computeinfo failed to release its allocated memory, preventing a
clean run with LeakSanitizer.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-07-08 13:34:39 +02:00
Sven van Haastregt
e0a31a03fc Fix -Wformat warnings in various tests (#1868)
All of these warnings stem from printing `size_t` types, which should
be done using the `z` length modifier.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-02-27 09:59:39 -08:00
Sven van Haastregt
4f62adf1ca computeinfo: fix use of uninitialized config_size_ret (#1727)
The variable `config_size_ret` is only assigned to inside the `if`.
If the condition is false, we would read uninitialized data.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-05-23 09:43:25 +01:00
Sven van Haastregt
9798a96a9f [NFC] Fix some sign-compare warnings (#1670)
In `os_helpers.cpp`, the preceding `if` already handles negative
values, so cast to unsigned.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-03-12 11:06:55 +00: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
Ben Ashbaugh
bbc7ccfc58 add a prefix to OpenCL extension names (#1311)
* add a prefix to OpenCL extension names

* fix formatting
2022-03-02 18:34:06 +00:00
Ben Ashbaugh
b500da5fbc add basic test for cl_khr_pci_bus_info (#1227)
* add basic test for cl_khr_pci_bus_info

* correctly use TEST_SKIPPED_ITSELF

Co-authored-by: Kévin Petit <kpet@free.fr>

* fix related usage of TEST_SKIPPED_ITSELF

Co-authored-by: Kévin Petit <kpet@free.fr>
2021-07-21 08:48:48 +01:00
ellnor01
18c54be0a4 Validate CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED (#1086)
* Validate CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED

Adding test to validate value returned from clGetDeviceInfo with
CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED.

Fixes #993

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* Fixes for formatting on computeinfo add tests

Fixes #993

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2021-01-07 11:39:57 +00:00
ellnor01
5ae5e7a1fa Remove imageSupportRequired parameter to runTestHarness (#1077)
* 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>
2020-12-09 16:12:40 +00:00
Grzegorz Wawiorko
bfc1cc47f3 Add OpenCL 3.0 deviceInfo capabilities (#833)
* Add OpenCL 3.0 deviceInfo capabilities

* Fix variable/type names collisions

* Fix build error - variable initialization

* Add support for CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES

* Fix - test_error exits err != CL_SUCCESS

* Fix - redundant variable never used in function

* Fix - remove duplicated capabilities for device

* Test computeinfo - display 3.0 platform capabilities

* refactor existing code
* add CL_PLATFORM_EXTENSIONS_WITH_VERSION
* add CL_PLATFORM_NUMERIC_VERSION

* Review fixes in computeinfo

* Fixes review - define variable inside of case block.
2020-07-22 23:01:18 -07:00
Einar Hov
bb1285f6f2 Tests for cl_khr_device_uuid (#813)
Basic conformance testing for the cl_khr_device_uuid extension.  Checks
that the ID queries return the right sizes and that the returned IDs are
stable across two calls to clGetDeviceInfo. If device LUID validity is
true, also checks that one and only one bit is set in the device node
mask.

Signed-off-by: Einar Hov <einar.hov@arm.com>
2020-07-09 11:23:38 +01:00
James Price
944b0a8178 Enable -Werror for GCC/Clang builds (#786)
* Enable -Werror for GCC/Clang builds

Fixes many of the errors this produces, and disables a handful that
didn't have solutions that were obvious (to me).

* Check for `-W*` flags empirically

* Remove cl_APPLE_fp64_basic_ops support

* Undo NAN conversion fix

* Add comments to warning override flags

* Remove unneeded STRINGIFY definition

* Fix tautological compare issue in basic

* Use ABS_ERROR macro in image tests

* Use fabs for ABS_ERROR macro

* Move ABS_ERROR definition to common header
2020-05-27 19:13:11 +01:00
Pierre Moreau
fe12c4e378 computeinfo: Attach min version to image types and flags
This is mostly required for OpenCL 1.0 and 1.1 conformance tests, but
also avoids testing for CL_MEM_KERNEL_READ_AND_WRITE on OpenCL 1.2.
2020-05-20 14:31:58 +01:00
Pierre Moreau
2d124f61eb computeinfo/main: Fix format specifiers for unsigned long 2020-05-20 14:31:58 +01:00
Pierre Moreau
0ed62b4fbe Reformat computeinfo/ tests 2020-05-20 14:31:58 +01:00
Jack Frankland
8d28a5dc83 Add 3.0 as valid device version to version parsing logic (#765) 2020-05-06 13:09:20 +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