summaryrefslogtreecommitdiffstats
path: root/test/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* Move to new association interfaceJohn Wang2019-09-261-2/+0
| | | | | | | | | | | | | | | | | | A new association interface is defined in phosphor-dbus-interfaces It would be nice to move the local version of the interface to the new one. The behavior of how association work is described here: https://github.com/openbmc/docs/blob/master/object-mapper.md#associations Partially resolves openbmc/openbmc#3584 Tested: Create a new log using the Create interface, see that org.openbmc.Associations has been replaced by the xyz one and 2 association objects are created by the mapper. Signed-off-by: John Wang <wangzqbj@inspur.com> Change-Id: I9bcddd4765b12224967383bab2dbaa6d273e2790
* PEL: Add class to wrap AdditionalDataMatt Spinler2019-07-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | The AdditionalData property on the xyz.openbmc_project.Logging.Entry interface is a vector of strings of the form: "KEY=VALUE". The PEL processing code will be interested in those keys and values, and this class adds a way to get at those values based on a key without having to do string parsing each time. It returns an std::optional<std::string> value, and if the key isn't found, then the std::optional value will be empty. For Example: AdditionalData ad{additionalDataPropertyValue}; // Get the value for the FOO key std::optional<std::string> val = ad.getValue("FOO"); if (val) std::cout << (*val).size(); Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6ba458840278784b1cc6a0ed88a7fece8794df7d
* Add libstdc++fs to test_ldflags Makefile varMatt Spinler2019-07-191-14/+8
| | | | | | | | | Every testcase that uses test_ldflags also needs that library, so just pull it in from that single place instead of in each testcase. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I1c0ccd51ae8f79a8cf2a90ddb74316537fa957e2
* OpenPower PEL Extension support frameworkMatt Spinler2019-07-161-2/+18
| | | | | | | | | | | | | | | | | | | | | | The goal of extensions is to extend phosphor-logging's `xyz.openbmc_project.Logging.Entry` log support to allow other log formats to be created without incurring extra D-Bus call overhead. The README.md change in this commit provides additional documentation on how extensions work. The summary is that they allow code that resides in this repository to provide functions that can be called at certain points (startup, log creation/deletion) such that the code can then create their own logs based on the contents of an OpenBMC log. A specific extension's code is compiled in using a --enable configure option, so platforms that did not use those log formats would incur no performance/size penalties. This commit provides the support for extensions, plus a basic OpenPower PEL (Platform Event Log) extension as the first extension. PELs are event logs used only on some OpenPower systems. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ifbb31325261c157678c29bbebc7f6d32d282582f
* test: add test to force building of sdjournal mockPatrick Venture2018-12-041-1/+8
| | | | | | | | Add test to force building of sdjournal mock. This will ensure it won't break down chain users later. Change-Id: Ida9745595af251df800ec8e98abaa39728c9ba86 Signed-off-by: Patrick Venture <venture@google.com>
* test: use only one main libraryPatrick Venture2018-12-031-1/+1
| | | | | | | Use only gtest_main or gmock_main. Change-Id: Ib6b8347560ff20d5d062baec807b1590050627c3 Signed-off-by: Patrick Venture <venture@google.com>
* add sdjournal interface to inject testsPatrick Venture2018-11-111-2/+5
| | | | | | | | The goal of the tests is not to test phosphor-logging, but rather allow code to call through phosphor-logging/log<> during a test. Change-Id: Id8c84ded473decc7f9f0be268116083093f86e54 Signed-off-by: Patrick Venture <venture@google.com>
* log_manager: Don't fail on missing synced fileAdriana Kobylak2018-09-051-0/+3
| | | | | | | | | | | | | | | | | | | | | The journald synced file is created during a journal sync, so if it's missing, the log manager should still perform the sync operation so that the synced file gets created. This is the behavior of journalctl which this function is copying, just this logic wasn't transferred in the original commit. Reference: https://github.com/systemd/systemd/blob/60118b21c6b4b29376615921c5edc1b05cde306f/src/journal/journalctl.c#L1999 Disabled the unit test cases that call commit since they now fail. Opened issue openbmc/phosphor-logging#11 for debug. Closes openbmc/phosphor-logging#10 Tested: With the synced file missing, verified that a commit operation created the file and there were no error messages about failing to open the synced file. Change-Id: Ia720741b99552d51d13cdc6b4e08dbbab58bca77 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* phosphor-rsyslog-conf: add unit testsDeepak Kodihalli2018-08-311-1/+10
| | | | | | | Add tests pertaining to remote logging config file. Change-Id: Idaeac09b5abe91af30dc0eb32664e8af556ecda2 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* phosphor-rsyslog-conf: add unit testsDeepak Kodihalli2018-08-311-1/+20
| | | | | | | Add tests related to setting remote server IP address and port. Change-Id: I35ac539a8316d34245ee6b1abcb9f48c1ebe5095 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add unit tests for the phosphor-logging serverNagaraju Goruganti2018-08-081-5/+9
| | | | | | | -Add unit tests for error wrapping Change-Id: Ib15620d84de8ab5abdc85b8f88dd7c05f83fd6f3 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* serialization: add testsDeepak Kodihalli2017-06-261-9/+54
| | | | | | | Resolves openbmc/openbmc#1684. Change-Id: Ia554147001e51b05fe8692ae0b39e3efaf481130 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add in test case which validates elog client interfaceAndrew Geissler2016-10-311-0/+12
Change-Id: I5c5f7a550a8f272251893ff616408c41d32281f9 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
OpenPOWER on IntegriCloud