SWDEV-387508 - do not treat uuid as a string (#253)
Change-Id: Ic093384947637fe9242c5840349f6d71aea28e69
[ROCm/hip-tests commit: 9726351ae8]
This commit is contained in:
committed by
GitHub
parent
dcb02ce40e
commit
9555293fe8
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user