diff --git a/catch/unit/device/hipDeviceGetUuid.cc b/catch/unit/device/hipDeviceGetUuid.cc index 47a9bd2c4f..d7557527ea 100644 --- a/catch/unit/device/hipDeviceGetUuid.cc +++ b/catch/unit/device/hipDeviceGetUuid.cc @@ -36,14 +36,24 @@ Unit_hipDeviceGetUuid_Negative - Test unsuccessful execution of hipDeviceGetUuid */ TEST_CASE("Unit_hipDeviceGetUuid_Positive") { hipDevice_t device; - hipUUID uuid; + hipUUID uuid{0}; + bool uuidValid = false; const int deviceId = GENERATE(range(0, HipTest::getDeviceCount())); HIP_CHECK(hipDeviceGet(&device, deviceId)); // Scenario 1 HIP_CHECK(hipDeviceGetUuid(&uuid, device)); - REQUIRE(strcmp(uuid.bytes, "") != 0); + + // Atleast one non zero value + size_t uuidSize = sizeof(uuid.bytes) / sizeof(uuid.bytes[0]); + for (int i = 0; i < uuidSize; i++) { + if (uuid.bytes[i] != 0) { + uuidValid = true; + break; + } + } + REQUIRE(uuidValid == true); } /** diff --git a/samples/2_Cookbook/22_cmake_hip_lang/README.md b/samples/2_Cookbook/22_cmake_hip_lang/README.md index c770d75f63..7f7ac025b1 100644 --- a/samples/2_Cookbook/22_cmake_hip_lang/README.md +++ b/samples/2_Cookbook/22_cmake_hip_lang/README.md @@ -1,7 +1,7 @@ ### This will test HIP language support in upstream CMake I. Build mkdir -p build; cd build -rm -rf *; cmake .. +rm -rf *; cmake -DCMAKE_PREFIX_PATH=/opt/rocm/ .. make II. Test