History log of /openbmc/phosphor-time-manager/test/TestBmcEpoch.cpp (Results 1 – 20 of 20)
Revision Date Author Comments
# 06df6548 28-Apr-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Enable cppcoreguidelines-special-member-functions checks

Part of enforcing cpp core guidelines involves explicitly including all
constructors required on a non-trivial class. We were missing quite

Enable cppcoreguidelines-special-member-functions checks

Part of enforcing cpp core guidelines involves explicitly including all
constructors required on a non-trivial class. We were missing quite a
few. In all cases, the copy/move/and operator= methods are simply
deleted.

Change-Id: Ib71266e77808d15ae896891eea3e31c5b0394eb1
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# 8af2a1e3 27-Apr-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Enable cppcoreguidelines check on the repo

This commit adds cppcoreguidelines clang-tidy
checks and make necessary changes.

Change-Id: I402b82f96b7ff82e3ba6d84c9cc50435c1ead6d4
Signed-off-by: Pavit

Enable cppcoreguidelines check on the repo

This commit adds cppcoreguidelines clang-tidy
checks and make necessary changes.

Change-Id: I402b82f96b7ff82e3ba6d84c9cc50435c1ead6d4
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# f93c405f 26-Apr-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Enable modernize tidy checks on the repo

This commit enables the modernize clang-tidy
checks.

Change-Id: I586303ebc257c6e6e05489247bc75d227b328607
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.

Enable modernize tidy checks on the repo

This commit enables the modernize clang-tidy
checks.

Change-Id: I586303ebc257c6e6e05489247bc75d227b328607
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# 864e173e 11-Apr-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Add clang-tidy file

This commit implements a clang-tidy file, and makes
some changes to get it to pass.
Most changes are naming or mechanical in nature.

Tested:
CI passed in docker.

Change-Id: I1f

Add clang-tidy file

This commit implements a clang-tidy file, and makes
some changes to get it to pass.
Most changes are naming or mechanical in nature.

Tested:
CI passed in docker.

Change-Id: I1f9acf546542c839b8f9facb5b8beff37c0d5909
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# cb421097 16-Aug-2022 George Liu <liuxiwei@inspur.com>

Move timeMode property to manager

The current logic is to maintain the same attribute in manager and
epoch_base, the purpose of this commit is to merge this attribute
into manager for maintenance.

Move timeMode property to manager

The current logic is to maintain the same attribute in manager and
epoch_base, the purpose of this commit is to merge this attribute
into manager for maintenance.

Also, Update the test/TestBmcEpoch.cpp file.

Tested: Built phosphor-time-manager successfully and UT passed.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I05fea271d672bf12ecb722005023dfa6a2a980d1

show more ...


# 81194a82 17-Aug-2022 George Liu <liuxiwei@inspur.com>

Remove redundant code

After checking that these codes are no longer used, delete these.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If832abbf6ffefba0fb83cf2a29a3fc816cc46835


# 38679266 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9cedddf4dc9b224ecbc2f68e6b00c0ab1885a826

show more ...


# c6d33972 21-Jun-2020 George Liu <liuxiwei@inspur.com>

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

https://github.com/llvm/llvm-project/commit/e5032567903de19962333c4bf7d2edceaf4f9824#diff-b49a097415dff2837d9626d422c58ba8R82
https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I6bd62f057c6881b4e931c1968d71ce5478832d73

show more ...


# 0a70452a 13-Apr-2020 George Liu <liuxiwei@inspur.com>

Remove Deferred Updates

Remove deferred consumption of settings Manual/NTP and allow instant
consumption.

Tested:
Manually set the timeMode to NTP on the WEB and successfull

Remove Deferred Updates

Remove deferred consumption of settings Manual/NTP and allow instant
consumption.

Tested:
Manually set the timeMode to NTP on the WEB and successfully.
busctl get-property xyz.openbmc_project.Settings
/xyz/openbmc_project/time/sync_method
xyz.openbmc_project.Time.Synchronization TimeSyncMethod
s "xyz.openbmc_project.Time.Synchronization.Method.NTP"

Manually set the date time successfully by D-Bus when timeMode is MANUAL
busctl set-property xyz.openbmc_project.Time.Manager
/xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed
t 1514765953791262

Manually set the date time failed by D-Bus when timeMode is NTP.
busctl set-property xyz.openbmc_project.Time.Manager
/xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed
t 1514765953791262
Failed to set property Elapsed on interface
xyz.openbmc_project.TIme.EpochTime: The operation failed

~# journalctl -b | grep timemanager
Jan 01 00:15:26 fp5280g2 phosphor-timemanager[309]: Error in setting
system time
Jan 01 00:15:26 fp5280g2 phosphor-timemanager[309]: The operation
failed

Refer: https://lists.ozlabs.org/pipermail/openbmc/2020-April/021409.html

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I7be25a9d0f56615bad6800a0b07df7f84fc0acc3

show more ...


