5eddf440 | 10-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Use config.h constants
The mapper related D-Bus names are already defined in config.h, so start using them in mapperx.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9e75b9fad9c0c8144
Use config.h constants
The mapper related D-Bus names are already defined in config.h, so start using them in mapperx.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9e75b9fad9c0c8144fe9c217aaab1cec5b8dbd57
show more ...
|
9c3d2859 | 08-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Handle losing association endpoints
If the endpoint path of an association (not the path that has the org.openbmc.Associations interface) goes off of D-Bus, then remove the 2 association objects and
Handle losing association endpoints
If the endpoint path of an association (not the path that has the org.openbmc.Associations interface) goes off of D-Bus, then remove the 2 association objects and move this association to the list of pending ones. That way if it ever comes back, the association objects will be re-added.
This commit adds a moveAssociationToPending function in the code paths where the mapper sees D-Bus paths going away. That function will find all associations that involve that path, and then remove the actual association paths and add them to the list of pending ones.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I14d5ddf8f65be866c2cedd5f467d65adf8e3af95
show more ...
|
7f8fd1fa | 08-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Add function to find assocs based on endpoint
The helper function findAssociations can find all associations based on an endpoint path and return enough information to recreate those associations la
Add function to find assocs based on endpoint
The helper function findAssociations can find all associations based on an endpoint path and return enough information to recreate those associations later.
For example, searching for something like "endpointA"
could return: owner: "ownerA" Association{"typeA", "typeB", "endpointB"}
Which implies the association: endpointA/typeA -> endpointB/typeB
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I0fbcf5397435f10b3072dd2640b342ee47d52f9b
show more ...
|
11401e2e | 08-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Check for pending associations
When the mapper is adding a new D-Bus path to its path map, either via an introspect or in the interfacesAdded handler, check if that new path has an outstanding pendi
Check for pending associations
When the mapper is adding a new D-Bus path to its path map, either via an introspect or in the interfacesAdded handler, check if that new path has an outstanding pending association.
If it does, then create the 2 real association paths and remove that entry from the pending associations maps.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2da8109b5cba8596eb0c14a6af0d377472ca4145
show more ...
|
cb9bcdb1 | 08-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Remove an endpoint from the pending assocs
If there is a pending association, but the object that owns that association goes off the bus, then there is no need to wait for the endpoint to show up an
Remove an endpoint from the pending assocs
If there is a pending association, but the object that owns that association goes off the bus, then there is no need to wait for the endpoint to show up anymore so remove it from the pending associations list.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I96af6ffd62f857015522c041dfbdbcd2132d8374
show more ...
|
9f1adbc3 | 08-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Add testcases for addPendingAssociation
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I8725eac5da302a0b893eed7fd0a104b7ff69615d |
e0b0e3a2 | 08-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Check for missing endpoints when adding assocs
An association links 2 D-Bus object paths together, one which is the path that has the original associations property, and another endpoint path. It's
Check for missing endpoints when adding assocs
An association links 2 D-Bus object paths together, one which is the path that has the original associations property, and another endpoint path. It's possible that that endpoint path doesn't exist on D-Bus when that associations property is created.
This commit, along with upcoming ones, adds support to not create the actual association object paths until that endpoint path shows up on D-Bus. In addition, if that endpoint path were to get removed from D-Bus in the future, then the association paths should be removed until that path is back again.
This particular commit introduces the PendingAssociations map to track these cases, and adds support in the associationChanged path to add associations to this map if the endpoint path isn't on D-Bus instead of just blindly creating the association objects.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I1f4bf0e02bf7a350d9e3f18c3591737289a51a39
show more ...
|
e2359fb7 | 05-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Gather association maps into a single structure
The AssociationOwners and AssociationIntefaces maps are passed around separately in the mapper, but usually they are always used together.
Gather the
Gather association maps into a single structure
The AssociationOwners and AssociationIntefaces maps are passed around separately in the mapper, but usually they are always used together.
Gather them into a structure to make it easier to write code to use them, especially because soon there will be another entry in it.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ibd5b622c7c1240ff8e23846368cbfd56e5bba24d
show more ...
|
35396c10 | 05-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Move common types into a common header
Upcoming commits will have code that references some of these types in more files so it makes sense to have them in a common place.
Signed-off-by: Matt Spinle
Move common types into a common header
Upcoming commits will have code that references some of these types in more files so it makes sense to have them in a common place.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I92adbefdd4bcfdb5d8d7e30b7fdf0fa03c739d2a
show more ...
|
8f876a5a | 15-Apr-2019 |
Matt Spinler <spinler@us.ibm.com> |
Support the new association defs interface
An xyz.openbmc_project version of the org.openbmc_project.Associations interface was just created: xyz.openbmc_project.Association.Definitions
Support the new association defs interface
An xyz.openbmc_project version of the org.openbmc_project.Associations interface was just created: xyz.openbmc_project.Association.Definitions property: Associations
Support this interface as well as the original org.openbmc one.
Change-Id: Idc5a0e5afab51ec96f18a2759446707146b077d1 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
7f838376 | 27-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Test interfaces added function
Tested: - processing.cpp at 94% coverage - Verified QEMU booted to standby and mapper command line worked - Verified hardware CI (witherspoon) passed with t
unit-test: Test interfaces added function
Tested: - processing.cpp at 94% coverage - Verified QEMU booted to standby and mapper command line worked - Verified hardware CI (witherspoon) passed with this patch series
Change-Id: I73e5feb3495ed0aa974acd521fefd8d0193fc1b3 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
70461896 | 27-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Move processing of interfaces added
Make it easier to unit test and continue reduction of main.cpp
Change-Id: Id360255e1546eda026e5e6ef9f15d29dcc82caaa Signed-off-by: Andrew Geissler <ge
unit-test: Move processing of interfaces added
Make it easier to unit test and continue reduction of main.cpp
Change-Id: Id360255e1546eda026e5e6ef9f15d29dcc82caaa Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
0a560a5c | 22-Mar-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Fix bug when endpoint empty
Could debate the proper handling of this situations but this commit at least makes it consistent for the forward and reverse path
Change-Id: If0a8a16473c150f4
unit-test: Fix bug when endpoint empty
Could debate the proper handling of this situations but this commit at least makes it consistent for the forward and reverse path
Change-Id: If0a8a16473c150f4d4361f9ca9aad9f06c391157 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
491f9ac3 | 22-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Test associationChanged()
Testing: 100% coverage of associations.cpp
Change-Id: I978eb37acfbee0a5b6d497cab473691318184aaf Signed-off-by: Andrew Geissler <geissonator@yahoo.com> |
7264d90d | 27-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Debug functions to dump data structures
Visualizing the key data structures in objmgr can be very useful for debug and for writing test cases
Example output when new function called: ##
unit-test: Debug functions to dump data structures
Visualizing the key data structures in objmgr can be very useful for debug and for writing test cases
Example output when new function called: ##### interface_map_type ##### ------------------------------------ OBJ PATH: /xyz/openbmc_project/test DBUS SERVICE: xyz.openbmc_project.Test INTERFACE: org.freedesktop.DBus.Introspectable INTERFACE: org.freedesktop.DBus.Peer INTERFACE: org.freedesktop.DBus.Properties ------------------------------------ ##### AssociationOwnersType ##### ------------------------------------ OBJ PATH: /xyz/openbmc_project/test/xyz DBUS SERVICE: xyz.openbmc_project.Test ASSOC PATH: /xyz/openbmc_project/inventory/system/chassis/error ENDPOINT: /xyz/openbmc_project/test/xyz ASSOC PATH: /xyz/openbmc_project/test/xyz/inventory ENDPOINT: /xyz/openbmc_project/inventory/system/chassis ----------------------------------- ##### AssociationInterfaces ##### ------------------------------------ OBJ PATH: /xyz/openbmc_project/inventory/system/chassis/error ENDPOINTS: /xyz/openbmc_project/test/xyz ------------------------------------
Change-Id: I947ccdb071d887683c3998c6020677833579100c Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
ea80c33d | 22-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Add some doc on Association
Next set of unit tests use this data structure so added some doc and an example
Change-Id: Iabc89fc66ff68ccbf872e8cb48dc75b75c78908f Signed-off-by: Andrew Gei
unit-test: Add some doc on Association
Next set of unit tests use this data structure so added some doc and an example
Change-Id: Iabc89fc66ff68ccbf872e8cb48dc75b75c78908f Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
4511b33f | 21-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Move associationChanged()
Make it easier to unit test and continue reduction of main.cpp
Change-Id: Ic549e096343e7a2fb11985f1c48879ed4486e40b Signed-off-by: Andrew Geissler <geissonator@
unit-test: Move associationChanged()
Make it easier to unit test and continue reduction of main.cpp
Change-Id: Ic549e096343e7a2fb11985f1c48879ed4486e40b Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
e4ab6c90 | 21-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Test checkAssociationEndpointRemoves()
Testing: 100% coverage of associations.cpp
Change-Id: I311af1c868416e8e898a25e593d399cd8297ccf9 Signed-off-by: Andrew Geissler <geissonator@yahoo.c
unit-test: Test checkAssociationEndpointRemoves()
Testing: 100% coverage of associations.cpp
Change-Id: I311af1c868416e8e898a25e593d399cd8297ccf9 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
7f1c44dc | 21-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Move checkAssociationEndpointRemoves
Make it easier to unit test and continue reduction of main.cpp
Change-Id: Id4f4c4fc1e3928f1b600555c6dbe05f651fffce5 Signed-off-by: Andrew Geissler <g
unit-test: Move checkAssociationEndpointRemoves
Make it easier to unit test and continue reduction of main.cpp
Change-Id: Id4f4c4fc1e3928f1b600555c6dbe05f651fffce5 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
5629ae8d | 21-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Utilize common code for endpoint remove
Testing: Previous test cases get us 100% coverage here
Change-Id: I3b96872bf25ce7ddcc96422f1d453f153f9dd39c Signed-off-by: Andrew Geissler <geisso
unit-test: Utilize common code for endpoint remove
Testing: Previous test cases get us 100% coverage here
Change-Id: I3b96872bf25ce7ddcc96422f1d453f153f9dd39c Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
ff5ce924 | 21-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Move removeAssociationEndpoints()
Make it easier to unit test and continue reduction of main.cpp
Change-Id: I2c0eac5c301687acab14add627586170020e4fe4 Signed-off-by: Andrew Geissler <geis
unit-test: Move removeAssociationEndpoints()
Make it easier to unit test and continue reduction of main.cpp
Change-Id: I2c0eac5c301687acab14add627586170020e4fe4 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
2067926a | 11-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Test deleting entry on name change
Breaking off into a separate function enables easier unit testing of the specific function
Testing: 97% coverage of processing.cpp
Change-Id: I08f2296
unit-test: Test deleting entry on name change
Breaking off into a separate function enables easier unit testing of the specific function
Testing: 97% coverage of processing.cpp
Change-Id: I08f229657a8f44230b711fabbae20fb403792637 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
5b2e7276 | 11-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Request distinct name per test app
gtest will run test suites in parallel, need to ensure each test suite (application) requests a distinct well-known name on Dbus.
Change-Id: Ib59211ada
unit-test: Request distinct name per test app
gtest will run test suites in parallel, need to ensure each test suite (application) requests a distinct well-known name on Dbus.
Change-Id: Ib59211ada5ef6404e70747b7377912384cc8c60e Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
bb7b592e | 08-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Move association create funcs to util
These will be useful in other test suites so move into util directory
Change-Id: Ibea5c417e38210e6e1388cf4492af10a64db9077 Signed-off-by: Andrew Gei
unit-test: Move association create funcs to util
These will be useful in other test suites so move into util directory
Change-Id: Ibea5c417e38210e6e1388cf4492af10a64db9077 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
b04f0335 | 08-Feb-2019 |
Andrew Geissler <geissonator@yahoo.com> |
unit-test: Move asio server to its own class
Other test suites will need this object so move to a utility directory and inherit from.
Change-Id: Ia34c8149fc0df02c510717a6efd21f51086e97e6 Signed-off
unit-test: Move asio server to its own class
Other test suites will need this object so move to a utility directory and inherit from.
Change-Id: Ia34c8149fc0df02c510717a6efd21f51086e97e6 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|