test: cmd buffer prealloc without flag test

Add missing test with debug flag
SetAmountOfReusableAllocationsPerCmdQueue unset.

Related-To: NEO-8152

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2023-10-30 13:08:00 +00:00
committed by Compute-Runtime-Automation
parent fad9ad729d
commit 87a1fda1a7

View File

@@ -173,6 +173,19 @@ HWTEST_F(CommandStreamReceiverTest, givenFlagDisabledWhenCallFillReusableAllocat
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
}
HWTEST_F(CommandStreamReceiverTest, givenUnsetPreallocationsPerQueueWhenRequestPreallocationCalledThenDoNotAllocateCommandBuffer) {
EXPECT_TRUE(commandStreamReceiver->getAllocationsForReuse().peekIsEmpty());
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
commandStreamReceiver->requestPreallocation();
EXPECT_TRUE(commandStreamReceiver->getAllocationsForReuse().peekIsEmpty());
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
commandStreamReceiver->releasePreallocationRequest();
EXPECT_TRUE(commandStreamReceiver->getAllocationsForReuse().peekIsEmpty());
EXPECT_EQ(0u, commandStreamReceiver->getResidencyAllocations().size());
}
HWTEST_F(CommandStreamReceiverTest, givenPreallocationsPerQueueEqualZeroWhenRequestPreallocationCalledThenDoNotAllocateCommandBuffer) {
DebugManagerStateRestore restorer;
DebugManager.flags.SetAmountOfReusableAllocationsPerCmdQueue.set(0);