fix: stop direct submission before oa configuration activation

Related-To: NEO-12778
Signed-off-by: Robert Krzemień <robert.krzemien@intel.com>
This commit is contained in:
Robert Krzemień
2024-10-22 12:56:08 +00:00
committed by Compute-Runtime-Automation
parent 01a0b8e7f7
commit fe1fd22371
13 changed files with 205 additions and 10 deletions

View File

@@ -62,6 +62,30 @@ TEST_F(PerformanceCountersTest, WhenCreatingPerformanceCountersThenObjectIsNotNu
EXPECT_NE(nullptr, performanceCounters.get());
}
TEST_F(PerformanceCountersTest, GivenValidDeviceHandleWhenFlushCommandBufferCallbackIsCalledThenReturnsSuccess) {
auto performanceCounters = PerformanceCounters::create(&device->getDevice());
EXPECT_NE(nullptr, performanceCounters);
EXPECT_NE(nullptr, performanceCounters.get());
MetricsLibraryApi::ClientHandle_1_0 handle = reinterpret_cast<void *>(&device->getDevice());
auto callback = performanceCounters->getMetricsLibraryInterface()->api->callbacks.CommandBufferFlush;
EXPECT_NE(nullptr, callback);
EXPECT_EQ(MetricsLibraryApi::StatusCode::Success, callback(handle));
}
TEST_F(PerformanceCountersTest, GivenInvalidDeviceHandleWhenFlushCommandBufferCallbackIsCalledThenReturnsFailed) {
auto performanceCounters = PerformanceCounters::create(&device->getDevice());
EXPECT_NE(nullptr, performanceCounters);
EXPECT_NE(nullptr, performanceCounters.get());
MetricsLibraryApi::ClientHandle_1_0 handle = {};
auto callback = performanceCounters->getMetricsLibraryInterface()->api->callbacks.CommandBufferFlush;
EXPECT_NE(nullptr, callback);
EXPECT_EQ(MetricsLibraryApi::StatusCode::Failed, callback(handle));
}
TEST_F(PerformanceCountersTest, givenPerformanceCountersWhenCreatedThenAllValuesProperlyInitialized) {
auto performanceCounters = MockPerformanceCounters::create();