/openbmc/openpower-pnor-code-mgmt/test/ |
H A D | test_functions.cpp | 17 using namespace std::string_literals; 21 std::map<std::string, std::vector<std::string>> extensionMap{{ in TEST() 24 std::vector<std::string> compatibleSystem{"system-foo"s}, extensions; in TEST() 29 EXPECT_EQ(extensions, std::vector<std::string>{".EXT"s}); in TEST() 34 std::map<std::string, std::vector<std::string>> extensionMap{{ in TEST() 37 std::vector<std::string> compatibleSystem{"system-foo"s}, in TEST() 43 EXPECT_EQ(extensions, std::vector<std::string>{"foo"s}); in TEST() 48 std::map<std::string, std::vector<std::string>> extensionMap{{ in TEST() 52 std::vector<std::string> compatibleSystem{"system-foo"s}, in TEST() 58 EXPECT_EQ(extensions, std::vector<std::string>{".FOO"s}); in TEST() [all …]
|
/openbmc/bmcweb/include/ |
H A D | dbus_utility.hpp | 48 using DbusVariantType = std::variant< 49 std::vector<std::tuple<std::string, std::string, std::string>>, 50 std::vector<std::string>, 51 std::vector<double>, 52 std [all...] |
/openbmc/phosphor-power/phosphor-regulators/test/ |
H A D | configuration_tests.cpp | 53 static const std::string chassisInvPath{ 60 std::optional<double> volts{1.3}; in TEST() 62 std::vector<std::unique_ptr<Action>> actions{}; in TEST() 63 actions.push_back(std::make_unique<MockAction>()); in TEST() 64 actions.push_back(std::make_unique<MockAction>()); in TEST() 66 Configuration configuration(volts, std::move(actions)); in TEST() 74 std::optional<double> volts{}; in TEST() 76 std::vector<std::unique_ptr<Action>> actions{}; in TEST() 77 actions.push_back(std::make_unique<MockAction>()); in TEST() 79 Configuration configuration(volts, std::move(actions)); in TEST() [all …]
|
H A D | rail_tests.cpp | 51 static const std::string chassisInvPath{ 67 std::optional<double> volts{1.3}; in TEST() 68 std::vector<std::unique_ptr<Action>> actions{}; in TEST() 69 actions.push_back(std::make_unique<MockAction>()); in TEST() 70 actions.push_back(std::make_unique<MockAction>()); in TEST() 71 std::unique_ptr<Configuration> configuration = in TEST() 72 std::make_unique<Configuration>(volts, std::move(actions)); in TEST() 76 actions.push_back(std::make_unique<MockAction>()); in TEST() 77 std::unique_ptr<SensorMonitoring> sensorMonitoring = in TEST() 78 std::make_unique<SensorMonitoring>(std::move(actions)); in TEST() [all …]
|
H A D | system_tests.cpp | 58 static const std::string chassisInvPath{ 64 std::vector<std::unique_ptr<Rule>> rules{}; in TEST() 68 std::vector<std::unique_ptr<Chassis>> chassis{}; in TEST() 69 std::vector<std::unique_ptr<Device>> devices{}; in TEST() 72 std::make_unique<Chassis>(1, chassisInvPath, std::move(devices))); in TEST() 75 System system{std::move(rules), std::move(chassis)}; in TEST() 81 EXPECT_THROW(system.getIDMap().getRail("rail2"), std::invalid_argument); in TEST() 89 std::vector<std::unique_ptr<Action>> actions{}; in TEST() 91 std::make_unique<PresenceDetection>(std::move(actions)); in TEST() 95 auto i2cInterface = std::make_unique<i2c::MockedI2CInterface>(); in TEST() [all …]
|
H A D | device_tests.cpp | 70 auto chassis = std::make_unique<Chassis>(1, chassisInvPath); 74 std::vector<std::unique_ptr<Rule>> rules{}; 75 std::vector<std::unique_ptr<Chassis>> chassisVec{}; 76 chassisVec.emplace_back(std::move(chassis)); 78 std::make_unique<System>(std::move(rules), std::move(chassisVec)); 82 const std::string deviceInvPath{ 84 const std::string chassisInvPath{ 91 std::unique_ptr<System> system{}; 98 std::unique_ptr<i2c::I2CInterface> i2cInterface = createI2CInterface(); in TEST_F() 100 Device device{"vdd_reg", true, deviceInvPath, std::move(i2cInterface)}; in TEST_F() [all …]
|
H A D | chassis_tests.cpp | 67 std::vector<std::unique_ptr<Rule>> rules{}; 68 std::vector<std::unique_ptr<Chassis>> chassis{}; 69 system = std::make_unique<System>(std::move(rules), std::move(chassis)); 73 const std::string defaultInventoryPath{ 76 std::unique_ptr<System> system{}; 92 std::vector<std::unique_ptr<Device>> devices{}; in TEST_F() 97 Chassis chassis{1, defaultInventoryPath, std::move(devices)}; in TEST_F() 109 catch (const std::invalid_argument& e) in TEST_F() 122 std::vector<std::unique_ptr<Device>> devices{}; in TEST_F() 128 Chassis chassis{1, defaultInventoryPath, std::move(devices)}; in TEST_F() [all …]
|
/openbmc/phosphor-dbus-monitor/src/test/ |
H A D | propertywatchtest.hpp | 33 static Ret op(DBusInterfaceType& dbus, const std::string& busName, in op() 34 const std::string& path, const std::string& interface, in op() 35 const std::string& method, Args&&... args) in op() 46 const std::vector<std::string>&> 48 static GetObject op(DBusInterfaceType& dbus, const std::string& busName, in op() 49 const std::string& path, const std::string& interface, in op() 50 const std::string& method, const MapperPath& objectPath, in op() 51 const std::vector<std::string>& interfaces) in op() 62 const std::string&> 65 op(DBusInterfaceType& dbus, const std::string& busName, in op() [all …]
|
H A D | propertywatchtest.cpp | 8 using namespace std::string_literals; 11 const std::array<std::string, 4> paths = { 18 const std::array<std::string, 2> interfaces = { 23 const std::array<std::string, 2> properties = { 28 const std::string meta; 30 std::array<std::tuple<std::any, std::any>, 8> storage = {}; 61 static const std::array<uint8_t, 8> values = { in get() 73 static const std::array<uint16_t, 8> values = { in get() 85 static const std::array<uint32_t, 8> values = { in get() 97 static const std::array<uint64_t, 8> values = { in get() [all …]
|
/openbmc/phosphor-power/phosphor-regulators/test/actions/ |
H A D | if_action_tests.cpp | 41 std::unique_ptr<Action> conditionAction = in TEST() 42 std::make_unique<MockAction>(); in TEST() 44 std::vector<std::unique_ptr<Action>> thenActions{}; in TEST() 45 thenActions.push_back(std::make_unique<MockAction>()); in TEST() 46 thenActions.push_back(std::make_unique<MockAction>()); in TEST() 48 IfAction ifAction{std::move(conditionAction), std::move(thenActions)}; in TEST() 56 std::unique_ptr<Action> conditionAction = in TEST() 57 std::make_unique<MockAction>(); in TEST() 59 std::vector<std::unique_ptr<Action>> thenActions{}; in TEST() 60 thenActions.push_back(std::make_unique<MockAction>()); in TEST() [all …]
|
/openbmc/telemetry/src/ |
H A D | trigger_factory.hpp | 15 TriggerFactory(std::shared_ptr<sdbusplus::asio::connection> bus, 16 std::shared_ptr<sdbusplus::asio::object_server> objServer, 19 std::unique_ptr<interfaces::Trigger> 20 make(const std::string& id, const std::string& name, 21 const std::vector<std::string>& triggerActions, 22 const std::vector<std::string>& reportIds, 26 const std::vector<LabeledSensorInfo>& labeledSensorsinfo) 29 std::vector<LabeledSensorInfo> 32 std::vector<LabeledSensorInfo> 36 std::vector<std::shared_ptr<interfaces::Threshold>>& currentThresholds, [all …]
|
H A D | trigger_factory.cpp | 16 std::shared_ptr<sdbusplus::asio::connection> bus, in TriggerFactory() 17 std::shared_ptr<sdbusplus::asio::object_server> objServer, in TriggerFactory() 19 bus(std::move(bus)), objServer(std::move(objServer)), in TriggerFactory() 24 std::vector<std::shared_ptr<interfaces::Threshold>>& currentThresholds, in updateDiscreteThresholds() 25 const std::string& triggerId, in updateDiscreteThresholds() 26 const std::vector<TriggerAction>& triggerActions, in updateDiscreteThresholds() 27 const std::shared_ptr<std::vector<std::string>>& reportIds, in updateDiscreteThresholds() 29 const std::vector<discrete::LabeledThresholdParam>& newParams) const in updateDiscreteThresholds() 32 std::vector<std::shared_ptr<interfaces::Threshold>> newThresholds; in updateDiscreteThresholds() 36 std::holds_alternative<std::monostate>( in updateDiscreteThresholds() [all …]
|
/openbmc/openpower-vpd-parser/vpd-manager/ |
H A D | bios_handler.cpp | 31 static std::shared_ptr<sdbusplus::bus::match_t> nameOwnerMatch = in checkAndListenPLDMService() 32 std::make_shared<sdbusplus::bus::match_t>( in checkAndListenPLDMService() 39 std::cerr in checkAndListenPLDMService() 40 << "Error in reading name owner signal " << std::endl; in checkAndListenPLDMService() 43 std::string name; in checkAndListenPLDMService() 44 std::string newOwner; in checkAndListenPLDMService() 45 std::string oldOwner; in checkAndListenPLDMService() 72 std::cerr << "Failed to check if PLDM is running, assume false" in checkAndListenPLDMService() 73 << std::endl; in checkAndListenPLDMService() 74 std::cerr << e.what() << std::endl; in checkAndListenPLDMService() [all …]
|
/openbmc/linux/arch/powerpc/platforms/ps3/ |
H A D | hvcall.S | 19 std r0, 16(r1); \ 41 std r0, 16(r1); \ 50 std r4, 0(r11); \ 60 std r0, 16(r1); \ 62 std r3, -8(r1); \ 70 std r4, 0(r11); \ 72 std r5, 0(r11); \ 82 std r0, 16(r1); \ 84 std r3, -8(r1); \ 85 std r4, -16(r1); \ [all …]
|
/openbmc/estoraged/src/test/ |
H A D | util_test.cpp | 22 std::string prefixName = "."; in TEST() 23 std::string testFileName = prefixName + "/life_time"; in TEST() 24 std::ofstream testFile; in TEST() 26 std::ios::out | std::ios::binary | std::ios::trunc); in TEST() 30 EXPECT_TRUE(std::filesystem::remove(testFileName)); in TEST() 35 std::string prefixName = "."; in TEST() 36 std::string testFileName = prefixName + "/life_time"; in TEST() 37 std::ofstream testFile; in TEST() 39 std::ios::out | std::ios::binary | std::ios::trunc); in TEST() 44 EXPECT_TRUE(std::filesystem::remove(testFileName)); in TEST() [all …]
|
/openbmc/openpower-vpd-parser/ |
H A D | types.hpp | 20 using Binary = std::vector<Byte>; 21 using BIOSAttrValueType = std::variant<int64_t, std::string>; 23 std::pair<std::string, std::tuple<std::string, BIOSAttrValueType>>; 24 using PendingBIOSAttrsType = std::vector<PendingBIOSAttrItemType>; 29 using Path = std::string; 30 using Property = std::string; 31 using Value = std::variant<bool, size_t, int64_t, std::string, Binary>; 32 using PropertyMap = std::map<Property, Value>; 33 using kwdVpdValueTypes = std::variant<size_t, Binary, std::string>; 35 using Interface = std::string; [all …]
|
/openbmc/phosphor-fan-presence/ |
H A D | sdbusplus.hpp | 34 class DBusError : public std::runtime_error 37 explicit DBusError(const std::string& msg) : std::runtime_error(msg) {} in DBusError() 48 DBusMethodError(const std::string& busName, const std::string& path, in DBusMethodError() 49 const std::string& interface, const std::string& method) : in DBusMethodError() 50 DBusError(std::format("DBus method failed: {} {} {} {}", busName, path, in DBusMethodError() 55 const std::string busName; 56 const std::string path; 57 const std::string interface; 58 const std::string method; 70 DBusServiceError(const std::string& path, const std::string& interface) : in DBusServiceError() [all …]
|
/openbmc/bios-settings-mgr/src/ |
H A D | manager.cpp | 42 std::get<1>(iter->second) = value; in setAttribute() 48 if (std::get_if<int64_t>(&value)) in setAttribute() 50 std::get<0>(attributeValue) = AttributeType::Integer; in setAttribute() 54 std::get<0>(attributeValue) = AttributeType::String; in setAttribute() 57 std::get<1>(attributeValue) = value; in setAttribute() 73 std::get<0>(value) = in getAttribute() 74 std::get<static_cast<uint8_t>(Index::attributeType)>(iter->second); in getAttribute() 75 std::get<1>(value) = in getAttribute() 76 std::get<static_cast<uint8_t>(Index::currentValue)>(iter->second); in getAttribute() 82 std::get<2>(value) = std::get<1>(pendingIter->second); in getAttribute() [all …]
|
/openbmc/phosphor-certificate-manager/test/ |
H A D | certs_manager_test.cpp | 40 namespace fs = std::filesystem; 46 bool compareFiles(const std::string& file1, const std::string& file2) in compareFiles() 48 std::ifstream f1(file1, std::ifstream::binary | std::ifstream::ate); in compareFiles() 49 std::ifstream f2(file2, std::ifstream::binary | std::ifstream::ate); in compareFiles() 61 // seek back to beginning and use std::equal to compare contents in compareFiles() 62 f1.seekg(0, std::ifstream::beg); in compareFiles() 63 f2.seekg(0, std::ifstream::beg); in compareFiles() 64 return std::equal(std::istreambuf_iterator<char>(f1.rdbuf()), in compareFiles() 65 std::istreambuf_iterator<char>(), in compareFiles() 66 std::istreambuf_iterator<char>(f2.rdbuf())); in compareFiles() [all …]
|
/openbmc/linux/drivers/pinctrl/bcm/ |
H A D | pinctrl-bcm281xx.c | 377 BCM281XX_PIN_DESC(BCM281XX_PIN_ADCSYNC, "adcsync", std), 378 BCM281XX_PIN_DESC(BCM281XX_PIN_BAT_RM, "bat_rm", std), 383 BCM281XX_PIN_DESC(BCM281XX_PIN_CLASSGPWR, "classgpwr", std), 384 BCM281XX_PIN_DESC(BCM281XX_PIN_CLK_CX8, "clk_cx8", std), 385 BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_0, "clkout_0", std), 386 BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_1, "clkout_1", std), 387 BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_2, "clkout_2", std), 388 BCM281XX_PIN_DESC(BCM281XX_PIN_CLKOUT_3, "clkout_3", std), 389 BCM281XX_PIN_DESC(BCM281XX_PIN_CLKREQ_IN_0, "clkreq_in_0", std), 390 BCM281XX_PIN_DESC(BCM281XX_PIN_CLKREQ_IN_1, "clkreq_in_1", std), [all …]
|
/openbmc/dbus-sensors/src/ |
H A D | Utils.hpp | 31 const std::regex illegalDbusRegex("[^A-Za-z0-9_]"); 34 std::variant<std::vector<std::string>, std::string, int64_t, uint64_t, 37 boost::container::flat_map<std::string, BasicVariantType>; 38 using SensorBaseConfiguration = std::pair<std::string, SensorBaseConfigMap>; 39 using SensorData = boost::container::flat_map<std::string, SensorBaseConfigMap>; 43 using GetSubTreeType = std::vector< 44 std::pair<std::string, 45 std::vector<std::pair<std::string, std::vector<std::string>>>>>; 46 using Association = std::tuple<std::string, std::string, std::string>; 48 inline std::string escapeName(const std::string& sensorName) in escapeName() [all …]
|
/openbmc/bmcweb/redfish-core/include/utils/ |
H A D | time_utils.hpp | 27 inline std::optional<std::chrono::milliseconds> 28 fromDurationString(std::string_view v) in fromDurationString() 30 std::chrono::milliseconds out = std::chrono::milliseconds::zero(); in fromDurationString() 50 return std::nullopt; in fromDurationString() 66 auto [ptr, ec] = std::from_chars(v.begin(), v.end(), ticks); in fromDurationString() 67 if (ec != std::errc()) in fromDurationString() 70 return std::nullopt; in fromDurationString() 76 return std::nullopt; in fromDurationString() 82 return std::nullopt; in fromDurationString() 84 out += std::chrono::days(ticks); in fromDurationString() [all …]
|
/openbmc/phosphor-logging/extensions/openpower-pels/ |
H A D | dbus_types.hpp | 14 using BiosAttributes = std::map< 15 std::string, 16 std::tuple< 17 std::string, bool, std::string, std::string, std::string, 18 std::variant<int64_t, std::string>, std::variant<int64_t, std::string>, 19 std::vector<std::tuple<std::string, std::variant<int64_t, std::string>, 20 std::string>>>>; 23 std::variant<std::string, bool, std::vector<uint8_t>, 24 std::vector<std::string>, 25 std::vector<std::tuple<std::string, std::string, std::string>>, [all …]
|
/openbmc/phosphor-fan-presence/control/ |
H A D | types.hpp | 26 std::tuple<std::string, std::string, std::string, bool>; 30 using Condition = std::tuple<std::string, std::vector<ConditionProperty>>; 33 std::variant<bool, int32_t, int64_t, double, std::string>; 40 std::tuple<std::string, std::vector<std::string>, std::string, std::string>; 45 using Group = std::vector<std::tuple<std::string, std::string, std::string>>; 46 using ZoneHandler = std::function<void(Zone&)>; 48 std::function<void(sdbusplus::bus_t&, sdbusplus::message_t&, Zone&)>; 49 using MethodHandler = std::function<void(Zone&, const Group&)>; 50 using Action = std::function<void(Zone&, const Group&)>; 51 using Trigger = std::function<void(Zone&, const std::string&, const Group&, [all …]
|
/openbmc/openpower-pnor-code-mgmt/ |
H A D | functions.hpp | 28 std::function<void(const std::filesystem::path&, std::error_code&)>; 30 std::function<void(const std::filesystem::path&, 31 const std::filesystem::path&, const ErrorCallbackType&)>; 33 std::function<void(const std::vector<std::string>&)>; 35 const std::map<std::string, std::vector<std::string>>&, 36 const std::vector<std::string>&, std::vector<std::string>&); 37 void writeLink(const std::filesystem::path&, const std::filesystem::path&, 39 void findLinks(const std::filesystem::path&, const std::vector<std::string>&, 42 const std::map< 43 std::string, [all …]
|