mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Implement Negative Test for Platform Layer Functions (#1076)
* Implement Negative Tests for clPlatform Functions This change introduces negative tests for clPlatform functions as well as changes to the Harness to help with other negative tests. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com> * [SQUASH] Remove magic macro from Negative Platform Tests This change removes the negative-testing macro and all other changes related to its usage. Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
This commit is contained in:
@@ -68,6 +68,7 @@ const char *IGetErrorString(int clErrorCode)
|
||||
case CL_INVALID_SAMPLER: return "CL_INVALID_SAMPLER";
|
||||
case CL_INVALID_BINARY: return "CL_INVALID_BINARY";
|
||||
case CL_INVALID_BUILD_OPTIONS: return "CL_INVALID_BUILD_OPTIONS";
|
||||
case CL_INVALID_PLATFORM: return "CL_INVALID_PLATFORM";
|
||||
case CL_INVALID_PROGRAM: return "CL_INVALID_PROGRAM";
|
||||
case CL_INVALID_PROGRAM_EXECUTABLE:
|
||||
return "CL_INVALID_PROGRAM_EXECUTABLE";
|
||||
|
||||
@@ -1161,6 +1161,15 @@ test_status check_spirv_compilation_readiness(cl_device_id device)
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
cl_platform_id getPlatformFromDevice(cl_device_id deviceID)
|
||||
{
|
||||
cl_platform_id platform = nullptr;
|
||||
cl_int err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM, sizeof(platform),
|
||||
&platform, nullptr);
|
||||
ASSERT_SUCCESS(err, "clGetDeviceInfo");
|
||||
return platform;
|
||||
}
|
||||
|
||||
void PrintArch(void)
|
||||
{
|
||||
vlog("sizeof( void*) = %ld\n", sizeof(void *));
|
||||
|
||||
@@ -178,6 +178,8 @@ extern int gHasLong; // This is set to 1 if the device suppots long and ulong
|
||||
// types in OpenCL C.
|
||||
extern bool gCoreILProgram;
|
||||
|
||||
extern cl_platform_id getPlatformFromDevice(cl_device_id deviceID);
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
void memset_pattern4(void *, const void *, size_t);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user