From c67868834a4d45f00f83b06f171378bb33851adb Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Thu, 10 Sep 2020 03:59:15 -0700 Subject: [PATCH] switch back to CL_INVALID_MEM_OBJECT for clGetPipeInfo (#947) * switch back to CL_INVALID_MEM_OBJECT for clGetPipeInfo * fix formatting * correct error message to CL_INVALID_MEM_OBJECT --- test_conformance/api/test_api_consistency.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test_conformance/api/test_api_consistency.cpp b/test_conformance/api/test_api_consistency.cpp index 820f0032..4b0a4504 100644 --- a/test_conformance/api/test_api_consistency.cpp +++ b/test_conformance/api/test_api_consistency.cpp @@ -433,17 +433,18 @@ int test_consistency_pipes(cl_device_id deviceID, cl_context context, "clCreatePipe did not return CL_INVALID_OPERATION"); // clGetPipeInfo - // Returns CL_INVALID_OPERATION if no devices in the context associated - // with pipe support Pipes. + // Returns CL_INVALID_MEM_OBJECT since pipe cannot be a valid pipe + // object. clMemWrapper not_a_pipe = clCreateBuffer(context, CL_MEM_READ_WRITE, 4, NULL, &error); test_error(error, "Unable to create non-pipe buffer"); error = clGetPipeInfo(not_a_pipe, CL_PIPE_PACKET_SIZE, sizeof(u), &u, NULL); - test_assert_error(error == CL_INVALID_OPERATION, - "CL_DEVICE_PIPE_SUPPORT returned CL_FALSE but " - "clGetPipeInfo did not return CL_INVALID_OPERATION"); + test_failure_error( + error, CL_INVALID_MEM_OBJECT, + "CL_DEVICE_PIPE_SUPPORT returned CL_FALSE but clGetPipeInfo did " + "not return CL_INVALID_MEM_OBJECT"); } else {