Skip to content

Commit

Permalink
vulkan: Remove redundant negative testing
Browse files Browse the repository at this point in the history
- negative testing for semaphore functions is accomplished in semaphore tests, as well as create image in the api test
  • Loading branch information
dcrawley authored and joshqti committed Sep 10, 2024
1 parent c32a767 commit 73e757a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 134 deletions.
52 changes: 0 additions & 52 deletions test_conformance/vulkan/test_vulkan_api_consistency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,27 +323,6 @@ int test_consistency_external_image(cl_device_id deviceID, cl_context _context,
test_error(errNum, "Unable to create Image with Properties");
image.reset();

// Passing image_format as NULL
image = clCreateImageWithProperties(context, extMemProperties.data(),
CL_MEM_READ_WRITE, NULL, &image_desc,
NULL, &errNum);
test_failure_error(errNum, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
"Image creation must fail with "
"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"
"when image desc passed as NULL");

image.reset();

// Passing image_desc as NULL
image = clCreateImageWithProperties(context, extMemProperties.data(),
CL_MEM_READ_WRITE, &img_format, NULL,
NULL, &errNum);
test_failure_error(errNum, CL_INVALID_IMAGE_DESCRIPTOR,
"Image creation must fail with "
"CL_INVALID_IMAGE_DESCRIPTOR "
"when image desc passed as NULL");
image.reset();

return TEST_PASS;
}

Expand Down Expand Up @@ -479,31 +458,6 @@ int test_consistency_external_semaphore(cl_device_id deviceID,
sema_props1.push_back(0);
sema_props2.push_back(0);

// Pass NULL properties
cl_semaphore_khr cl_ext_semaphore =
clCreateSemaphoreWithPropertiesKHRptr(context, NULL, &errNum);
test_failure_error(errNum, CL_INVALID_VALUE,
"Semaphore creation must fail with CL_INVALID_VALUE "
" when properties are passed as NULL");


// Pass invalid semaphore object to wait
errNum =
clEnqueueWaitSemaphoresKHRptr(cmd_queue, 1, NULL, NULL, 0, NULL, NULL);
test_failure_error(errNum, CL_INVALID_VALUE,
"clEnqueueWaitSemaphoresKHR fails with CL_INVALID_VALUE "
"when invalid semaphore object is passed");


// Pass invalid semaphore object to signal
errNum = clEnqueueSignalSemaphoresKHRptr(cmd_queue, 1, NULL, NULL, 0, NULL,
NULL);
test_failure_error(
errNum, CL_INVALID_VALUE,
"clEnqueueSignalSemaphoresKHR fails with CL_INVALID_VALUE"
"when invalid semaphore object is passed");


// Create two semaphore objects
clVk2Clsemaphore = clCreateSemaphoreWithPropertiesKHRptr(
context, sema_props1.data(), &errNum);
Expand All @@ -515,12 +469,6 @@ int test_consistency_external_semaphore(cl_device_id deviceID,
test_error(errNum,
"Unable to create semaphore with valid semaphore properties");

// Pass invalid object to release call
errNum = clReleaseSemaphoreKHRptr(NULL);
test_failure_error(errNum, CL_INVALID_VALUE,
"clReleaseSemaphoreKHRptr fails with "
"CL_INVALID_VALUE when NULL semaphore object is passed");

// Release both semaphore objects
errNum = clReleaseSemaphoreKHRptr(clVk2Clsemaphore);
test_error(errNum, "clReleaseSemaphoreKHRptr failed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,47 +158,6 @@ int test_consistency_external_for_1dimage(cl_device_id deviceID,
test_error(errNum, "Unable to create Image with Properties");
image.reset();

// Passing properties, image_desc and image_format all as NULL
image = clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE, NULL,
NULL, NULL, &errNum);
test_failure_error(
errNum, CL_INVALID_IMAGE_DESCRIPTOR,
"Image creation must fail with CL_INVALID_IMAGE_DESCRIPTOR "
"when all are passed as NULL");

image.reset();

// Passing NULL properties and a valid image_format and image_desc
image =
clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE,
&img_format, &image_desc, NULL, &errNum);
test_error(errNum,
"Unable to create image with NULL properties "
"with valid image format and image desc");

image.reset();

// Passing image_format as NULL
image = clCreateImageWithProperties(context, extMemProperties.data(),
CL_MEM_READ_WRITE, NULL, &image_desc,
NULL, &errNum);
test_failure_error(errNum, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
"Image creation must fail with "
"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"
"when image desc passed as NULL");

image.reset();

// Passing image_desc as NULL
image = clCreateImageWithProperties(context, extMemProperties.data(),
CL_MEM_READ_WRITE, &img_format, NULL,
NULL, &errNum);
test_failure_error(errNum, CL_INVALID_IMAGE_DESCRIPTOR,
"Image creation must fail with "
"CL_INVALID_IMAGE_DESCRIPTOR "
"when image desc passed as NULL");
image.reset();

if (cmd_queue) clReleaseCommandQueue(cmd_queue);
if (context) clReleaseContext(context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,47 +162,6 @@ int test_consistency_external_for_3dimage(cl_device_id deviceID,
test_error(errNum, "Unable to create Image with Properties");
image.reset();

// Passing properties, image_desc and image_format all as NULL
image = clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE, NULL,
NULL, NULL, &errNum);
test_failure_error(
errNum, CL_INVALID_IMAGE_DESCRIPTOR,
"Image creation must fail with CL_INVALID_IMAGE_DESCRIPTOR "
"when all are passed as NULL");

image.reset();

// Passing NULL properties and a valid image_format and image_desc
image =
clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE,
&img_format, &image_desc, NULL, &errNum);
test_error(errNum,
"Unable to create image with NULL properties "
"with valid image format and image desc");

image.reset();

// Passing image_format as NULL
image = clCreateImageWithProperties(context, extMemProperties.data(),
CL_MEM_READ_WRITE, NULL, &image_desc,
NULL, &errNum);
test_failure_error(errNum, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
"Image creation must fail with "
"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"
"when image desc passed as NULL");

image.reset();

// Passing image_desc as NULL
image = clCreateImageWithProperties(context, extMemProperties.data(),
CL_MEM_READ_WRITE, &img_format, NULL,
NULL, &errNum);
test_failure_error(errNum, CL_INVALID_IMAGE_DESCRIPTOR,
"Image creation must fail with "
"CL_INVALID_IMAGE_DESCRIPTOR "
"when image desc passed as NULL");
image.reset();

if (cmd_queue) clReleaseCommandQueue(cmd_queue);
if (context) clReleaseContext(context);

Expand Down

0 comments on commit 73e757a

Please sign in to comment.