From d0c515837440603731239c1e5fbaffa2afd6982a Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Thu, 10 Oct 2024 18:09:36 +0000 Subject: [PATCH] rocrtst: Fix VirtMemory_Basic_Test permissions Fix VirtMemory_Basic_Test permissions to adjust for previous change to the hsa_amd_vmem_set_access behavior change that was done with this patch: rocr/vmm: Only modify permisions for specified agents Change-Id: I97230600b9b9144459b08ca3da3a5bfbdbb98231 [ROCm/ROCR-Runtime commit: ead3aafcda41f7a9c278d6965c883076d0a65815] --- .../rocrtst/suites/functional/virtual_memory.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/rocr-runtime/rocrtst/suites/functional/virtual_memory.cc b/projects/rocr-runtime/rocrtst/suites/functional/virtual_memory.cc index f37310c6cd..3ef1a359ad 100644 --- a/projects/rocr-runtime/rocrtst/suites/functional/virtual_memory.cc +++ b/projects/rocr-runtime/rocrtst/suites/functional/virtual_memory.cc @@ -176,8 +176,8 @@ void VirtMemoryTestBasic::TestCreateDestroy(hsa_agent_t agent, hsa_amd_memory_po } if (gpus.size() > 1) { - /* Call set_access with a smaller list of agents, this should remove access for the agents that - * are not included */ + /* Call set_access with a smaller list of agents, this should leave access to + * the other GPUs unchanged */ hsa_amd_memory_access_desc_t desc = {HSA_ACCESS_PERMISSION_RW, gpus[1]}; ASSERT_SUCCESS(hsa_amd_vmem_set_access(addrRange, 10 * granule_size, &desc, 1)); @@ -190,7 +190,7 @@ void VirtMemoryTestBasic::TestCreateDestroy(hsa_agent_t agent, hsa_amd_memory_po if (i == 1) { ASSERT_EQ(perm, HSA_ACCESS_PERMISSION_RW); } else { - ASSERT_EQ(perm, HSA_ACCESS_PERMISSION_NONE); + ASSERT_EQ(perm, HSA_ACCESS_PERMISSION_RO); } } }