ULT renaming: Memory Manager tests

Related-To: NEO-2236

Signed-off-by: Adam Cetnerowski <adam.cetnerowski@intel.com>
This commit is contained in:
Adam Cetnerowski
2020-12-08 18:38:22 +01:00
committed by Compute-Runtime-Automation
parent d746be0c4e
commit 91a938a449
6 changed files with 15 additions and 15 deletions

View File

@ -208,7 +208,7 @@ TEST_F(DeferredDeleterTest, GivenAsyncThreadWaitsForQueueItemTwiceWhenDeletingTh
EXPECT_EQ(0, deleter->getElementsToRelease());
}
TEST_F(DeferredDeleterTest, WhenReleasingAllElementsAreReleased) {
TEST_F(DeferredDeleterTest, WhenReleasingThenAllElementsAreReleased) {
deleter->setElementsToRelease(1);
EXPECT_EQ(1, deleter->getElementsToRelease());
EXPECT_FALSE(deleter->baseAreElementsReleased());

View File

@ -100,7 +100,7 @@ void testGfxPartition(MockGfxPartition &gfxPartition, uint64_t gfxBase, uint64_t
}
}
TEST(GfxPartitionTest, testGfxPartitionFullRange48BitSVM) {
TEST(GfxPartitionTest, GivenFullRange48BitSvmWhenTestingGfxPartitionThenAllExpectationsAreMet) {
MockGfxPartition gfxPartition;
gfxPartition.init(maxNBitValue(48), reservedCpuAddressRangeSize, 0, 1);
@ -110,7 +110,7 @@ TEST(GfxPartitionTest, testGfxPartitionFullRange48BitSVM) {
testGfxPartition(gfxPartition, gfxBase, gfxTop, gfxBase);
}
TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVM) {
TEST(GfxPartitionTest, GivenFullRange47BitSvmWhenTestingGfxPartitionThenAllExpectationsAreMet) {
MockGfxPartition gfxPartition;
gfxPartition.init(maxNBitValue(47), reservedCpuAddressRangeSize, 0, 1);
@ -121,7 +121,7 @@ TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVM) {
testGfxPartition(gfxPartition, gfxBase, gfxTop, svmTop);
}
TEST(GfxPartitionTest, testGfxPartitionLimitedRange) {
TEST(GfxPartitionTest, GivenLimitedRangeWhenTestingGfxPartitionThenAllExpectationsAreMet) {
MockGfxPartition gfxPartition;
gfxPartition.init(maxNBitValue(47 - 1), reservedCpuAddressRangeSize, 0, 1);
@ -132,7 +132,7 @@ TEST(GfxPartitionTest, testGfxPartitionLimitedRange) {
testGfxPartition(gfxPartition, gfxBase, gfxTop, svmTop);
}
TEST(GfxPartitionTest, testGfxPartitionUnsupportedRange) {
TEST(GfxPartitionTest, GivenUnsupportedRangeThenGfxPartitionIsNotInitialized) {
if (is32bit) {
GTEST_SKIP();
}
@ -141,7 +141,7 @@ TEST(GfxPartitionTest, testGfxPartitionUnsupportedRange) {
EXPECT_FALSE(gfxPartition.init(maxNBitValue(48 + 1), reservedCpuAddressRangeSize, 0, 1));
}
TEST(GfxPartitionTest, testGfxPartitionFullRange48BitSVMHeap64KBSplit) {
TEST(GfxPartitionTest, GivenFullRange48BitSvmHeap64KbSplitWhenTestingGfxPartitionThenAllExpectationsAreMet) {
uint32_t rootDeviceIndex = 3;
size_t numRootDevices = 5;
@ -158,7 +158,7 @@ TEST(GfxPartitionTest, testGfxPartitionFullRange48BitSVMHeap64KBSplit) {
EXPECT_EQ(gfxBase + 4 * sizeHeap32 + heapStandardSize + rootDeviceIndex * heapStandard64KBSize, gfxPartition.getHeapBase(HeapIndex::HEAP_STANDARD64KB));
}
TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVMHeap64KBSplit) {
TEST(GfxPartitionTest, GivenFullRange47BitSvmHeap64KbSplitWhenTestingGfxPartitionThenAllExpectationsAreMet) {
uint32_t rootDeviceIndex = 3;
size_t numRootDevices = 5;
@ -225,7 +225,7 @@ TEST(GfxPartitionTest, given47bitGpuAddressSpaceWhenInitializingMultipleGfxParti
EXPECT_EQ(1u, static_cast<MockOsMemory *>(gfxPartitions[0]->osMemory.get())->getReserveCount());
}
TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVMFailedIfReservedCpuRangeSizeIsZero) {
TEST(GfxPartitionTest, GivenFullRange47BitSvmAndReservedCpuRangeSizeIsZeroThenGfxPartitionIsNotInitialized) {
if (is32bit) {
GTEST_SKIP();
}
@ -234,7 +234,7 @@ TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVMFailedIfReservedCpuRange
EXPECT_FALSE(gfxPartition.init(maxNBitValue(47), 0, 0, 1));
}
TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVMFailedIfReturnedReservedCpuRangeIsNull) {
TEST(GfxPartitionTest, GivenFullRange47BitSvmAndReturnedReservedCpuRangeIsNullThenGfxPartitionIsNotInitialized) {
if (is32bit) {
GTEST_SKIP();
}
@ -246,7 +246,7 @@ TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVMFailedIfReturnedReserved
EXPECT_FALSE(gfxPartition.init(maxNBitValue(47), reservedCpuAddressRangeSize, 0, 1));
}
TEST(GfxPartitionTest, testGfxPartitionFullRange47BitSVMFailedIfReturnedReservedCpuRangeIsNotAligned) {
TEST(GfxPartitionTest, GivenFullRange47BitSvmAndReturnedReservedCpuRangeIsNotAlignedThenGfxPartitionIsNotInitialized) {
if (is32bit) {
GTEST_SKIP();
}

View File

@ -28,7 +28,7 @@ struct MockLocalMemoryUsageBankSelector : public LocalMemoryUsageBankSelector {
}
};
TEST(localMemoryUsageTest, givenLocalMemoryUsageBankSelectorWhenItsCreatedAllValuesAreZero) {
TEST(localMemoryUsageTest, givenLocalMemoryUsageBankSelectorWhenItsCreatedThenAllValuesAreZero) {
MockLocalMemoryUsageBankSelector selector(2u);
for (uint32_t i = 0; i < selector.banksCount; i++) {
@ -75,7 +75,7 @@ TEST(localMemoryUsageTest, givenOverrideLeastOccupiedBankDebugFlagWhenGetLeastOc
EXPECT_EQ(forcedBankIndex, bankIndex);
}
TEST(localMemoryUsageTest, givenLocalMemoryUsageBankSelectorWhenMemoryAllocatedSeveralTimesItIsStoredOnDifferentBanks) {
TEST(localMemoryUsageTest, givenLocalMemoryUsageBankSelectorWhenMemoryAllocatedSeveralTimesThenItIsStoredOnDifferentBanks) {
MockLocalMemoryUsageBankSelector selector(5u);
uint64_t allocationSize = 1024u;

View File

@ -671,7 +671,7 @@ TEST(MemoryManagerTest, givenExternalHostMemoryWhenGetAllocationDataIsCalledThen
EXPECT_EQ(allocData.hostPtr, hostPtr);
}
TEST(MemoryManagerTest, getAllocationDataProperlyHandlesRootDeviceIndexFromAllcationProperties) {
TEST(MemoryManagerTest, GivenAllocationPropertiesWhenGettingAllocationDataThenSameRootDeviceIndexIsUsed) {
const uint32_t rootDevicesCount = 100u;
AllocationData allocData;

View File

@ -435,7 +435,7 @@ TEST_F(MemoryAllocatorTest, givenMemoryManagerWhenAskedFor32bitAllocationThen32b
memoryManager->freeGraphicsMemory(allocation);
}
TEST_F(MemoryAllocatorTest, givenNotEnoughSpaceInAllocatorWhenAskedFor32bitAllocationNullptrIsReturned) {
TEST_F(MemoryAllocatorTest, givenNotEnoughSpaceInAllocatorWhenAskedFor32bitAllocationThenNullptrIsReturned) {
size_t size = 0xfffff000;
auto allocationFirst = memoryManager->allocate32BitGraphicsMemory(device->getRootDeviceIndex(), 0x5000, nullptr, GraphicsAllocation::AllocationType::BUFFER);
auto allocation = memoryManager->allocate32BitGraphicsMemory(device->getRootDeviceIndex(), size, nullptr, GraphicsAllocation::AllocationType::BUFFER);

View File

@ -523,7 +523,7 @@ TEST_F(PageTableTestsGPU, WhenPageTableIsCreatedThenItIsEmpty) {
EXPECT_TRUE(ppgtt->isEmpty());
}
TEST_F(PageTableTests32, WhenMappingFirstPageIsAt0) {
TEST_F(PageTableTests32, WhenMappingThenFirstPageIsAtZero) {
std::unique_ptr<PageTable<void, 0, 9>> pt(new PageTable<void, 0, 9>(&allocator));
auto phys = pt->map(0x10000, pageSize, 0, MemoryBanks::MainBank);
EXPECT_EQ(0u, phys);