Correct shared fixture methods name to meet clang-tidy requirements

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-08-12 14:24:49 +00:00
committed by Compute-Runtime-Automation
parent 6ab8480ade
commit 5ffeac44c5
60 changed files with 239 additions and 236 deletions

View File

@@ -1393,7 +1393,7 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenSipKernelTypeWhenAllocatingTh
memoryManager->freeGraphicsMemory(sipAllocation);
}
using DrmMemoryManagerFailInjectionPrelimTest = TestLegacy<DrmMemoryManagerFixturePrelim>;
using DrmMemoryManagerFailInjectionPrelimTest = Test<DrmMemoryManagerFixturePrelim>;
TEST_F(DrmMemoryManagerFailInjectionPrelimTest, givenEnabledLocalMemoryWhenNewFailsThenAllocateInDevicePoolReturnsStatusErrorAndNullallocation) {
mock->ioctl_expected.total = -1; //don't care
@@ -1573,7 +1573,7 @@ TEST_F(DrmMemoryManagerCopyMemoryToAllocationPrelimTest, givenDrmMemoryManagerWh
drmMemoryManger.freeGraphicsMemory(allocation);
}
typedef TestLegacy<DrmMemoryManagerFixturePrelim> DrmMemoryManagerTestPrelim;
typedef Test<DrmMemoryManagerFixturePrelim> DrmMemoryManagerTestPrelim;
TEST_F(DrmMemoryManagerTestPrelim, whenSettingNumHandlesThenTheyAreRetrievedCorrectly) {
mock->ioctl_expected.primeFdToHandle = 2;

View File

@@ -33,19 +33,19 @@ class DrmMemoryManagerFixtureImpl : public DrmMemoryManagerFixture {
public:
DrmMockCustom *mockExp;
void SetUp() override {
void setUp() {
backup = std::make_unique<VariableBackup<UltHwConfig>>(&ultHwConfig);
ultHwConfig.csrBaseCallCreatePreemption = false;
MemoryManagementFixture::SetUp();
MemoryManagementFixture::setUp();
executionEnvironment = MockDevice::prepareExecutionEnvironment(defaultHwInfo.get(), numRootDevices - 1);
mockExp = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
DrmMemoryManagerFixture::SetUp(mockExp, true);
DrmMemoryManagerFixture::setUp(mockExp, true);
}
void TearDown() override {
void tearDown() {
mockExp->testIoctls();
DrmMemoryManagerFixture::TearDown();
DrmMemoryManagerFixture::tearDown();
}
std::unique_ptr<VariableBackup<UltHwConfig>> backup;
};
@@ -647,7 +647,7 @@ TEST_F(DrmMemoryManagerLocalMemoryWithCustomMockTest, givenDrmMemoryManagerWithL
EXPECT_EQ(nullptr, bo.peekLockedAddress());
}
using DrmMemoryManagerFailInjectionTest = TestLegacy<DrmMemoryManagerFixtureImpl>;
using DrmMemoryManagerFailInjectionTest = Test<DrmMemoryManagerFixtureImpl>;
HWTEST2_F(DrmMemoryManagerFailInjectionTest, givenEnabledLocalMemoryWhenNewFailsThenAllocateInDevicePoolReturnsStatusErrorAndNullallocation, NonDefaultIoctlsSupported) {
mock->ioctl_expected.total = -1; //don't care
@@ -795,7 +795,7 @@ TEST_F(DrmMemoryManagerCopyMemoryToAllocationTest, givenDrmMemoryManagerWhenCopy
drmMemoryManger.freeGraphicsMemory(allocation);
}
using DrmMemoryManagerTestImpl = TestLegacy<DrmMemoryManagerFixtureImpl>;
using DrmMemoryManagerTestImpl = Test<DrmMemoryManagerFixtureImpl>;
HWTEST2_F(DrmMemoryManagerTestImpl, givenDrmMemoryManagerWhenLockUnlockIsCalledOnAllocationInLocalMemoryThenCallIoctlGemMapOffsetAndReturnLockedPtr, NonDefaultIoctlsSupported) {
mockExp->ioctl_expected.gemCreateExt = 1;

View File

@@ -32,11 +32,11 @@
namespace {
using MemoryManagerMultiDeviceSharedHandleTest = MemoryAllocatorMultiDeviceFixture<2>;
using DrmMemoryManagerTest = TestLegacy<DrmMemoryManagerFixture>;
using DrmMemoryManagerWithLocalMemoryTest = TestLegacy<DrmMemoryManagerWithLocalMemoryFixture>;
using DrmMemoryManagerWithExplicitExpectationsTest = TestLegacy<DrmMemoryManagerFixtureWithoutQuietIoctlExpectation>;
using DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest = TestLegacy<DrmMemoryManagerFixtureWithLocalMemoryAndWithoutQuietIoctlExpectation>;
using DrmMemoryManagerUSMHostAllocationTests = TestLegacy<DrmMemoryManagerFixture>;
using DrmMemoryManagerTest = Test<DrmMemoryManagerFixture>;
using DrmMemoryManagerWithLocalMemoryTest = Test<DrmMemoryManagerWithLocalMemoryFixture>;
using DrmMemoryManagerWithExplicitExpectationsTest = Test<DrmMemoryManagerFixtureWithoutQuietIoctlExpectation>;
using DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest = Test<DrmMemoryManagerFixtureWithLocalMemoryAndWithoutQuietIoctlExpectation>;
using DrmMemoryManagerUSMHostAllocationTests = Test<DrmMemoryManagerFixture>;
AllocationProperties createAllocationProperties(uint32_t rootDeviceIndex, size_t size, bool forcePin) {
MockAllocationProperties properties(rootDeviceIndex, size);
@@ -2140,7 +2140,7 @@ TEST_F(DrmMemoryManagerTest, givenMemoryManagerWhenAskedForInternalAllocationWit
memoryManager->freeGraphicsMemory(drmAllocation);
}
using DrmMemoryManagerUSMHostAllocationTests = TestLegacy<DrmMemoryManagerFixture>;
using DrmMemoryManagerUSMHostAllocationTests = Test<DrmMemoryManagerFixture>;
TEST_F(DrmMemoryManagerUSMHostAllocationTests, givenCallToAllocateGraphicsMemoryWithAlignmentWithIsHostUsmAllocationSetToFalseThenNewHostPointerIsUsedAndAllocationIsCreatedSuccesfully) {
mock->ioctl_expected.gemUserptr = 1;
@@ -3956,7 +3956,7 @@ TEST(DrmMemoryManagerSimpleTest, WhenDrmIsCreatedThenQueryPageFaultSupportIsCall
EXPECT_TRUE(static_cast<DrmMock *>(drm.get())->queryPageFaultSupportCalled);
}
using DrmMemoryManagerWithLocalMemoryTest = TestLegacy<DrmMemoryManagerWithLocalMemoryFixture>;
using DrmMemoryManagerWithLocalMemoryTest = Test<DrmMemoryManagerWithLocalMemoryFixture>;
TEST_F(DrmMemoryManagerWithLocalMemoryTest, givenDrmMemoryManagerWithLocalMemoryWhenLockResourceIsCalledOnAllocationInLocalMemoryThenReturnNullPtr) {
DrmAllocation drmAllocation(rootDeviceIndex, AllocationType::UNKNOWN, nullptr, nullptr, 0u, 0u, MemoryPool::LocalMemory);
@@ -3967,7 +3967,7 @@ TEST_F(DrmMemoryManagerWithLocalMemoryTest, givenDrmMemoryManagerWithLocalMemory
memoryManager->unlockResource(&drmAllocation);
}
using DrmMemoryManagerTest = TestLegacy<DrmMemoryManagerFixture>;
using DrmMemoryManagerTest = Test<DrmMemoryManagerFixture>;
TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenCopyMemoryToAllocationThenAllocationIsFilledWithCorrectData) {
mock->ioctl_expected.gemUserptr = 1;

View File

@@ -71,7 +71,7 @@ TEST(OSLibraryTest, whenSymbolNameIsInvalidThenGetProcAddressReturnsNullPointer)
EXPECT_EQ(nullptr, ptr);
}
using OsLibraryTestWithFailureInjection = TestLegacy<MemoryManagementFixture>;
using OsLibraryTestWithFailureInjection = Test<MemoryManagementFixture>;
TEST_F(OsLibraryTestWithFailureInjection, GivenFailureInjectionWhenLibraryIsLoadedThenOnlyFailedAllocationIsNull) {
InjectedFunction method = [](size_t failureIndex) {

View File

@@ -58,7 +58,7 @@ class WddmCommandStreamFixture {
DebugManagerStateRestore stateRestore;
void SetUp() {
void setUp() {
HardwareInfo *hwInfo = nullptr;
DebugManager.flags.CsrDispatchMode.set(static_cast<uint32_t>(DispatchMode::ImmediateDispatch));
auto executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
@@ -74,7 +74,7 @@ class WddmCommandStreamFixture {
csr->getOsContext().ensureContextInitialized();
}
void TearDown() {
void tearDown() {
}
};
@@ -172,16 +172,16 @@ class WddmCommandStreamMockGdiTest : public ::testing::Test {
}
};
using WddmCommandStreamTest = ::TestLegacy<WddmCommandStreamFixture>;
using WddmCommandStreamTest = ::Test<WddmCommandStreamFixture>;
using WddmDefaultTest = ::Test<DeviceFixture>;
struct DeviceCommandStreamTest : ::TestLegacy<MockAubCenterFixture>, DeviceFixture {
struct DeviceCommandStreamTest : ::Test<MockAubCenterFixture>, DeviceFixture {
void SetUp() override {
DeviceFixture::setUp();
MockAubCenterFixture::SetUp();
MockAubCenterFixture::setUp();
setMockAubCenter(pDevice->getRootDeviceEnvironmentRef());
}
void TearDown() override {
MockAubCenterFixture::TearDown();
MockAubCenterFixture::tearDown();
DeviceFixture::tearDown();
}
};
@@ -307,13 +307,13 @@ TEST_F(WddmCommandStreamTest, givenWdmmWhenSubmitIsCalledThenCoherencyRequiredFl
}
struct WddmPreemptionHeaderFixture {
void SetUp() {
void setUp() {
executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
executionEnvironment->incRefInternal();
wddm = static_cast<WddmMock *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->getDriverModel()->as<Wddm>());
}
void TearDown() {
void tearDown() {
executionEnvironment->decRefInternal();
}
@@ -322,7 +322,7 @@ struct WddmPreemptionHeaderFixture {
WddmMock *wddm = nullptr;
};
using WddmPreemptionHeaderTests = ::TestLegacy<WddmPreemptionHeaderFixture>;
using WddmPreemptionHeaderTests = ::Test<WddmPreemptionHeaderFixture>;
TEST_F(WddmPreemptionHeaderTests, givenWddmCommandStreamReceiverWhenPreemptionIsOffWhenWorkloadIsSubmittedThenHeaderDoesntHavePreemptionFieldSet) {
hwInfo->capabilityTable.defaultPreemptionMode = PreemptionMode::Disabled;

View File

@@ -15,10 +15,10 @@
using namespace NEO;
class WddmPreemptionTests : public TestLegacy<WddmFixtureWithMockGdiDll> {
class WddmPreemptionTests : public Test<WddmFixtureWithMockGdiDll> {
public:
void SetUp() override {
WddmFixtureWithMockGdiDll::SetUp();
WddmFixtureWithMockGdiDll::setUp();
const HardwareInfo hwInfo = *defaultHwInfo;
memcpy(&hwInfoTest, &hwInfo, sizeof(hwInfoTest));
dbgRestorer = new DebugManagerStateRestore();
@@ -27,7 +27,7 @@ class WddmPreemptionTests : public TestLegacy<WddmFixtureWithMockGdiDll> {
void TearDown() override {
delete dbgRestorer;
WddmFixtureWithMockGdiDll::TearDown();
WddmFixtureWithMockGdiDll::tearDown();
}
void createAndInitWddm(unsigned int forceReturnPreemptionRegKeyValue) {

View File

@@ -24,9 +24,9 @@ class WddmSharedAllocationsMock : public WddmMock {
class WddmSharedTestsFixture : public GdiDllFixture, public MockExecutionEnvironmentGmmFixture {
public:
void SetUp() override {
MockExecutionEnvironmentGmmFixture::SetUp();
GdiDllFixture::SetUp();
void setUp() {
MockExecutionEnvironmentGmmFixture::setUp();
GdiDllFixture::setUp();
rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[0].get();
wddm = new WddmSharedAllocationsMock(*rootDeviceEnvironment);
wddmMockInterface = new WddmMockInterface20(*wddm);
@@ -49,8 +49,8 @@ class WddmSharedTestsFixture : public GdiDllFixture, public MockExecutionEnviron
osContext->ensureContextInitialized();
}
void TearDown() override {
GdiDllFixture::TearDown();
void tearDown() {
GdiDllFixture::tearDown();
}
WddmSharedAllocationsMock *wddm = nullptr;
@@ -60,7 +60,7 @@ class WddmSharedTestsFixture : public GdiDllFixture, public MockExecutionEnviron
RootDeviceEnvironment *rootDeviceEnvironment = nullptr;
};
using WdmmSharedTests = TestLegacy<WddmSharedTestsFixture>;
using WdmmSharedTests = Test<WddmSharedTestsFixture>;
TEST_F(WdmmSharedTests, WhenCreatingSharedAllocationAndGetNTHandleFailedThenAllocationIsDeletedAndHandlesAreSetToZero) {
init();

View File

@@ -24,7 +24,7 @@ class WddmMemManagerFixture {
FrontWindowMemManagerMock(NEO::ExecutionEnvironment &executionEnvironment) : MockWddmMemoryManager(executionEnvironment) {}
};
void SetUp() {
void setUp() {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.UseExternalAllocatorForSshAndDsh.set(true);
executionEnvironment = std::make_unique<ExecutionEnvironment>();
@@ -37,13 +37,13 @@ class WddmMemManagerFixture {
wddm->callBaseMapGpuVa = false;
memManager = std::unique_ptr<FrontWindowMemManagerMock>(new FrontWindowMemManagerMock(*executionEnvironment));
}
void TearDown() {
void tearDown() {
}
std::unique_ptr<FrontWindowMemManagerMock> memManager;
std::unique_ptr<ExecutionEnvironment> executionEnvironment;
};
using WddmFrontWindowPoolAllocatorTests = TestLegacy<WddmMemManagerFixture>;
using WddmFrontWindowPoolAllocatorTests = Test<WddmMemManagerFixture>;
TEST_F(WddmFrontWindowPoolAllocatorTests, givenAllocateInFrontWindowPoolFlagWhenWddmAllocate32BitGraphicsMemoryThenAllocateAtHeapBegining) {
AllocationData allocData = {};

View File

@@ -366,9 +366,9 @@ class WddmSkipResourceCleanupMock : public WddmMock {
};
struct WddmSkipResourceCleanupFixtureWithMockGdiDll : public GdiDllFixture, public MockExecutionEnvironmentGmmFixture {
void SetUp() override {
MockExecutionEnvironmentGmmFixture::SetUp();
GdiDllFixture::SetUp();
void setUp() {
MockExecutionEnvironmentGmmFixture::setUp();
GdiDllFixture::setUp();
rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[0].get();
wddm = static_cast<WddmSkipResourceCleanupMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
wddmMockInterface = new WddmMockInterface20(*wddm);
@@ -391,10 +391,10 @@ struct WddmSkipResourceCleanupFixtureWithMockGdiDll : public GdiDllFixture, publ
osContext->ensureContextInitialized();
}
void TearDown() override {
void tearDown() {
osContext.reset(nullptr);
GdiDllFixture::TearDown();
MockExecutionEnvironmentGmmFixture::TearDown();
GdiDllFixture::tearDown();
MockExecutionEnvironmentGmmFixture::tearDown();
}
WddmSkipResourceCleanupMock *wddm = nullptr;
@@ -404,7 +404,7 @@ struct WddmSkipResourceCleanupFixtureWithMockGdiDll : public GdiDllFixture, publ
RootDeviceEnvironment *rootDeviceEnvironment = nullptr;
};
using WddmSkipResourceCleanupFixtureTests = TestLegacy<WddmSkipResourceCleanupFixtureWithMockGdiDll>;
using WddmSkipResourceCleanupFixtureTests = Test<WddmSkipResourceCleanupFixtureWithMockGdiDll>;
TEST_F(WddmSkipResourceCleanupFixtureTests, givenWaitForSynchronizationObjectFromCpuWhenSkipResourceCleanupIsTrueThenSuccessIsReturnedAndGdiFunctionIsNotCalled) {
VariableBackup<uint64_t> varBackup(&waitForSynchronizationObjectFromCpuCounter);