test/amdgpu: use tmz ids to check whether enable security tests

Using tmz ids that reported from kernel to decide whether enable
security tests.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
main
Huang Rui 2021-04-09 18:07:16 +08:00 committed by Pierre-Eric Pelloux-Prayer
parent 3c02304c04
commit 67a64bb946
1 changed files with 2 additions and 1 deletions

View File

@ -432,7 +432,8 @@ CU_BOOL suite_security_tests_enable(void)
&minor_version, &device_handle))
return CU_FALSE;
if (device_handle->info.family_id != AMDGPU_FAMILY_RV) {
if (!(device_handle->dev_info.ids_flags & AMDGPU_IDS_FLAGS_TMZ)) {
printf("\n\nDon't support TMZ (trust memory zone), security suite disabled\n");
enable = CU_FALSE;
}