4e845393 | 18-Dec-2018 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Use a single dbus connection object
Starting with sdbusplus 8ca6025, calling bus_new_default multiple times doesn't seem to work - making calls that generate dbus traffic on one of the objects resul
Use a single dbus connection object
Starting with sdbusplus 8ca6025, calling bus_new_default multiple times doesn't seem to work - making calls that generate dbus traffic on one of the objects results in something like:
sd_bus_call: System.Error.ENOTCONN: Transport endpoint is not connected
This wasn't ideal anyway - move to a single object, shared application-wide.
Tested: Booted a witherspoon QEMU image and there were no coredumps Change-Id: I804a1b1438b22f48e45b26d395135e401ca98a06 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
37539dcc | 06-Dec-2018 |
Patrick Venture <venture@google.com> |
build: Add missing inclusion of phosphor-logging
Phosphor-logging is picked up by the configure_ac. Include it in the Makefile such that it's available as defined by the pkgconfig.
Change-Id: I173f
build: Add missing inclusion of phosphor-logging
Phosphor-logging is picked up by the configure_ac. Include it in the Makefile such that it's available as defined by the pkgconfig.
Change-Id: I173fa376ab3419155267ab08350d7a7ad2e1a0f0 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
1f1d8e01 | 06-Nov-2018 |
William A. Kennington III <wak@google.com> |
Fix std::variant usage
We need to conform to the std::variant interface instead of the mapbox specific one.
Change-Id: I3edbcb2682ddfebfcbca6e75284b11f2e18cfd11 Signed-off-by: William A. Kennington
Fix std::variant usage
We need to conform to the std::variant interface instead of the mapbox specific one.
Change-Id: I3edbcb2682ddfebfcbca6e75284b11f2e18cfd11 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
ab4cc6a5 | 14-Sep-2018 |
Gunnar Mills <gmills@us.ibm.com> |
clang-format: Update to match docs repo
Update the .clang-format file and run clang-format-6.0. This .clang-format matches the example one in https://github.com/openbmc/docs/blob/master/cpp-style-an
clang-format: Update to match docs repo
Update the .clang-format file and run clang-format-6.0. This .clang-format matches the example one in https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting
Change-Id: Ic2c462525eb27b8295c2b298871e04268d93faf2 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
19b37ee2 | 18-Sep-2018 |
Lei YU <mine260309@gmail.com> |
Enable link time optimization
To enable link time optimization, several configures needs to be changed: 1. Add -flto in Makefiles 2. Use C++17 to get inline constexpr 3. Use gcc-ar and gcc-ranlib to
Enable link time optimization
To enable link time optimization, several configures needs to be changed: 1. Add -flto in Makefiles 2. Use C++17 to get inline constexpr 3. Use gcc-ar and gcc-ranlib to generate static library, otherwise it gets link errors.
Tested: Build OK and unit tests passes.
Change-Id: Ic58cbfb631c97f43c82d5669cbf6ac1ebc5e0ab9 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
1cd4248d | 23-Jul-2018 |
Lei YU <mine260309@gmail.com> |
Fix un-initialized time owner/mode in manager
The timeOwner/Mode in Manager class has no init value, and it is initialized with the cached time owner/mode in file system.
In most of time it is OK b
Fix un-initialized time owner/mode in manager
The timeOwner/Mode in Manager class has no init value, and it is initialized with the cached time owner/mode in file system.
In most of time it is OK because there is cached time owner/mode. But if the BMC does a factory reset, the cached values are cleaned up, and in next reboot the timeOwner/Mode will not be initialized at all.
The fix is to give default time owner/mode, so when BMC comes from factory reset it uses default time settings.
Tested: Verify the timeOwner/Mode have correct init values after factory reset.
Change-Id: Ib1a8fba4d758f33ed09a7afdc9ed684867fca1c5
show more ...
|
89efe6ed | 23-Jul-2018 |
Lei YU <mine260309@gmail.com> |
Handle SdBusError exception in setting NTP
sdbusplus now throws SdBusError exception when a sd bus call fails. When setting NTP via systemd timedatectl service, it may potentially fail. So handle th
Handle SdBusError exception in setting NTP
sdbusplus now throws SdBusError exception when a sd bus call fails. When setting NTP via systemd timedatectl service, it may potentially fail. So handle this exception.
Also fix a typo in logging, where it should use `=` in meta.
Change-Id: I6c5669b7f06cef47c8d62cb0cbcb0c7fbd2a46e7 Tested: Verify it sets NTP setting OK.
show more ...
|
bae8d7a5 | 23-Jul-2018 |
Lei YU <mine260309@gmail.com> |
Handle SdBusError exception in setting time
sdbusplus now throws SdBusError exception when a sd bus call fails. When setting time via systemd timedatectl service, it may fail to set time due to time
Handle SdBusError exception in setting time
sdbusplus now throws SdBusError exception when a sd bus call fails. When setting time via systemd timedatectl service, it may fail to set time due to time settings. So handle this exception and print the reason.
Tested: Verify this service does not crash but prints the exception in journal log, when it fails to set time to systemd.
Change-Id: I7d3b2e35e58c3924f95d3664653e68efbae8bd14 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
f6fad820 | 13-Jul-2018 |
Lei YU <mine260309@gmail.com> |
Use proper errors when failing to set time
Previously it reports InsufficientPermission when it is not allowed to set time.
Now phosphor-dbus-interfaces defines proper errors for such case, so repo
Use proper errors when failing to set time
Previously it reports InsufficientPermission when it is not allowed to set time.
Now phosphor-dbus-interfaces defines proper errors for such case, so report NotAllowed error when it is not allowed to set time, and report Failed error when it failed to set time.
Tested: Get NotAllowed and Failed error with expected metadata from journal log.
Change-Id: I53610bf27ffc3f62608cea6fd0e66ca859d94675 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
86c83f38 | 13-Jul-2018 |
Lei YU <mine260309@gmail.com> |
Throw runtime_error instead of MethodEror
As suggested, when error occurs in getService/getProperty, it means runtime error, so the code is better to throw std::runtime_error instead of a sdbusplus
Throw runtime_error instead of MethodEror
As suggested, when error occurs in getService/getProperty, it means runtime error, so the code is better to throw std::runtime_error instead of a sdbusplus exception.
Tested: Build the code correctly.
Change-Id: Iddca72ac1fdd07ed6b731b6509eebbfa9d2579d3 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
bd024395 | 09-Sep-2018 |
Lei YU <mine260309@gmail.com> |
Use correct gtest/gmock flags
The test Makefile.am was using -lgmock -lgmock_main directly, which cause link issues on compiling test. Fix this by using the flags specified by gtest package.
Tested
Use correct gtest/gmock flags
The test Makefile.am was using -lgmock -lgmock_main directly, which cause link issues on compiling test. Fix this by using the flags specified by gtest package.
Tested: Verify the CI passes build.
Change-Id: Id51134d7e2696e18f7439f15f8d899edba51856e Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
33752c75 | 07-Jun-2018 |
Lei YU <mine260309@gmail.com> |
Throw excpetion when it is not allowed to set time
When it is not allowed to set time depending on the time setting, previously we only log an error and continue. Now sdbusplus supports errors on pr
Throw excpetion when it is not allowed to set time
When it is not allowed to set time depending on the time setting, previously we only log an error and continue. Now sdbusplus supports errors on properties, so we can throw exception on such case.
Tested: Verify in unittest that exception is thrown when it is not allowed to set time. Verify in BMC that busctl gets the error message when it is not allowed to set time. Change-Id: I4a04d1aa8c081abf0f9fd449118dc1107e12f689 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
85c04d66 | 18-May-2018 |
Andrew Jeffery <andrew@aj.id.au> |
Add MAINTAINERS file
Change-Id: Idb13c9ab2e30cb6fb5d9e14da604b6e4c133c8a2 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
7aa715b2 | 09-May-2018 |
Ed Tanous <ed.tanous@intel.com> |
Follow secure coding standards for interactions with the mapper
This patchset updates phosphor-time-manager to follow secure coding guidelines when interacting with the mapper. Specifically, it rep
Follow secure coding standards for interactions with the mapper
This patchset updates phosphor-time-manager to follow secure coding guidelines when interacting with the mapper. Specifically, it replaces uses of std::map with std::vector<std::pair<>>, which should net some small performance wins. This change also causes time-manager to properly enumerate each response.
Tested-By: Built with changeset, and verified via d-feet that /xyz/openbmc_project/time/host and /xyz/openbmc_project/time/bmc were present, and verified reading of the "Elapsed" parameter returned the expected time result.
Change-Id: If4329d533641595cf0b50c4e50e2dda69b299f52 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
show more ...
|
75710b6a | 08-Apr-2018 |
Gunnar Mills <gmills@us.ibm.com> |
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I04979
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I049799e380299bd4290e8f31f2f2c0186c460351 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
a111b9f3 | 25-Jan-2018 |
Andrew Geissler <geissonator@yahoo.com> |
Enhance documentation with more examples
I found myself looking around for the appropriate curl and busctl commands to configure the time on OpenBMC. I figured them out so figured I'd share. This RE
Enhance documentation with more examples
I found myself looking around for the appropriate curl and busctl commands to configure the time on OpenBMC. I figured them out so figured I'd share. This README was very useful for getting the basics down.
Change-Id: I48105d09f2c7afe065ed76c3e27f73e42d0e7807 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
fa024880 | 08-Nov-2017 |
Lei YU <mine260309@gmail.com> |
Fix incorrect host time after setting BMC time in NTP/Split
The time tests find an issue that after NTP/BMC is changed to NTP/Split, setting BMC time will cause host time change.
The root cause is
Fix incorrect host time after setting BMC time in NTP/Split
The time tests find an issue that after NTP/BMC is changed to NTP/Split, setting BMC time will cause host time change.
The root cause is that it fails to set BMC time (which is expected) but still invokes notifyBmcTimeChange(), which cause host to re-calculate the offset.
The fix is to not invoke notifyBmcTimeChange() on failure to set BMC time.
Change-Id: Id13b5fa8ba7def764eab8afad23661f9b0be37ce Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
47263808 | 08-Nov-2017 |
Lei YU <mine260309@gmail.com> |
Fix incorrect host time issue switching to SPLIT
The time tests find an issue that when owner is set to Split, and then set the BMC time, the host time becomes incorrect.
The root cause is that the
Fix incorrect host time issue switching to SPLIT
The time tests find an issue that when owner is set to Split, and then set the BMC time, the host time becomes incorrect.
The root cause is that the diff between host time and steady clock is not updated when the owner is changed to Split, and thus when BMC time is changed, the host time is calculated incorrectly.
The fix is to re-calculate the diff between host time and steady clock in this case.
Resolves openbmc/openbmc#901
Change-Id: Ida22f27c6adba6b1cf8a41274eb5f26b6f1bdab7 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
7f25c53f | 25-Oct-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Spelling fixes
Change-Id: Ia840360c00cc8d7baaafd797ae2411bc5cc03ed3 Signed-off-by: Gunnar Mills <gmills@us.ibm.com> |
383b7120 | 19-Oct-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Grammar fixes for README.md
Change-Id: Iaa1c4bc0680c5b0a0cf512e0c61f6b8241070551 Signed-off-by: Gunnar Mills <gmills@us.ibm.com> |
7d05550d | 18-Oct-2017 |
Lei YU <mine260309@gmail.com> |
Fix table format in README.md
Github flavored markdown requires a blank line between text and table.
Change-Id: I55d6b964b9fb699e7b7a57cbd3b8f7b54a617947 Signed-off-by: Lei YU <mine260309@gmail.com> |
debe1d8f | 13-Oct-2017 |
Lei YU <mine260309@gmail.com> |
Use host state object to check if host is on
The code was using pgood to determine if host is on or off. Now we have host state object, which is a more appropriate way to check host on/off. So chang
Use host state object to check if host is on
The code was using pgood to determine if host is on or off. Now we have host state object, which is a more appropriate way to check host on/off. So change pgood related code to use host state object.
Change-Id: I553c1a40922ca2e8bc6904688c55e85971bd4720 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
88ad42bd | 03-Aug-2017 |
Lei YU <mine260309@gmail.com> |
Remove use_dhcp_ntp related code
Dhcp ntp related functions are now implemented by new network daemon (phosphor-network-manager), so time manager does not need to handle the setting anymore. Remove
Remove use_dhcp_ntp related code
Dhcp ntp related functions are now implemented by new network daemon (phosphor-network-manager), so time manager does not need to handle the setting anymore. Remove all the code related to use_dhcp_ntp.
Change-Id: Iea7f60dbe9558193585d3cd553dec15bbfe2aaa4 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
1c2ce82c | 01-Aug-2017 |
Lei YU <mine260309@gmail.com> |
Let timedate1 to decide on setting time in NTP mode
In NTP mode, let timedate1 to set BMC time, for now, it results in error.
Change-Id: I2d78cdcfe6868642f43198dd932b20b13fd8523d Signed-off-by: Lei
Let timedate1 to decide on setting time in NTP mode
In NTP mode, let timedate1 to set BMC time, for now, it results in error.
Change-Id: I2d78cdcfe6868642f43198dd932b20b13fd8523d Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
710d49be | 01-Aug-2017 |
Lei YU <mine260309@gmail.com> |
Use new settings API
The new time manager code was using the old settings daemon. Now it uses the new settings API.
Change-Id: Id551d97c28a6cfbb81c87118b26292b1b5574e93 Signed-off-by: Lei YU <mine2
Use new settings API
The new time manager code was using the old settings daemon. Now it uses the new settings API.
Change-Id: Id551d97c28a6cfbb81c87118b26292b1b5574e93 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|