Migrate computeinfo suite to the new test registration framework (#2320)

Contributes to #2181.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
Ahmed Hesham
2025-03-11 21:52:28 +00:00
committed by GitHub
parent 13b82d1833
commit 671ea7b286
5 changed files with 26 additions and 46 deletions

View File

@@ -21,10 +21,9 @@
#include "harness/testHarness.h"
#include "harness/deviceInfo.h"
int test_pci_bus_info(cl_device_id deviceID, cl_context context,
cl_command_queue ignoreQueue, int num_elements)
REGISTER_TEST(pci_bus_info)
{
if (!is_extension_available(deviceID, "cl_khr_pci_bus_info"))
if (!is_extension_available(device, "cl_khr_pci_bus_info"))
{
log_info("cl_khr_pci_bus_info not supported. Skipping test...\n");
return TEST_SKIPPED_ITSELF;
@@ -35,14 +34,14 @@ int test_pci_bus_info(cl_device_id deviceID, cl_context context,
cl_device_pci_bus_info_khr info;
size_t size_ret;
error = clGetDeviceInfo(deviceID, CL_DEVICE_PCI_BUS_INFO_KHR, 0, NULL,
&size_ret);
error =
clGetDeviceInfo(device, CL_DEVICE_PCI_BUS_INFO_KHR, 0, NULL, &size_ret);
test_error(error, "Unable to query CL_DEVICE_PCI_BUS_INFO_KHR size");
test_assert_error(
size_ret == sizeof(info),
"Query for CL_DEVICE_PCI_BUS_INFO_KHR returned an unexpected size");
error = clGetDeviceInfo(deviceID, CL_DEVICE_PCI_BUS_INFO_KHR, sizeof(info),
error = clGetDeviceInfo(device, CL_DEVICE_PCI_BUS_INFO_KHR, sizeof(info),
&info, NULL);
test_error(error, "Unable to query CL_DEVICE_PCI_BUS_INFO_KHR");