Fix typo and error check when retrieving pci information

Fix
1. typo PhysialDevicePciSpeedInfo to PhysicalDevicePciSpeedInfo
2. error check to verify open() call

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
Joshua Santosh Ranjan 2022-10-14 13:02:37 +00:00 committed by Compute-Runtime-Automation
parent 95505d87a5
commit b2c80be6f9
15 changed files with 50 additions and 38 deletions

View File

@ -14,7 +14,7 @@
namespace L0 { namespace L0 {
namespace ult { namespace ult {
void PciSpeedInfoTest::setPciSpeedInfo(NEO::ExecutionEnvironment *executionEnvironment, const NEO::PhyicalDevicePciSpeedInfo &pciSpeedInfo) { void PciSpeedInfoTest::setPciSpeedInfo(NEO::ExecutionEnvironment *executionEnvironment, const NEO::PhysicalDevicePciSpeedInfo &pciSpeedInfo) {
auto driverModel = std::make_unique<NEO::MockDriverModel>(); auto driverModel = std::make_unique<NEO::MockDriverModel>();
driverModel->pciSpeedInfo = pciSpeedInfo; driverModel->pciSpeedInfo = pciSpeedInfo;
driverModel->pciBusInfo = {0, 1, 2, 3}; driverModel->pciBusInfo = {0, 1, 2, 3};

View File

@ -18,7 +18,7 @@
namespace L0 { namespace L0 {
namespace ult { namespace ult {
std::unique_ptr<NEO::UltDeviceFactory> PciSpeedInfoTest::createDevices(uint32_t numSubDevices, const NEO::PhyicalDevicePciSpeedInfo &pciSpeedInfo) { std::unique_ptr<NEO::UltDeviceFactory> PciSpeedInfoTest::createDevices(uint32_t numSubDevices, const NEO::PhysicalDevicePciSpeedInfo &pciSpeedInfo) {
DebugManager.flags.CreateMultipleSubDevices.set(numSubDevices); DebugManager.flags.CreateMultipleSubDevices.set(numSubDevices);
DebugManager.flags.EnableChipsetUniqueUUID.set(0); DebugManager.flags.EnableChipsetUniqueUUID.set(0);
@ -31,7 +31,7 @@ std::unique_ptr<NEO::UltDeviceFactory> PciSpeedInfoTest::createDevices(uint32_t
TEST_F(PciSpeedInfoTest, givenSuccessfulReadingOfSpeedValuesCorrectValuesAreReturned) { TEST_F(PciSpeedInfoTest, givenSuccessfulReadingOfSpeedValuesCorrectValuesAreReturned) {
NEO::PhyicalDevicePciSpeedInfo expectedSpeedInfo; NEO::PhysicalDevicePciSpeedInfo expectedSpeedInfo;
expectedSpeedInfo.genVersion = 4; expectedSpeedInfo.genVersion = 4;
expectedSpeedInfo.width = 1024; expectedSpeedInfo.width = 1024;
expectedSpeedInfo.maxBandwidth = 4096; expectedSpeedInfo.maxBandwidth = 4096;

View File

@ -12,7 +12,7 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
namespace NEO { namespace NEO {
struct PhyicalDevicePciSpeedInfo; struct PhysicalDevicePciSpeedInfo;
struct UltDeviceFactory; struct UltDeviceFactory;
class ExecutionEnvironment; class ExecutionEnvironment;
} // namespace NEO } // namespace NEO
@ -21,11 +21,11 @@ namespace L0 {
namespace ult { namespace ult {
struct PciSpeedInfoTest : public ::testing::Test { struct PciSpeedInfoTest : public ::testing::Test {
std::unique_ptr<NEO::UltDeviceFactory> createDevices(uint32_t numSubDevices, const NEO::PhyicalDevicePciSpeedInfo &pciSpeedInfo); std::unique_ptr<NEO::UltDeviceFactory> createDevices(uint32_t numSubDevices, const NEO::PhysicalDevicePciSpeedInfo &pciSpeedInfo);
DebugManagerStateRestore restorer; DebugManagerStateRestore restorer;
private: private:
void setPciSpeedInfo(NEO::ExecutionEnvironment *executionEnvironment, const NEO::PhyicalDevicePciSpeedInfo &pciSpeedInfo); void setPciSpeedInfo(NEO::ExecutionEnvironment *executionEnvironment, const NEO::PhysicalDevicePciSpeedInfo &pciSpeedInfo);
}; };
} // namespace ult } // namespace ult

View File

@ -21,21 +21,21 @@ namespace ult {
class PciSpeedInfoTestDriverModel : public WddmMock { class PciSpeedInfoTestDriverModel : public WddmMock {
public: public:
PciSpeedInfoTestDriverModel(RootDeviceEnvironment &rootDeviceEnvironment) : WddmMock(rootDeviceEnvironment) {} PciSpeedInfoTestDriverModel(RootDeviceEnvironment &rootDeviceEnvironment) : WddmMock(rootDeviceEnvironment) {}
void setExpectedPciSpeedInfo(const PhyicalDevicePciSpeedInfo &pciSpeedInfo) { void setExpectedPciSpeedInfo(const PhysicalDevicePciSpeedInfo &pciSpeedInfo) {
returnedSpeedInfo = pciSpeedInfo; returnedSpeedInfo = pciSpeedInfo;
} }
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override { PhysicalDevicePciSpeedInfo getPciSpeedInfo() const override {
return returnedSpeedInfo; return returnedSpeedInfo;
} }
PhysicalDevicePciBusInfo getPciBusInfo() const override { PhysicalDevicePciBusInfo getPciBusInfo() const override {
return NEO::PhysicalDevicePciBusInfo(0, 1, 2, 3); return NEO::PhysicalDevicePciBusInfo(0, 1, 2, 3);
} }
PhyicalDevicePciSpeedInfo returnedSpeedInfo = {-1, -1, -1}; PhysicalDevicePciSpeedInfo returnedSpeedInfo = {-1, -1, -1};
}; };
void PciSpeedInfoTest::setPciSpeedInfo(NEO::ExecutionEnvironment *executionEnvironment, const NEO::PhyicalDevicePciSpeedInfo &pciSpeedInfo) { void PciSpeedInfoTest::setPciSpeedInfo(NEO::ExecutionEnvironment *executionEnvironment, const NEO::PhysicalDevicePciSpeedInfo &pciSpeedInfo) {
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel( executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(
std::make_unique<PciSpeedInfoTestDriverModel>(*executionEnvironment->rootDeviceEnvironments[0])); std::make_unique<PciSpeedInfoTestDriverModel>(*executionEnvironment->rootDeviceEnvironments[0]));
PciSpeedInfoTestDriverModel *driverModel = static_cast<PciSpeedInfoTestDriverModel *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->getDriverModel()); PciSpeedInfoTestDriverModel *driverModel = static_cast<PciSpeedInfoTestDriverModel *>(executionEnvironment->rootDeviceEnvironments[0]->osInterface->getDriverModel());

View File

@ -433,7 +433,7 @@ class UnknownDriverModel : public DriverModel {
PhysicalDevicePciBusInfo pciBusInfo(PhysicalDevicePciBusInfo::invalidValue, PhysicalDevicePciBusInfo::invalidValue, PhysicalDevicePciBusInfo::invalidValue, PhysicalDevicePciBusInfo::invalidValue); PhysicalDevicePciBusInfo pciBusInfo(PhysicalDevicePciBusInfo::invalidValue, PhysicalDevicePciBusInfo::invalidValue, PhysicalDevicePciBusInfo::invalidValue, PhysicalDevicePciBusInfo::invalidValue);
return pciBusInfo; return pciBusInfo;
} }
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override { return {}; } PhysicalDevicePciSpeedInfo getPciSpeedInfo() const override { return {}; }
bool isGpuHangDetected(OsContext &osContext) override { bool isGpuHangDetected(OsContext &osContext) override {
return false; return false;

View File

@ -292,7 +292,7 @@ class DriverModelMock : public DriverModel {
PhysicalDevicePciBusInfo getPciBusInfo() const override { PhysicalDevicePciBusInfo getPciBusInfo() const override {
return {}; return {};
} }
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override { PhysicalDevicePciSpeedInfo getPciSpeedInfo() const override {
return {}; return {};
} }

View File

@ -33,7 +33,7 @@ struct PhysicalDevicePciBusInfo {
uint32_t pciFunction = invalidValue; uint32_t pciFunction = invalidValue;
}; };
struct PhyicalDevicePciSpeedInfo { struct PhysicalDevicePciSpeedInfo {
static constexpr int32_t unknown = -1; static constexpr int32_t unknown = -1;
int32_t genVersion = unknown; int32_t genVersion = unknown;
int32_t width = unknown; int32_t width = unknown;

View File

@ -1485,9 +1485,9 @@ int Drm::createDrmVirtualMemory(uint32_t &drmVmId) {
return ret; return ret;
} }
PhyicalDevicePciSpeedInfo Drm::getPciSpeedInfo() const { PhysicalDevicePciSpeedInfo Drm::getPciSpeedInfo() const {
PhyicalDevicePciSpeedInfo pciSpeedInfo = {}; PhysicalDevicePciSpeedInfo pciSpeedInfo = {};
std::string pathPrefix{}; std::string pathPrefix{};
bool isIntegratedDevice = rootDeviceEnvironment.getHardwareInfo()->capabilityTable.isIntegratedDevice; bool isIntegratedDevice = rootDeviceEnvironment.getHardwareInfo()->capabilityTable.isIntegratedDevice;
@ -1516,7 +1516,7 @@ PhyicalDevicePciSpeedInfo Drm::getPciSpeedInfo() const {
linkWidthStream << pathPrefix << fileName; linkWidthStream << pathPrefix << fileName;
int fd = NEO::SysCalls::open(linkWidthStream.str().c_str(), O_RDONLY); int fd = NEO::SysCalls::open(linkWidthStream.str().c_str(), O_RDONLY);
if (fd == 0) { if (fd < 0) {
return false; return false;
} }
ssize_t bytesRead = NEO::SysCalls::pread(fd, readString.data(), readString.size() - 1, 0); ssize_t bytesRead = NEO::SysCalls::pread(fd, readString.data(), readString.size() - 1, 0);

View File

@ -84,7 +84,7 @@ class Drm : public DriverModel {
unsigned int getDeviceHandle() const override { unsigned int getDeviceHandle() const override {
return 0; return 0;
} }
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override; PhysicalDevicePciSpeedInfo getPciSpeedInfo() const override;
int getExecSoftPin(int &execSoftPin); int getExecSoftPin(int &execSoftPin);
int enableTurboBoost(); int enableTurboBoost();
int getEuTotal(int &euTotal); int getEuTotal(int &euTotal);

View File

@ -79,7 +79,7 @@ class DriverModel : public NonCopyableClass {
} }
virtual PhysicalDevicePciBusInfo getPciBusInfo() const = 0; virtual PhysicalDevicePciBusInfo getPciBusInfo() const = 0;
virtual PhyicalDevicePciSpeedInfo getPciSpeedInfo() const = 0; virtual PhysicalDevicePciSpeedInfo getPciSpeedInfo() const = 0;
virtual size_t getMaxMemAllocSize() const { virtual size_t getMaxMemAllocSize() const {
return std::numeric_limits<size_t>::max(); return std::numeric_limits<size_t>::max();

View File

@ -1200,8 +1200,8 @@ PhysicalDevicePciBusInfo Wddm::getPciBusInfo() const {
return PhysicalDevicePciBusInfo(0, adapterBDF.Bus, adapterBDF.Device, adapterBDF.Function); return PhysicalDevicePciBusInfo(0, adapterBDF.Bus, adapterBDF.Device, adapterBDF.Function);
} }
PhyicalDevicePciSpeedInfo Wddm::getPciSpeedInfo() const { PhysicalDevicePciSpeedInfo Wddm::getPciSpeedInfo() const {
PhyicalDevicePciSpeedInfo speedInfo{}; PhysicalDevicePciSpeedInfo speedInfo{};
return speedInfo; return speedInfo;
} }

View File

@ -207,7 +207,7 @@ class Wddm : public DriverModel {
return adapterBDF; return adapterBDF;
} }
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override; PhysicalDevicePciSpeedInfo getPciSpeedInfo() const override;
bool buildTopologyMapping(); bool buildTopologyMapping();
uint32_t getAdditionalAdapterInfoOptions() const { uint32_t getAdditionalAdapterInfoOptions() const {

View File

@ -37,9 +37,9 @@ class MockDriverModel : public NEO::DriverModel {
return isGpuHangDetectedToReturn; return isGpuHangDetectedToReturn;
} }
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override { return pciSpeedInfo; } PhysicalDevicePciSpeedInfo getPciSpeedInfo() const override { return pciSpeedInfo; }
PhyicalDevicePciSpeedInfo pciSpeedInfo{}; PhysicalDevicePciSpeedInfo pciSpeedInfo{};
PhysicalDevicePciBusInfo pciBusInfo{}; PhysicalDevicePciBusInfo pciBusInfo{};
bool isGpuHangDetectedToReturn{}; bool isGpuHangDetectedToReturn{};
std::function<void()> isGpuHangDetectedSideEffect{}; std::function<void()> isGpuHangDetectedSideEffect{};

View File

@ -288,7 +288,7 @@ TEST_F(DeviceGetCapsTest, whenDriverModelHasLimitationForMaxMemoryAllocationSize
size_t getMaxMemAllocSize() const override { size_t getMaxMemAllocSize() const override {
return maxAllocSize; return maxAllocSize;
} }
PhyicalDevicePciSpeedInfo getPciSpeedInfo() const override { return {}; } PhysicalDevicePciSpeedInfo getPciSpeedInfo() const override { return {}; }
}; };
DebugManagerStateRestore dbgRestorer; DebugManagerStateRestore dbgRestorer;

View File

@ -100,15 +100,27 @@ TEST_F(DrmPciSpeedInfoTest, givenIntegratedDeviceWhenCorrectInputsAreGivenThenCo
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(true)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(true)->getPciSpeedInfo();
EXPECT_EQ(4, pciSpeedInfo.genVersion); EXPECT_EQ(4, pciSpeedInfo.genVersion);
EXPECT_EQ(64, pciSpeedInfo.width); EXPECT_EQ(64, pciSpeedInfo.width);
EXPECT_EQ(126030769230, pciSpeedInfo.maxBandwidth); EXPECT_EQ(126030769230, pciSpeedInfo.maxBandwidth);
} }
TEST_F(DrmPciSpeedInfoTest, givenIntegratedDeviceWhenSysfsFileCouldNotBeOpenedThenUnknownPciSpeedIsReturned) {
VariableBackup<decltype(SysCalls::sysCallsOpen)> mockOpenIntegrated(&SysCalls::sysCallsOpen, [](const char *pathname, int flags) -> int {
return -1;
});
PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(true)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
}
TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenCorrectInputsAreGivenThenCorrectPciSpeedIsReturned) { TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenCorrectInputsAreGivenThenCorrectPciSpeedIsReturned) {
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(5, pciSpeedInfo.genVersion); EXPECT_EQ(5, pciSpeedInfo.genVersion);
EXPECT_EQ(64, pciSpeedInfo.width); EXPECT_EQ(64, pciSpeedInfo.width);
EXPECT_EQ(252061538461, pciSpeedInfo.maxBandwidth); EXPECT_EQ(252061538461, pciSpeedInfo.maxBandwidth);
@ -120,7 +132,7 @@ TEST_F(DrmPciSpeedInfoTest, givenIntegratedDeviceWhenPciLinkPathFailsThenUnknown
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(true)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(true)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -132,7 +144,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenPciRootPathFailsThenUnknownPc
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -146,7 +158,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenPciRootPathFailsDueToMissingP
return static_cast<int>(linkString.size()); return static_cast<int>(linkString.size());
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -160,7 +172,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenPciRootPathFailsDueToUnavaila
return static_cast<int>(linkString.size()); return static_cast<int>(linkString.size());
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -172,7 +184,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenPreadReturnsNegativeValueWhen
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -184,7 +196,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenPreadReturnsZeroWhenAccessing
return 0; return 0;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -205,7 +217,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenReadingLinkWidthStrtoulFailsW
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -227,7 +239,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenReadingLinkWidthStrtoulFailsW
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(-1, pciSpeedInfo.width); EXPECT_EQ(-1, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -247,7 +259,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenReadingMaxLinkSpeedFailsThenU
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(64, pciSpeedInfo.width); EXPECT_EQ(64, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -268,7 +280,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenReadingLinkSpeedStrtoulFailsW
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(64, pciSpeedInfo.width); EXPECT_EQ(64, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -292,7 +304,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenReadingLinkSpeedStrtodFailsWi
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(64, pciSpeedInfo.width); EXPECT_EQ(64, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);
@ -313,7 +325,7 @@ TEST_F(DrmPciSpeedInfoTest, givenDiscreteDeviceWhenUnSupportedLinkSpeedIsReadThe
return -1; return -1;
}); });
PhyicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo(); PhysicalDevicePciSpeedInfo pciSpeedInfo = getDrm(false)->getPciSpeedInfo();
EXPECT_EQ(-1, pciSpeedInfo.genVersion); EXPECT_EQ(-1, pciSpeedInfo.genVersion);
EXPECT_EQ(64, pciSpeedInfo.width); EXPECT_EQ(64, pciSpeedInfo.width);
EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth); EXPECT_EQ(-1, pciSpeedInfo.maxBandwidth);