Add a struct for test fixtures with correct method naming convention

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-08-11 11:28:20 +00:00
committed by Compute-Runtime-Automation
parent aed890a219
commit e6fc458d4b
363 changed files with 652 additions and 638 deletions

View File

@@ -1342,7 +1342,7 @@ TEST(DebugSessionTest, GivenBindlessSipVersion2WhenResumingThreadThenCheckIfThre
EXPECT_EQ(1u, sessionMock->checkThreadIsResumedCalled);
}
using MultiTileDebugSessionTest = Test<MultipleDevicesWithCustomHwInfo>;
using MultiTileDebugSessionTest = TestLegacy<MultipleDevicesWithCustomHwInfo>;
TEST_F(MultiTileDebugSessionTest, givenThreadsFromMultipleTilesWhenResumeCalledThenThreadsResumedInAllTiles) {
zet_debug_config_t config = {};
@@ -1701,7 +1701,7 @@ struct DebugSessionRegistersAccess {
NEO::MockDevice *neoDevice = nullptr;
};
using DebugSessionRegistersAccessTest = Test<DebugSessionRegistersAccess>;
using DebugSessionRegistersAccessTest = TestLegacy<DebugSessionRegistersAccess>;
TEST_F(DebugSessionRegistersAccessTest, givenTypeToRegsetDescCalledThenCorrectRegdescIsReturned) {
session->stateSaveAreaHeader = MockSipData::createStateSaveAreaHeader(2);

View File

@@ -500,7 +500,7 @@ TEST(DebugSession, GivenLogsDisabledWhenPrintBitmaskCalledThenBitmaskIsNotPrinte
EXPECT_EQ(0u, output.size());
}
using DebugSessionMultiTile = Test<MultipleDevicesWithCustomHwInfo>;
using DebugSessionMultiTile = TestLegacy<MultipleDevicesWithCustomHwInfo>;
TEST_F(DebugSessionMultiTile, givenApiThreadAndMultipleTilesWhenConvertingToPhysicalThenCorrectValueReturned) {
L0::Device *device = driverHandle->devices[0];

View File

@@ -871,7 +871,7 @@ TEST(DebugSessionTest, GivenNullptrEventWhenReadingEventThenErrorNullptrReturned
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_NULL_POINTER, result);
}
using DebugApiLinuxTest = Test<DebugApiLinuxFixture>;
using DebugApiLinuxTest = TestLegacy<DebugApiLinuxFixture>;
TEST_F(DebugApiLinuxTest, givenDeviceWhenCallingDebugAttachThenSuccessAndValidSessionHandleAreReturned) {
zet_debug_config_t config = {};
@@ -3710,7 +3710,7 @@ struct DebugApiLinuxVmBindFixture : public DebugApiLinuxFixture {
std::unique_ptr<MockDebugSessionLinux> session;
};
using DebugApiLinuxVmBindTest = Test<DebugApiLinuxVmBindFixture>;
using DebugApiLinuxVmBindTest = TestLegacy<DebugApiLinuxVmBindFixture>;
TEST_F(DebugApiLinuxVmBindTest, GivenVmBindEventWithKnownUuidClassWhenHandlingEventThenBindInfoIsStoredForVm) {
uint64_t sbaAddress = 0x1234000;
@@ -5400,7 +5400,7 @@ TEST_F(DebugApiLinuxTest, givenEnginesEventHandledThenLrcToContextHandleMapIsFil
EXPECT_TRUE(hasSubstr(infoMessage, std::string("ENGINES event: client_handle = 34, ctx_handle = 20, num_engines = 2 DESTROY")));
}
using DebugApiLinuxAttentionTest = Test<DebugApiLinuxFixture>;
using DebugApiLinuxAttentionTest = TestLegacy<DebugApiLinuxFixture>;
TEST_F(DebugApiLinuxAttentionTest, GivenEuAttentionEventForThreadsWhenHandlingEventThenNewlyStoppedThreadsSaved) {
zet_debug_config_t config = {};
@@ -5801,7 +5801,7 @@ TEST_F(DebugApiLinuxAttentionTest, GivenInvalidVmHandleWhenHandlingAttentionEven
EXPECT_EQ(0u, sessionMock->pendingInterrupts.size());
EXPECT_FALSE(sessionMock->triggerEvents);
}
using DebugApiLinuxAsyncThreadTest = Test<DebugApiLinuxFixture>;
using DebugApiLinuxAsyncThreadTest = TestLegacy<DebugApiLinuxFixture>;
TEST_F(DebugApiLinuxAsyncThreadTest, GivenPollReturnsErrorAndEinvalWhenReadingInternalEventsAsyncThenDetachEventIsGenerated) {
zet_debug_config_t config = {};
@@ -6125,7 +6125,7 @@ struct DebugApiRegistersAccessFixture : public DebugApiLinuxFixture {
EuThread::ThreadId stoppedThreadId{0, stoppedThread};
};
using DebugApiRegistersAccessTest = Test<DebugApiRegistersAccessFixture>;
using DebugApiRegistersAccessTest = TestLegacy<DebugApiRegistersAccessFixture>;
TEST_F(DebugApiRegistersAccessTest, givenInvalidClientHandleWhenReadRegistersCalledThenErrorIsReturned) {
session->clientHandle = MockDebugSessionLinux::invalidClientHandle;
@@ -6637,7 +6637,7 @@ TEST_F(DebugApiRegistersAccessTest, givenWriteSbaRegistersCalledThenErrorInvalid
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, zetDebugWriteRegisters(session->toHandle(), {0, 0, 0, 0}, ZET_DEBUG_REGSET_TYPE_SBA_INTEL_GPU, 0, 1, nullptr));
}
using DebugApiLinuxMultitileTest = Test<DebugApiLinuxMultiDeviceFixture>;
using DebugApiLinuxMultitileTest = TestLegacy<DebugApiLinuxMultiDeviceFixture>;
TEST_F(DebugApiLinuxMultitileTest, GivenMultitileDeviceWhenCallingResumeThenThreadsFromBothTilesAreResumed) {
zet_debug_config_t config = {};

View File

@@ -34,7 +34,7 @@ struct DebugApiFixture : public DeviceFixture {
MockBuiltins *mockBuiltins = nullptr;
};
using DebugApiTest = Test<DebugApiFixture>;
using DebugApiTest = TestLegacy<DebugApiFixture>;
TEST_F(DebugApiTest, givenDeviceWhenGettingDebugPropertiesThenNoFlagIsSet) {
zet_device_debug_properties_t debugProperties = {};

View File

@@ -113,7 +113,7 @@ struct DebugApiWindowsFixture : public DeviceFixture {
WddmEuDebugInterfaceMock *mockWddm = nullptr;
};
using DebugApiWindowsTest = Test<DebugApiWindowsFixture>;
using DebugApiWindowsTest = TestLegacy<DebugApiWindowsFixture>;
TEST_F(DebugApiWindowsTest, GivenReadOfGpuVaFailDueToEscapeCallFailureWhenTryingToReadSbaThenErrorIsReported) {
zet_debug_config_t config = {};
@@ -849,7 +849,7 @@ TEST(DebugSessionWindowsTest, whenTranslateEscapeErrorStatusCalledThenCorrectZeR
EXPECT_EQ(ZE_RESULT_ERROR_UNKNOWN, DebugSessionWindows::translateEscapeReturnStatusToZeResult(DBGUMD_RETURN_TYPE_MAX));
}
using DebugApiWindowsAsyncThreadTest = Test<DebugApiWindowsFixture>;
using DebugApiWindowsAsyncThreadTest = TestLegacy<DebugApiWindowsFixture>;
TEST_F(DebugApiWindowsAsyncThreadTest, GivenDebugSessionWhenStartingAndClosingAsyncThreadThenThreadIsStartedAndFinishes) {
auto session = std::make_unique<MockDebugSessionWindows>(zet_debug_config_t{0x1234}, device);

View File

@@ -22,7 +22,7 @@ using ::testing::Return;
namespace L0 {
namespace ult {
using MetricEnumerationTest = Test<MetricContextFixture>;
using MetricEnumerationTest = TestLegacy<MetricContextFixture>;
TEST_F(MetricEnumerationTest, givenIncorrectMetricsDiscoveryDeviceWhenZetGetMetricGroupIsCalledThenNoMetricGroupsAreReturned) {
EXPECT_CALL(*mockMetricEnumeration, loadMetricsDiscovery())
@@ -887,7 +887,7 @@ TEST_F(MetricEnumerationTest, givenValidEventBasedMetricGroupWhenzetContextActiv
EXPECT_EQ(zetContextActivateMetricGroups(context->toHandle(), device->toHandle(), 1, &metricGroupHandle), ZE_RESULT_SUCCESS);
}
using MultiDeviceMetricEnumerationTest = Test<MetricMultiDeviceFixture>;
using MultiDeviceMetricEnumerationTest = TestLegacy<MetricMultiDeviceFixture>;
TEST_F(MultiDeviceMetricEnumerationTest, givenMultipleDevicesAndValidEventBasedMetricGroupWhenzetContextActivateMetricGroupsIsCalledThenReturnsSuccess) {

View File

@@ -20,7 +20,7 @@ using ::testing::Return;
namespace L0 {
namespace ult {
using MetricEnumerationTest = Test<MetricContextFixture>;
using MetricEnumerationTest = TestLegacy<MetricContextFixture>;
TEST_F(MetricEnumerationTest, givenTimeAndBufferSizeWhenOpenIoStreamReturnsErrorThenTheMetricGroupOpenIoStreamReturnsErrorUnknown) {
@@ -138,7 +138,7 @@ TEST_F(MetricEnumerationTest, givenTTypedValueWhenCopyValueIsCalledReturnsFilled
}
}
using MetricEnumerationMultiDeviceTest = Test<MetricMultiDeviceFixture>;
using MetricEnumerationMultiDeviceTest = TestLegacy<MetricMultiDeviceFixture>;
TEST_F(MetricEnumerationMultiDeviceTest, givenRootDeviceWhenLoadDependenciesIsCalledThenOpenMetricsSubDeviceWillBeCalled) {

View File

@@ -43,7 +43,7 @@ class MockOsLibrary : public NEO::OsLibrary {
}
};
using MetricInitializationTest = Test<MetricContextFixture>;
using MetricInitializationTest = TestLegacy<MetricContextFixture>;
TEST_F(MetricInitializationTest, GivenOaDependenciesAreAvailableThenMetricInitializationIsSuccess) {

View File

@@ -22,7 +22,7 @@ using ::testing::Return;
namespace L0 {
namespace ult {
using MetricStreamerTest = Test<MetricContextFixture>;
using MetricStreamerTest = TestLegacy<MetricContextFixture>;
TEST_F(MetricStreamerTest, givenInvalidMetricGroupTypeWhenZetMetricStreamerOpenIsCalledThenReturnsFail) {

View File

@@ -18,7 +18,7 @@ using ::testing::Return;
namespace L0 {
namespace ult {
using MetricStreamerMultiDeviceTest = Test<MetricStreamerMultiDeviceFixture>;
using MetricStreamerMultiDeviceTest = TestLegacy<MetricStreamerMultiDeviceFixture>;
TEST_F(MetricStreamerMultiDeviceTest, givenInvalidMetricGroupTypeWhenZetMetricStreamerOpenIsCalledThenReturnsFail) {

View File

@@ -17,7 +17,7 @@ using ::testing::Return;
namespace L0 {
namespace ult {
using MetricStreamerMultiDeviceTest = Test<MetricStreamerMultiDeviceFixture>;
using MetricStreamerMultiDeviceTest = TestLegacy<MetricStreamerMultiDeviceFixture>;
TEST_F(MetricStreamerMultiDeviceTest, givenEnableWalkerPartitionIsOnWhenZetCommandListAppendMetricStreamerMarkerIsCalledForSubDeviceThenReturnsSuccess) {

View File

@@ -20,7 +20,7 @@ using ::testing::Return;
namespace L0 {
namespace ult {
using MetricEnumerationTestWindows = Test<MetricContextFixture>;
using MetricEnumerationTestWindows = TestLegacy<MetricContextFixture>;
TEST_F(MetricEnumerationTestWindows, givenCorrectWindowsAdapterWhenGetMetricsAdapterThenReturnSuccess) {

View File

@@ -141,7 +141,7 @@ TEST_F(SysmanDeviceFixture, GivenValidDeviceHandleAndIfSysmanDeviceInitFailsThen
static_cast<DeviceImp *>(device)->setSysmanHandle(pSysmanDeviceOriginal);
}
using MockDeviceSysmanGetTest = Test<DeviceFixture>;
using MockDeviceSysmanGetTest = TestLegacy<DeviceFixture>;
TEST_F(MockDeviceSysmanGetTest, GivenValidSysmanHandleSetInDeviceStructWhenGetThisSysmanHandleThenHandlesShouldBeSimilar) {
SysmanDeviceImp *sysman = new SysmanDeviceImp(device->toHandle());
device->setSysmanHandle(sysman);
@@ -397,7 +397,7 @@ class UnknownDriverModel : public DriverModel {
}
};
using SysmanUnknownDriverModelTest = Test<DeviceFixture>;
using SysmanUnknownDriverModelTest = TestLegacy<DeviceFixture>;
TEST_F(SysmanUnknownDriverModelTest, GivenDriverModelTypeIsNotDrmWhenExecutingSysmanOnLinuxThenErrorIsReturned) {
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[device->getRootDeviceIndex()]->osInterface = std::make_unique<NEO::OSInterface>();
auto &osInterface = device->getOsInterface();

View File

@@ -15,7 +15,7 @@
namespace L0 {
namespace ult {
using MockDeviceSysmanGetTest = Test<DeviceFixture>;
using MockDeviceSysmanGetTest = TestLegacy<DeviceFixture>;
TEST_F(MockDeviceSysmanGetTest, GivenValidSysmanHandleSetInDeviceStructWhenGetThisSysmanHandleThenHandlesShouldBeSimilar) {
SysmanDeviceImp *sysman = new SysmanDeviceImp(device->toHandle());
device->setSysmanHandle(sysman);