Changed test to match CUDA output of errors

We changed the test so that it runs on CUDA. As we are emulating CUDA behavior, this should pass on HIP.

[ROCm/clr commit: c5606c13e7]
This commit is contained in:
Aditya Avinash Atluri
2016-03-03 13:48:58 -06:00
parent c85ce19fb7
commit 87c279cf1e
@@ -164,7 +164,7 @@ void testSimple()
hipFree(A_d);
e = hipPointerGetAttributes(&attribs, A_d);
HIPASSERT(e == hipErrorInvalidValue); // Just freed the pointer, this should return an error.
HIPASSERT(e == hipErrorUnknown); // Just freed the pointer, this should return an error.
// Device-visible host memory
@@ -180,7 +180,7 @@ void testSimple()
hipFreeHost(A_Pinned_h);
e = hipPointerGetAttributes(&attribs, A_Pinned_h);
HIPASSERT(e == hipErrorInvalidValue); // Just freed the pointer, this should return an error.
HIPASSERT(e == hipErrorUnknown); // Just freed the pointer, this should return an error.
printf("getAttr:%-20s err=%d (%s), neg-test expected\n", "A_d+NBytes", e, hipGetErrorString(e));
@@ -188,7 +188,7 @@ void testSimple()
printf ("\nOS-allocated memory (malloc)\n");
e = hipPointerGetAttributes(&attribs, A_OSAlloc_h);
printf("getAttr:%-20s err=%d (%s), neg-test expected\n", "A_OSAlloc_h", e, hipGetErrorString(e));
HIPASSERT(e == hipErrorInvalidValue); // OS-allocated pointers should return hipErrorInvalidValue.
HIPASSERT(e == hipErrorUnknown); // OS-allocated pointers should return hipErrorUnknown.
}
//---