65113c2b | 27-May-2022 |
Ed Tanous <edtanous@google.com> |
Simplify construction of tuples
The latest version of GCC flags an error on this code, where string length isn't initialized in some cases, and prints several pages of template and compiler errors.
Simplify construction of tuples
The latest version of GCC flags an error on this code, where string length isn't initialized in some cases, and prints several pages of template and compiler errors.
This commit simplifies the code such that rather than constructing a tuple, moving it to a stack variable, then moving it into the vector, simply constructs the tuple in the vector in the first place. This avoids an undefined behavior warning of use after free on the tuple variable.
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I4d8424f452a98e558607527abd3ec9cf7f4460d1
show more ...
|
2fddc40c | 23-May-2022 |
Ed Tanous <edtanous@google.com> |
Make test code use the correct signed types
There were a number of comparisons in the tests that were comparing signed ints to unsigned ints. This lead to compiler errors in some cases.
../../../.
Make test code use the correct signed types
There were a number of comparisons in the tests that were comparing signed ints to unsigned ints. This lead to compiler errors in some cases.
../../../../../../workspace/sources/phosphor-snmp/test/test_error_notification.cpp:35:5: required from here | /usr/src/gtest/include/gtest/gtest.h:1545:11: error: comparison of integer expressions of different signedness: 'const int' and 'const unsigned int' [-Werror=sign-compare] | if (lhs == rhs) {
This commit fixes it.
Tested: Code compiles, unit test changes only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib6dd2afced3672ec1f7096ade07b36d53049cf1a
show more ...
|
dec30269 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
Remove compilation using autotools
The intent behind this commit is build phosphor-snmp with meson, so need to remove files related to autotools.
Signed-off-by: George Liu <liuxiwei@inspur.com> Cha
Remove compilation using autotools
The intent behind this commit is build phosphor-snmp with meson, so need to remove files related to autotools.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ibf9fc3c12d184553c4aed84256a6e2c11d93d9f4
show more ...
|
e65b0a70 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
Handle D-Bus exceptions
Remove the usage of is_method_error()[1] Also, add try-catch to handle D-Bus exceptions around mapper call.
[1]https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/14010
Handle D-Bus exceptions
Remove the usage of is_method_error()[1] Also, add try-catch to handle D-Bus exceptions around mapper call.
[1]https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/14010
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I042e86676950aa25d646ff597ac55500abe44ddf
show more ...
|
4caedfbb | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Signed-off-b
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I151fc489a93ec7f513411aea2f0b61829bc808f6
show more ...
|
208acee7 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
meson: Add meson build for test
This commit is to add meson build for test. and later, we will remove autotools and replace it with meson.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id:
meson: Add meson build for test
This commit is to add meson build for test. and later, we will remove autotools and replace it with meson.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I79c72ca9c508bb5a807d078537bc135af836acdb
show more ...
|
918e4aaf | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
meson: Add meson build
This commit is to add meson build
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I108e22e041b5ebfa57bc87a03c184df35190853c |
ed2ee733 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
meson: Add subprojects file
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ib8f3c483de3731b3b20d87cd77ec8d82167dff95 |
f87999d1 | 10-May-2022 |
George Liu <liuxiwei@inspur.com> |
Update clang-format
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ia038d883dc1c8bdf23d6cfed186ae11d6e9fa571 |
0357dffb | 15-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
build: enable C++20
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3ed1ec193eb30c62c5aab91f035f8e768cd747dc |
b9b4c7db | 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I12bac733597177ec85336a204b081779fe6ce19e
show more ...
|
34d129a9 | 04-Dec-2021 |
Ratan Gupta <ratankgupta31@gmail.com> |
Resolve Meson issues
This commit includes fixes in the repo:
1. Moving experimental filesystem to filesystem 2. Errors that meson identified
Signed-off-by: Ratan Gupta <ratankgupta31@gmail.com> Ch
Resolve Meson issues
This commit includes fixes in the repo:
1. Moving experimental filesystem to filesystem 2. Errors that meson identified
Signed-off-by: Ratan Gupta <ratankgupta31@gmail.com> Change-Id: I93c77c2a434275c4da3ca4549919eaa55b57f481
show more ...
|
7350c77a | 03-Dec-2021 |
Chicago Duan <duanzhijia01@inspur.com> |
SNMPTrap: SNMPTrap address support hostname
The address of snmptrap only supports IP(such as 192.168.1.1), not support hostname(such as www.snmptrap.com). This commit enables the snmptrap address to
SNMPTrap: SNMPTrap address support hostname
The address of snmptrap only supports IP(such as 192.168.1.1), not support hostname(such as www.snmptrap.com). This commit enables the snmptrap address to support hostname.
Tested: 1.Creat snmp trap client with hostname "snmp.prashanth.com" : busctl call xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager xyz.openbmc_project.Network.Client.Create Client sq "snmp.prashanth.com" 162
busctl introspect xyz.openbmc_project.Network.SNMP /xyz/openbmc_project/network/snmp/manager/1 xyz.openbmc_project.Network.Client NAME TYPE SIGNATURE RESULT/VALUE .Address property s "snmp.prashanth.com" .Port property q 162
2.Create an error log, and then I received snmptrap on the computer with address "snmp.prashanth.com".
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I38e0963735036bf2bbaa102822f735345a3087d1
show more ...
|
d560529e | 24-Oct-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Add OWNERS file
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Icbc9fe3a6566cf7de61f23bfc7a1450a84122dfd |
5374d6e9 | 22-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
use Create interface from phosphor-dbus-interfaces
The 'Network.Client.Create' interface has been moved to PDI. Delete the one here and use that instead.
Signed-off-by: Patrick Williams <patrick@s
use Create interface from phosphor-dbus-interfaces
The 'Network.Client.Create' interface has been moved to PDI. Delete the one here and use that instead.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic28af8a6681622c004b9608f19d018fb6a84b673
show more ...
|
c3600d86 | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iee4354d96981eac216425c71668f8eb72e146977 |
9e60ef5f | 31-May-2021 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Add validation of IP address
With the current implementation, when configuring a wrong ip, there no error thrown, instead that ip address is being configured.
POST -d '{"data":["10.10.10",162]}' ht
Add validation of IP address
With the current implementation, when configuring a wrong ip, there no error thrown, instead that ip address is being configured.
POST -d '{"data":["10.10.10",162]}' https://${bmc}/xyz/openbmc_project/network/snmp/manager/action/Client { "data": "/xyz/openbmc_project/network/snmp/manager/27", "message": "200 OK", "status": "ok" }
This commit adds the validation of the ip address during the configuration.
Tested-By:
Failure case: POST -d '{"data":["10.10.10",162]}' https://${bmc}/xyz/openbmc_project/network/snmp/manager/action/Client { "data": { "description": "xyz.openbmc_project.Common.Error.InvalidArgument" }, "message": "Invalid argument was given.", "status": "error" }
Few more cases that are tested: "10.10.10.10.10" "10.10.10.100000" "10.10.10.bb" "10.10.10.10.bb" "10.10.bb.aa"
Success case: POST -d '{"data":["10.10.10.101",162]}' https://${bmc}/xyz/openbmc_project/network/snmp/manager/action/Client { "data": "/xyz/openbmc_project/network/snmp/manager/1", "message": "200 OK", "status": "ok" }
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: Ia08e6eeaa70e3ce45eb055cf927901b36bc4f845
show more ...
|
df871e9d | 26-May-2021 |
Ratan Gupta <ratankgupta31@gmail.com> |
MAINTAINERS: Change Ratan's email address
Signed-off-by: Ratan Gupta <ratankgupta31@gmail.com> Change-Id: I001dcccbf0fcb759d69d5ae2b678e93a96a0f5f4 |
33a34f04 | 13-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
bootstrap: fix shellcheck warnings
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I86ef079c9632e5563a1a56d6a2e23aad59ecbc57 |
0d5094bf | 05-Mar-2021 |
Ratan Gupta <ratagupt@linux.vnet.ibm.com> |
Add the Sysuptime in SNMP trap
As per the rfc3416 https://tools.ietf.org/search/rfc3416#page-22 The first two variable bindings in the variable binding list of an SNMPv2-Trap-PDU are sysUpTime.0 [RF
Add the Sysuptime in SNMP trap
As per the rfc3416 https://tools.ietf.org/search/rfc3416#page-22 The first two variable bindings in the variable binding list of an SNMPv2-Trap-PDU are sysUpTime.0 [RFC3418] and snmpTrapOID.0 [RFC3418].
This commit adds the sysUpTime.0 [RFC3418] in the SNMP trap.
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com> Change-Id: Ie1a28ac2bbf30e05f0be498c278d866e9bf9c8a2
show more ...
|
1334b7b3 | 22-Feb-2021 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format-11: reformat
The .clang-format file here is an old version of the common one. Upgrade to the latest and reformat.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic87853
clang-format-11: reformat
The .clang-format file here is an old version of the common one. Upgrade to the latest and reformat.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic87853e6004d2d5ad6645a3ece8c0c87ccc96efd
show more ...
|
2cbf7231 | 24-Feb-2021 |
Patrick Williams <patrick@stwcx.xyz> |
test: unit test fixes for vtable exception
Seeing the following unit test failures due to duplicate objects being put onto the dbus. This is likely due to a change in an underlying library to be mo
test: unit test fixes for vtable exception
Seeing the following unit test failures due to duplicate objects being put onto the dbus. This is likely due to a change in an underlying library to be more stringent. Changed the object path for the second objects to avoid the exception.
[ RUN ] TestSNMPClient.CheckPersistency unknown file: Failure C++ exception with description "sd_bus_add_object_vtable: org.freedesktop.DBus.Error.FileExists: File exists" thrown in the test body. [ FAILED ] TestSNMPClient.CheckPersistency (0 ms)
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I16f06cc1249ebc2c6957b8429141ba0d02b05fb9
show more ...
|
e5d90c35 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic7440c349fc69df0c74c9ecf6c2a3759aeca3e7d |
7d4bd22e | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8d012f098dcca98ddbaf82e29219a15ddde5ba62 |
85c11b9b | 01-Aug-2019 |
Andrew Jeffery <andrew@aj.id.au> |
autotools: Fix autoconf-archive compatibility issues
autoconf-archive 2019-01-06 changed the setup of code coverage support. Deal with both old and new. Based on Patrick Venture's similar patch in o
autotools: Fix autoconf-archive compatibility issues
autoconf-archive 2019-01-06 changed the setup of code coverage support. Deal with both old and new. Based on Patrick Venture's similar patch in other repositories[1].
[1] https://github.com/openbmc/phosphor-pid-control/commit/90e9dbcae6c1df3127dd3de41f9d1e1b5a438828
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ibf7b240f0b3e78ba80f587de7a0f8a1e804a7446
show more ...
|