From 033b52c4e424af100660a1a913e82e8e0e1be384 Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Fri, 10 Dec 2021 08:21:37 +0800 Subject: [PATCH] kfdtest: skip hdp flush test in sriov mode skip HDP flush test when remap feature is not supported. Backgroud: the HDP register remap is skipped in sriov mode, it will cause mmio base is nullPtr. Signed-off-by: Yang Wang Reviewed-by: Felix Kuehling Change-Id: Ib9aea1900931e30571656397a485ee4db051ec0a --- tests/kfdtest/src/KFDMemoryTest.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/kfdtest/src/KFDMemoryTest.cpp b/tests/kfdtest/src/KFDMemoryTest.cpp index 9f62727cff..f2f0b14046 100644 --- a/tests/kfdtest/src/KFDMemoryTest.cpp +++ b/tests/kfdtest/src/KFDMemoryTest.cpp @@ -2084,7 +2084,11 @@ TEST_F(KFDMemoryTest, HostHdpFlush) { break; } } - ASSERT_NE(mmioBase, nullPtr) << "mmio base is NULL"; + + if (mmioBase == nullPtr) { + LOG() << "Skipping test: bsecause mmioBase is nullPtr, the mmio remap feature is not supported." << std::endl; + return; + } memoryFlags.ui32.NonPaged = 1; memoryFlags.ui32.CoarseGrain = 0; @@ -2205,7 +2209,11 @@ TEST_F(KFDMemoryTest, DeviceHdpFlush) { break; } } - ASSERT_NE(mmioBase, nullPtr) << "mmio base is NULL"; + + if (mmioBase == nullPtr) { + LOG() << "Skipping test: bsecause mmioBase is nullPtr, the mmio remap feature is not supported." << std::endl; + return; + } memoryFlags.ui32.NonPaged = 1; memoryFlags.ui32.CoarseGrain = 0;