diff --git a/test_conformance/mem_host_flags/CMakeLists.txt b/test_conformance/mem_host_flags/CMakeLists.txt index 4f2b960d..73a36f0d 100644 --- a/test_conformance/mem_host_flags/CMakeLists.txt +++ b/test_conformance/mem_host_flags/CMakeLists.txt @@ -6,6 +6,4 @@ set(${MODULE_NAME}_SOURCES mem_host_image.cpp ) -set_gnulike_module_compile_flags("-Wno-unused-but-set-variable") - include(../CMakeCommon.txt) diff --git a/test_conformance/mem_host_flags/checker_image_mem_host_no_access.hpp b/test_conformance/mem_host_flags/checker_image_mem_host_no_access.hpp index a6f90d06..ddcf6ada 100644 --- a/test_conformance/mem_host_flags/checker_image_mem_host_no_access.hpp +++ b/test_conformance/mem_host_flags/checker_image_mem_host_no_access.hpp @@ -135,6 +135,14 @@ cl_int cImage_check_mem_host_no_access::verify_RW_Image_Mapping() err = FAILURE; return err; } + else if (dataPtr != nullptr) + { + log_error("Calling clEnqueueMapImage (CL_MAP_WRITE) on a memory object " + "created with the CL_MEM_HOST_NO_ACCESS flag should fail " + "and return NULL\n"); + err = FAILURE; + return err; + } else { log_info("Test succeeded\n\n"); @@ -154,6 +162,14 @@ cl_int cImage_check_mem_host_no_access::verify_RW_Image_Mapping() err = FAILURE; return err; } + else if (dataPtr != nullptr) + { + log_error("Calling clEnqueueMapImage (CL_MAP_READ) on a memory object " + "created with the CL_MEM_HOST_NO_ACCESS flag should fail " + "and return NULL\n"); + err = FAILURE; + return err; + } else { log_info("Test succeeded\n\n"); diff --git a/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp b/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp index babbeea9..eb3341a8 100644 --- a/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp +++ b/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp @@ -190,6 +190,14 @@ cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer_mapping() err = FAILURE; return FAILURE; } + else if (dataPtr != nullptr) + { + log_error("Calling clEnqueueMapBuffer (CL_MAP_READ) on a memory object " + "created with the CL_MEM_HOST_NO_ACCESS flag should fail " + "and return NULL\n"); + err = FAILURE; + return err; + } else { log_info("Test succeeded\n\n"); @@ -207,6 +215,15 @@ cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer_mapping() err = FAILURE; return FAILURE; } + else if (dataPtr != nullptr) + { + log_error( + "Calling clEnqueueMapBuffer (CL_MAP_WRITE) on a memory object " + "created with the CL_MEM_HOST_NO_ACCESS flag should fail " + "and return NULL\n"); + err = FAILURE; + return err; + } else { log_info("Test succeeded\n\n");