style: format code using clang-format 15.0.6

Related-To: NEO-7500
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-01-04 15:00:09 +00:00
committed by Compute-Runtime-Automation
parent a4794e432d
commit 43b790957d
183 changed files with 1210 additions and 1211 deletions

View File

@@ -24,7 +24,7 @@ FabricDeviceIaf::FabricDeviceIaf(Device *device) : device(device) {
DeviceImp *deviceImp = static_cast<DeviceImp *>(device);
if (deviceImp->numSubDevices == 0) {
//Add one sub-device
// Add one sub-device
subDeviceIafs.push_back(std::make_unique<FabricSubDeviceIaf>(device));
} else {
for (const auto &subDevice : deviceImp->subDevices) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -11,7 +11,6 @@
#include "level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl"
#include "cmdqueue_extended.inl"
//#include "igfxfmid.h"
namespace L0 {
template struct CommandQueueHw<IGFX_GEN12LP_CORE>;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -61,7 +61,7 @@ bool testEventsDeviceSignalDeviceWait(ze_context_handle_t &context, ze_device_ha
ZE_EVENT_SCOPE_FLAG_HOST,
(ze_event_scope_flag_t)0);
//Initialize memory
// Initialize memory
uint8_t dstValue = 0;
uint8_t srcValue = 55;
SUCCESS_OR_TERMINATE(zeCommandListAppendMemoryFill(cmdList, dstBuffer, reinterpret_cast<void *>(&dstValue),

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -166,7 +166,7 @@ bool testFence(ze_context_handle_t &context, ze_device_handle_t &device) {
if (verbose)
std::cout << "zeFenceHostSynchronize success" << std::endl;
//Tear down
// Tear down
SUCCESS_OR_TERMINATE(zeFenceReset(fence));
SUCCESS_OR_TERMINATE(zeCommandListReset(cmdList));
SUCCESS_OR_TERMINATE(zeMemFree(context, dstBuffer));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -42,7 +42,7 @@ void executeGpuKernelAndValidate(ze_driver_handle_t &driverHandle, ze_context_ha
pFnzexDriverGetHostPointerBaseAddress zexDriverGetHostPointerBaseAddress = nullptr;
SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zexDriverGetHostPointerBaseAddress", reinterpret_cast<void **>(&zexDriverGetHostPointerBaseAddress)));
//Import memory
// Import memory
SUCCESS_OR_TERMINATE(zexDriverImportExternalPointer(driverHandle, srcBuffer, allocSize));
SUCCESS_OR_TERMINATE(zexDriverImportExternalPointer(driverHandle, dstBuffer, allocSize));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -256,12 +256,12 @@ int main(int argc, char *argv[]) {
bool outputValidationSuccessful = true;
if (outputValidationSuccessful || aubMode) {
//Sync mode with Compute queue
// Sync mode with Compute queue
std::cout << "Test case: Sync mode compute queue with Kernel launch \n";
executeGpuKernelAndValidate(context, device, true, outputValidationSuccessful);
}
if (outputValidationSuccessful || aubMode) {
//Async mode with Compute queue
// Async mode with Compute queue
std::cout << "\nTest case: Async mode compute queue with Kernel launch \n";
executeGpuKernelAndValidate(context, device, false, outputValidationSuccessful);
}
@@ -318,12 +318,12 @@ int main(int argc, char *argv[]) {
std::cout << "No Copy queue group found. Skipping further test runs\n";
} else {
if (outputValidationSuccessful || aubMode) {
//Sync mode with Copy queue
// Sync mode with Copy queue
std::cout << "\nTest case: Sync mode copy queue for memory copy\n";
testCopyBetweenHostMemAndDeviceMem(context, copyQueueDev, true, copyQueueGroup, outputValidationSuccessful);
}
if (outputValidationSuccessful || aubMode) {
//Async mode with Copy queue
// Async mode with Copy queue
std::cout << "\nTest case: Async mode copy queue for memory copy\n";
testCopyBetweenHostMemAndDeviceMem(context, copyQueueDev, false, copyQueueGroup, outputValidationSuccessful);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -215,11 +215,11 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemp
uint32_t data = ((1 << 1) | (1 << 2)) << 16;
EXPECT_EQ(data, lriCmd->getDataDword());
//next should be BB_START to 1st Mid-Thread Cmd List
// next should be BB_START to 1st Mid-Thread Cmd List
auto itorBBStart = find<MI_BATCH_BUFFER_START *>(itorLri, cmdList.end());
EXPECT_NE(itorBBStart, cmdList.end());
//next should be PIPE_CONTROL and LRI switching to thread-group
// next should be PIPE_CONTROL and LRI switching to thread-group
auto itorPipeControl = find<PIPE_CONTROL *>(itorBBStart, cmdList.end());
EXPECT_NE(itorPipeControl, cmdList.end());
@@ -230,11 +230,11 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemp
EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset());
data = (1 << 1) | (((1 << 1) | (1 << 2)) << 16);
EXPECT_EQ(data, lriCmd->getDataDword());
//start of thread-group command list
// start of thread-group command list
itorBBStart = find<MI_BATCH_BUFFER_START *>(itorLri, cmdList.end());
EXPECT_NE(itorBBStart, cmdList.end());
//next should be PIPE_CONTROL and LRI switching to mid-thread again
// next should be PIPE_CONTROL and LRI switching to mid-thread again
itorPipeControl = find<PIPE_CONTROL *>(itorBBStart, cmdList.end());
EXPECT_NE(itorPipeControl, cmdList.end());
@@ -245,7 +245,7 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemp
EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset());
data = ((1 << 1) | (1 << 2)) << 16;
EXPECT_EQ(data, lriCmd->getDataDword());
//start of thread-group command list
// start of thread-group command list
itorBBStart = find<MI_BATCH_BUFFER_START *>(itorLri, cmdList.end());
EXPECT_NE(itorBBStart, cmdList.end());

View File

@@ -129,16 +129,16 @@ void applyWorkarounds() {
mockObj.method(2);
}
//intialize rand
// intialize rand
srand(static_cast<unsigned int>(time(nullptr)));
//Create at least on thread to prevent false memory leaks in tests using threads
// Create at least on thread to prevent false memory leaks in tests using threads
std::thread t([&]() {
});
tempThreadID = t.get_id();
t.join();
//Create FileLogger to prevent false memory leaks
// Create FileLogger to prevent false memory leaks
{
NEO::fileLoggerInstance();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -466,7 +466,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenSynchronousCommandQueueWhenTagUpdateF
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
ASSERT_NE(nullptr, commandList);
//1st execute provides all preamble commands
// 1st execute provides all preamble commands
ze_command_list_handle_t cmdListHandle = commandList->toHandle();
returnValue = commandQueue->executeCommandLists(1, &cmdListHandle, nullptr, false);
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -374,7 +374,7 @@ TEST_F(FabricIafEdgeFixture, GivenMultipleDevicesAndSubDevicesWhenCreatingEdgesT
fabricSubDeviceIaf1->connections = connection01To11;
fabricSubDeviceIaf1->guid = 0xAB;
//SubVertices
// SubVertices
auto &fabricVertex00 = fabricVertex0->subVertices[0];
auto fabricSubDeviceIaf00 = static_cast<FabricSubDeviceIaf *>(fabricVertex00->pFabricDeviceInterfaces[FabricDeviceInterface::Type::Iaf].get());
fabricSubDeviceIaf00->connections.clear();
@@ -401,7 +401,7 @@ TEST_F(FabricIafEdgeFixture, GivenMultipleDevicesAndSubDevicesWhenCreatingEdgesT
fabricSubDeviceIaf1->connections = connection11To01;
fabricSubDeviceIaf1->guid = 0xABCD;
//SubVertices
// SubVertices
auto &fabricVertex00 = fabricVertex1->subVertices[0];
auto fabricSubDeviceIaf00 = static_cast<FabricSubDeviceIaf *>(fabricVertex00->pFabricDeviceInterfaces[FabricDeviceInterface::Type::Iaf].get());
fabricSubDeviceIaf00->connections.clear();
@@ -423,7 +423,7 @@ TEST_F(FabricIafEdgeFixture, GivenMultipleDevicesAndSubDevicesWhenCreatingEdgesT
constexpr uint32_t root2root = 1;
constexpr uint32_t subDevice2root = 4; // 2 root to 2 sub-devices each
constexpr uint32_t subDevice2SubDevice = 4 + 2; //4 MDFI (considering 4 roots with 2 sub-devices); 2 sub-device to sub-device XeLink
constexpr uint32_t subDevice2SubDevice = 4 + 2; // 4 MDFI (considering 4 roots with 2 sub-devices); 2 sub-device to sub-device XeLink
EXPECT_EQ(static_cast<uint32_t>(driverHandle->fabricEdges.size()), root2root + subDevice2root + subDevice2SubDevice);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -21,7 +21,7 @@ extern "C" {
#ifndef ZET_INTEL_GPU_DEBUG_MINOR
#define ZET_INTEL_GPU_DEBUG_MINOR 0
#endif //!ZET_INTEL_GPU_DEBUG_MINOR
#endif //! ZET_INTEL_GPU_DEBUG_MINOR
#if ZET_INTEL_GPU_DEBUG_MAJOR == 1
///////////////////////////////////////////////////////////////////////////////

View File

@@ -1798,7 +1798,7 @@ bool DebugSessionLinux::ackIsaEvents(uint32_t deviceIndex, uint64_t isaVa) {
if (isa != connection->isaMap[deviceIndex].end()) {
//zebin modules do not store ackEvents per ISA
// zebin modules do not store ackEvents per ISA
UNRECOVERABLE_IF(isa->second->ackEvents.size() > 0 && isa->second->perKernelModule == false);
for (auto &event : isa->second->ackEvents) {
@@ -1849,7 +1849,7 @@ void DebugSessionLinux::cleanRootSessionAfterDetach(uint32_t deviceIndex) {
for (const auto &isa : connection->isaMap[deviceIndex]) {
//zebin modules do not store ackEvents per ISA
// zebin modules do not store ackEvents per ISA
UNRECOVERABLE_IF(isa.second->ackEvents.size() > 0 && isa.second->perKernelModule == false);
for (auto &event : isa.second->ackEvents) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -24,8 +24,8 @@ std::unique_ptr<OaMetricSourceImp> OaMetricSourceImp::create(const MetricDeviceC
}
OaMetricSourceImp::OaMetricSourceImp(const MetricDeviceContext &metricDeviceContext) : metricDeviceContext(metricDeviceContext),
metricEnumeration(std::unique_ptr<MetricEnumeration>(new (std::nothrow) MetricEnumeration(*this))),
metricsLibrary(std::unique_ptr<MetricsLibrary>(new (std::nothrow) MetricsLibrary(*this))) {
metricEnumeration(std::unique_ptr<MetricEnumeration>(new(std::nothrow) MetricEnumeration(*this))),
metricsLibrary(std::unique_ptr<MetricsLibrary>(new(std::nothrow) MetricsLibrary(*this))) {
}
OaMetricSourceImp::~OaMetricSourceImp() = default;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -18,7 +18,7 @@
namespace L0 {
const std::string LinuxDiagnosticsImp::deviceDir("device");
//the sysfs node will be at /sys/class/drm/card<n>/invalidate_lmem_mmaps
// the sysfs node will be at /sys/class/drm/card<n>/invalidate_lmem_mmaps
const std::string LinuxDiagnosticsImp::invalidateLmemFile("invalidate_lmem_mmaps");
// the sysfs node will be at /sys/class/drm/card<n>/quiesce_gpu
const std::string LinuxDiagnosticsImp::quiescentGpuFile("quiesce_gpu");
@@ -34,14 +34,14 @@ void OsDiagnostics::getSupportedDiagTestsFromFW(void *pOsSysman, std::vector<std
// before running diagnostics need to close all active workloads
// writing 1 to /sys/class/drm/card<n>/quiesce_gpu will signal KMD
//to close and clear all allocations,
//ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE will be sent till the kworker confirms that
//all allocations are closed and GPU is be wedged.
// to close and clear all allocations,
// ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE will be sent till the kworker confirms that
// all allocations are closed and GPU is be wedged.
// GPU will only be unwedged after warm/cold reset
//writing 1 to /sys/class/drm/card<n>/invalidate_lmem_mmaps clears
// writing 1 to /sys/class/drm/card<n>/invalidate_lmem_mmaps clears
// all memory mappings where LMEMBAR is being referenced are invalidated.
//Also prevents new ones from being created.
//It will invalidate LMEM memory mappings only when sysfs entry quiesce_gpu is set.
// Also prevents new ones from being created.
// It will invalidate LMEM memory mappings only when sysfs entry quiesce_gpu is set.
ze_result_t LinuxDiagnosticsImp::waitForQuiescentCompletion() {
uint32_t count = 0;
const int intVal = 1;
@@ -60,7 +60,7 @@ ze_result_t LinuxDiagnosticsImp::waitForQuiescentCompletion() {
} else {
return result;
}
} while (count < 10); //limiting to 10 retries as we can endup going into a infinite loop if the cleanup and a process start are out of sync
} while (count < 10); // limiting to 10 retries as we can endup going into a infinite loop if the cleanup and a process start are out of sync
result = pSysfsAccess->write(invalidateLmemFile, intVal);
if (ZE_RESULT_SUCCESS != result) {
return result;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -33,7 +33,7 @@ void EngineHandleContext::createHandle(zes_engine_group_t engineType, uint32_t e
}
void EngineHandleContext::init(std::vector<ze_device_handle_t> &deviceHandles) {
std::set<std::pair<zes_engine_group_t, EngineInstanceSubDeviceId>> engineGroupInstance = {}; //set contains pair of engine group and struct containing engine instance and subdeviceId
std::set<std::pair<zes_engine_group_t, EngineInstanceSubDeviceId>> engineGroupInstance = {}; // set contains pair of engine group and struct containing engine instance and subdeviceId
OsEngine::getNumEngineTypeAndInstances(engineGroupInstance, pOsSysman);
for (auto itr = engineGroupInstance.begin(); itr != engineGroupInstance.end(); ++itr) {
for (const auto &deviceHandle : deviceHandles) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -73,7 +73,7 @@ bool LinuxEventsImp::checkIfMemHealthChanged(zes_event_type_flags_t &pEvent) {
bool LinuxEventsImp::eventListen(zes_event_type_flags_t &pEvent, uint64_t timeout) {
if (registeredEvents & ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED) {
if (isResetRequired(pEvent)) {
registeredEvents &= ~(ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED); //After receiving event unregister it
registeredEvents &= ~(ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED); // After receiving event unregister it
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -161,7 +161,7 @@ ze_result_t FabricDeviceAccessNl::getPorts(std::vector<zes_fabric_port_id_t> &po
return result;
}
//Update fabricPorts
// Update fabricPorts
for (const auto &iafPort : iafPorts) {
Port port = {};
readIafPort(port, iafPort);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -45,7 +45,7 @@ void LinuxFirmwareImp::osGetFwProperties(zes_firmware_properties_t *pProperties)
if (ZE_RESULT_SUCCESS != getFirmwareVersion(osFwType, pProperties)) {
strncpy_s(static_cast<char *>(pProperties->version), ZES_STRING_PROPERTY_SIZE, unknown.c_str(), ZES_STRING_PROPERTY_SIZE - 1);
}
pProperties->canControl = true; //Assuming that user has permission to flash the firmware
pProperties->canControl = true; // Assuming that user has permission to flash the firmware
}
ze_result_t LinuxFirmwareImp::osFirmwareFlash(void *pImage, uint32_t size) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -142,7 +142,7 @@ bool queryTest() {
status &= queryRun(deviceId, -1, testSettings->metricGroupName.get());
}
} else {
//Run for specific device
// Run for specific device
status &= queryRun(testSettings->deviceId.get(), testSettings->subDeviceId.get(), testSettings->metricGroupName.get());
}
@@ -215,7 +215,7 @@ bool streamTest() {
status &= streamRun(deviceId, -1, testSettings->metricGroupName.get());
}
} else {
//Run for specific device
// Run for specific device
status &= streamRun(testSettings->deviceId.get(), testSettings->subDeviceId.get(), testSettings->metricGroupName.get());
}
@@ -276,7 +276,7 @@ bool streamMultiMetricDomainTest() {
status &= streamMultiMetricDomainRun(deviceId, -1);
}
} else {
//Run for specific device
// Run for specific device
status &= streamMultiMetricDomainRun(testSettings->deviceId.get(), testSettings->subDeviceId.get());
}
@@ -427,7 +427,7 @@ bool streamMtCollectionWorkloadDifferentThreads() {
status &= streamMt(deviceId, -1, testSettings->metricGroupName.get());
}
} else {
//Run for specific device
// Run for specific device
status &= streamMt(testSettings->deviceId.get(), testSettings->subDeviceId.get(), testSettings->metricGroupName.get());
}
@@ -592,7 +592,7 @@ bool streamMpCollectionWorkloadDifferentProcess() {
if (testSettings->deviceId.get() == -1) {
status &= streamMp(0, 0, testSettings->metricGroupName.get());
} else {
//Run for specific device
// Run for specific device
status &= streamMp(testSettings->deviceId.get(), testSettings->subDeviceId.get(), testSettings->metricGroupName.get());
}
@@ -822,7 +822,7 @@ bool queryImmediateCommandListTest() {
status &= queryRun(deviceId, -1, testSettings->metricGroupName.get());
}
} else {
//Run for specific device
// Run for specific device
status &= queryRun(testSettings->deviceId.get(), testSettings->subDeviceId.get(), testSettings->metricGroupName.get());
}
@@ -882,7 +882,7 @@ bool collectIndefinitely() {
if (testSettings->deviceId.get() == -1) {
testSettings->deviceId.set(0);
}
//Run for specific device
// Run for specific device
status &= collectStart(testSettings->deviceId.get(), testSettings->subDeviceId.get(), testSettings->metricGroupName.get());
return status;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -76,7 +76,7 @@ bool SingleMetricStreamerCollector::start() {
&streamerProperties,
notificationEvent,
&metricStreamer));
//Initial pause
// Initial pause
std::this_thread::sleep_for(std::chrono::milliseconds(100));
return true;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -571,7 +571,7 @@ TEST(DebugSessionTest, WhenConvertingThreadIDsForDeviceWithSingleSliceThenSubsli
auto sessionMock = std::make_unique<DebugSessionMock>(zet_debug_config_t{0x1234}, &deviceImp);
ASSERT_NE(nullptr, sessionMock);
//fuse off first slice
// fuse off first slice
sessionMock->topologyMap[0].sliceIndices.erase(sessionMock->topologyMap[0].sliceIndices.begin());
hwInfo.gtSystemInfo.SliceCount = 1;
sessionMock->topologyMap[0].subsliceIndices.push_back(2);
@@ -608,7 +608,7 @@ TEST(DebugSessionTest, WhenConvertingThreadIDsForDeviceWithMultipleSlicesThenSub
auto sessionMock = std::make_unique<DebugSessionMock>(zet_debug_config_t{0x1234}, &deviceImp);
ASSERT_NE(nullptr, sessionMock);
//fuse off first slice
// fuse off first slice
sessionMock->topologyMap[0].sliceIndices.erase(sessionMock->topologyMap[0].sliceIndices.begin());
hwInfo.gtSystemInfo.SliceCount = 7;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -174,7 +174,7 @@ struct MockIoctlHandler : public L0::DebugSessionLinux::IoctlHandler {
if (*static_cast<char *>(addr) != static_cast<char>(0xaa)) {
memoryModifiedInMunmap = true;
}
delete[](char *) addr;
delete[] (char *)addr;
} else {
return -1;
}

View File

@@ -1278,7 +1278,7 @@ TEST_F(DebugApiLinuxTest, GivenDebuggerMmapMemoryAccessFalseWhenCallingReadGpuMe
session->clientHandle = MockDebugSessionLinux::mockClientHandle;
NEO::SysCalls::closeFuncCalled = 0;
handler->preadRetVal = bufferSize; //16 bytes to read
handler->preadRetVal = bufferSize; // 16 bytes to read
char output[bufferSize] = {};
auto retVal = session->readGpuMemory(7, output, bufferSize, 0x23000);
EXPECT_EQ(0, retVal);

View File

@@ -260,7 +260,7 @@ TEST_F(TileAttachTest, givenTileDeviceWhenCallingDebugAttachAndDetachManyTimesTh
zet_debug_config_t config = {};
config.pid = 0x1234;
zet_debug_session_handle_t debugSession0 = nullptr;
rootSession->tileSessions[1].second = true; //prevent destroying root session
rootSession->tileSessions[1].second = true; // prevent destroying root session
auto result = zetDebugAttach(neoDevice->getSubDevice(0)->getSpecializedDevice<L0::Device>()->toHandle(), &config, &debugSession0);
EXPECT_EQ(ZE_RESULT_SUCCESS, result);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -426,7 +426,7 @@ TEST_F(MetricIpSamplingStreamerTest, GivenAllInputsAreCorrectWhenReadDataIsCalle
EXPECT_EQ(zetMetricStreamerOpen(context->toHandle(), device, metricGroupHandle, &streamerDesc, eventHandle, &streamerHandle), ZE_RESULT_SUCCESS);
EXPECT_NE(streamerHandle, nullptr);
//Setup data for both subdevices
// Setup data for both subdevices
osInterfaceVector[1]->isfillDataEnabled = true;
osInterfaceVector[1]->fillData = 2;
osInterfaceVector[1]->fillDataSize = 64 * 20;
@@ -469,7 +469,7 @@ TEST_F(MetricIpSamplingStreamerTest, GivenNotEnoughMemoryWhileReadingWhenReadDat
EXPECT_EQ(zetMetricStreamerOpen(context->toHandle(), device, metricGroupHandle, &streamerDesc, eventHandle, &streamerHandle), ZE_RESULT_SUCCESS);
EXPECT_NE(streamerHandle, nullptr);
//Setup data for both subdevices
// Setup data for both subdevices
osInterfaceVector[1]->isfillDataEnabled = true;
osInterfaceVector[1]->fillData = 2;
osInterfaceVector[1]->fillDataSize = osInterfaceVector[1]->getUnitReportSize() * 20;
@@ -483,7 +483,7 @@ TEST_F(MetricIpSamplingStreamerTest, GivenNotEnoughMemoryWhileReadingWhenReadDat
EXPECT_NE(rawSize, 0u);
std::vector<uint8_t> rawData = {};
//Setup memory for only the first sub-device's read to succeed
// Setup memory for only the first sub-device's read to succeed
rawSize = osInterfaceVector[1]->fillDataSize;
rawData.resize(rawSize);
EXPECT_EQ(zetMetricStreamerReadData(streamerHandle, 75, &rawSize, rawData.data()), ZE_RESULT_SUCCESS);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -930,7 +930,7 @@ TEST_F(FreqMultiDeviceFixture, GivenAffinityMaskIsSetWhenCallingFrequencyPropert
EXPECT_EQ(nullptr, properties.pNext);
EXPECT_EQ(ZES_FREQ_DOMAIN_GPU, properties.type);
EXPECT_TRUE(properties.onSubdevice);
EXPECT_EQ(1u, properties.subdeviceId); //Affinity mask 0.1 is set which means only subdevice 1 is exposed
EXPECT_EQ(1u, properties.subdeviceId); // Affinity mask 0.1 is set which means only subdevice 1 is exposed
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -871,7 +871,7 @@ TEST_F(FreqMultiDeviceFixture, GivenAffinityMaskIsSetWhenCallingFrequencyPropert
EXPECT_EQ(nullptr, properties.pNext);
EXPECT_EQ(ZES_FREQ_DOMAIN_GPU, properties.type);
EXPECT_TRUE(properties.onSubdevice);
EXPECT_EQ(1u, properties.subdeviceId); //Affinity mask 0.1 is set which means only subdevice 1 is exposed
EXPECT_EQ(1u, properties.subdeviceId); // Affinity mask 0.1 is set which means only subdevice 1 is exposed
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -121,7 +121,7 @@ TEST_F(SysmanPmuFixture, GivenValidPmuHandleWhenCallingPmuInterfaceOpenAndPerfEv
TEST_F(SysmanPmuFixture, GivenValidPmuHandleWhenAndDomainErrorOccursThenDomainErrorIsReturnedBygetErrorNoFunction) {
MockPmuInterfaceImpForSysman *pmuInterface = new MockPmuInterfaceImpForSysman(pLinuxSysmanImp);
log(-1.0); //Domain error injected
log(-1.0); // Domain error injected
EXPECT_EQ(EDOM, pmuInterface->getErrorNo());
delete pmuInterface;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -163,7 +163,7 @@ TEST_F(SysmanDeviceFixture, GivenSetValidDrmHandleForDeviceWhenDoingOsSysmanDevi
TEST_F(SysmanDeviceFixture, GivenCreateFsAccessHandleWhenCallinggetFsAccessThenCreatedFsAccessHandleWillBeRetrieved) {
if (pLinuxSysmanImp->pFsAccess != nullptr) {
//delete previously allocated pFsAccess
// delete previously allocated pFsAccess
delete pLinuxSysmanImp->pFsAccess;
pLinuxSysmanImp->pFsAccess = nullptr;
}
@@ -260,7 +260,7 @@ TEST_F(SysmanDeviceFixture, GivenInvalidPathnameWhenCallingFsAccessExistsThenErr
TEST_F(SysmanDeviceFixture, GivenCreateSysfsAccessHandleWhenCallinggetSysfsAccessThenCreatedSysfsAccessHandleHandleWillBeRetrieved) {
if (pLinuxSysmanImp->pSysfsAccess != nullptr) {
//delete previously allocated pSysfsAccess
// delete previously allocated pSysfsAccess
delete pLinuxSysmanImp->pSysfsAccess;
pLinuxSysmanImp->pSysfsAccess = nullptr;
}
@@ -270,7 +270,7 @@ TEST_F(SysmanDeviceFixture, GivenCreateSysfsAccessHandleWhenCallinggetSysfsAcces
TEST_F(SysmanDeviceFixture, GivenCreateProcfsAccessHandleWhenCallinggetProcfsAccessThenCreatedProcfsAccessHandleWillBeRetrieved) {
if (pLinuxSysmanImp->pProcfsAccess != nullptr) {
//delete previously allocated pProcfsAccess
// delete previously allocated pProcfsAccess
delete pLinuxSysmanImp->pProcfsAccess;
pLinuxSysmanImp->pProcfsAccess = nullptr;
}
@@ -296,7 +296,7 @@ TEST_F(SysmanDeviceFixture, GivenValidDeviceHandleThenSameHandleIsRetrievedFromO
TEST_F(SysmanDeviceFixture, GivenPmuInterfaceHandleWhenCallinggetPmuInterfaceThenCreatedPmuInterfaceHandleWillBeRetrieved) {
if (pLinuxSysmanImp->pPmuInterface != nullptr) {
//delete previously allocated pPmuInterface
// delete previously allocated pPmuInterface
delete pLinuxSysmanImp->pPmuInterface;
pLinuxSysmanImp->pPmuInterface = nullptr;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -23,7 +23,7 @@ class PciKmdSysManager : public Mock<MockKmdSysManager> {};
template <>
struct Mock<PciKmdSysManager> : public PciKmdSysManager {
//PciCurrentDevice, PciParentDevice, PciRootPort
// PciCurrentDevice, PciParentDevice, PciRootPort
uint32_t mockDomain[3] = {0, 0, 0};
uint32_t mockBus[3] = {0, 0, 3};
uint32_t mockDevice[3] = {2, 0, 0};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -742,7 +742,7 @@ TEST_F(SysmanRasAffinityMaskFixture, GivenAffinityMaskIsSetWhenCallingRasPropert
EXPECT_EQ(ZE_RESULT_SUCCESS, zesRasGetProperties(handle, &properties));
EXPECT_EQ(properties.pNext, nullptr);
EXPECT_EQ(properties.onSubdevice, true);
EXPECT_EQ(properties.subdeviceId, 1u); //Affinity mask 0.1 is set which means only subdevice 1 is exposed
EXPECT_EQ(properties.subdeviceId, 1u); // Affinity mask 0.1 is set which means only subdevice 1 is exposed
if (handleIndex == 0u) {
EXPECT_EQ(properties.type, ZES_RAS_ERROR_TYPE_CORRECTABLE);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -245,7 +245,7 @@ class MockSchedulerProcfsAccess : public ProcfsAccess {
ADDMETHOD_NOBASE_VOIDRETURN(kill, (const ::pid_t pid));
};
//class SchedulerSysfsAccess : public SysfsAccess {};
// class SchedulerSysfsAccess : public SysfsAccess {};
typedef struct SchedulerConfigValues {
uint64_t defaultVal;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -416,7 +416,7 @@ TEST_F(StandbyAffinityMaskFixture, GivenAffinityMaskIsSetWhenCallingStandbyPrope
EXPECT_EQ(nullptr, properties.pNext);
EXPECT_EQ(ZES_STANDBY_TYPE_GLOBAL, properties.type);
EXPECT_TRUE(properties.onSubdevice);
EXPECT_EQ(1u, properties.subdeviceId); //Affinity mask 0.1 is set which means only subdevice 1 is exposed
EXPECT_EQ(1u, properties.subdeviceId); // Affinity mask 0.1 is set which means only subdevice 1 is exposed
}
}