# 3c2f4496 11-Apr-2020 George Liu <liuxiwei@inspur.com>

Remove TimeOwner Feature

The TimeOwner feature is confusing from feedback from the community and
hence removing the feature.
Remove the TimeOwner feature in the phosphor-time-manager

Remove TimeOwner Feature

The TimeOwner feature is confusing from feedback from the community and
hence removing the feature.
Remove the TimeOwner feature in the phosphor-time-manager repo and
needed settings objects.

Tested: Manually set the date time on the web and successfully update
the date time of BMC (eg: 2020/01/01 08:07:50).
busctrl get-property xyz.openbmc_project.Time.Manager
/xyz/openbmc_project/time/bmc
xyz.openbmc_project.Time.EpochTime Elapsed
t 1577837156385836

Refer: https://lists.ozlabs.org/pipermail/openbmc/2020-April/021409.html

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Id47eb0a03e0e94eeff29d2b77dccefb89cded7b8

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/mas

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 ...


# 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 fo

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 ...


# 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 suppo

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 ...


# 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: I2d78cdcfe6868642f43198dd932b20b13fd8523

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 ...


# ad14354f 25-Jul-2017 Lei YU <mine260309@gmail.com>

Use time mode owner enums in dbus interface

Dbus interface defines time mode owners in xyz::openbmc_project::Time.
Use the enums from the interface instead of repo defined enums and use

Use time mode owner enums in dbus interface

Dbus interface defines time mode owners in xyz::openbmc_project::Time.
Use the enums from the interface instead of repo defined enums and use
the generated code to do convertions between strings and enums.

Update unit tests accordingly.

Change-Id: Ic304aa3b4137375d208bb1702e0f64df512fc5a0
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 57eab124 15-Jun-2017 Lei YU <mine260309@gmail.com>

Change default time mode/owner to MANUAL/BOTH

OPAL gets error on setting host time because the default time mode/owner
is NTP/BMC, which disallows host to set its time.
As discussed

Change default time mode/owner to MANUAL/BOTH

OPAL gets error on setting host time because the default time mode/owner
is NTP/BMC, which disallows host to set its time.
As discussed and requested by OPAL, change the default time mode/owner
to MANUAL/BOTH.

Change-Id: Ide55f970b66f3025f67ad2ef093a74a3c8f8b8ea
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 7b218796 08-Feb-2017 Lei YU <mine260309@gmail.com>

Implement HostEpoch set time logic

1. When setting host epoch, follow below logic:

Mode | Owner | Set Host Time
----- | ----- | -------------
NTP

Implement HostEpoch set time logic

1. When setting host epoch, follow below logic:

Mode | Owner | Set Host Time
----- | ----- | -------------
NTP | BMC | Not allowed
NTP | HOST | Not allowed
NTP | SPLIT | OK, and just save offset
NTP | BOTH | Not allowed
MANUAL| BMC | Not allowed
MANUAL| HOST | OK, and set time to BMC
MANUAL| SPLIT | OK, and just save offset
MANUAL| BOTH | OK, and set time to BMC

2. If owner is SPLIT and BMC time is changed, update the offset accordinly;
3. Use timerfd to get notified on BMC time change, and update host time
diff accordingly;
4. Add unit test cases.

Change-Id: I2d60a821f7da9b689c579ae7ab672cc37967322c
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 415b964f 08-Feb-2017 Lei YU <mine260309@gmail.com>

Add time Manager to handle property changes callback

1. Implement time::Manager who registers property change signal for time
mode and owner;
2. Add PropertyChangeListner interface t

Add time Manager to handle property changes callback

1. Implement time::Manager who registers property change signal for time
mode and owner;
2. Add PropertyChangeListner interface to handle the callback;
3. Make EpochBase to implement the interface.

Change-Id: I185580ae37353e1ed82a47e4905fb22e269ac09d
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# e7abcdc7 16-Jan-2017 Lei YU <mine260309@gmail.com>

Implement BmcEpoch set/get elapsed()

Getting elapsed returns BMC's time;
Setting elapsed will check the current time mode/owner, and will return
error when mode is NTP or owner is HO

Implement BmcEpoch set/get elapsed()

Getting elapsed returns BMC's time;
Setting elapsed will check the current time mode/owner, and will return
error when mode is NTP or owner is HOST.

Add unit test cases.

Change-Id: Ibf4e90957f3b26b68c4a1b6dc66dc364c66bef10
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 96232827 20-Jan-2017 Lei YU <mine260309@gmail.com>

Implement part of BmcEpoch

Add BmcEpoch which inherits EpochBase and will handle times for BMC,
it is partly implemented.

Add unit test cases to test basic functions.

C

Implement part of BmcEpoch

Add BmcEpoch which inherits EpochBase and will handle times for BMC,
it is partly implemented.

Add unit test cases to test basic functions.

Change-Id: Ia5e4d0f884156d238f3f84df490a2efbce43e89a
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...