6ddbf69e | 05-Sep-2023 |
Willy Tu <wltu@google.com> |
Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE
Fix the code to support new sdbusplus error without SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.
Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1 Signed-off-b
Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE
Fix the code to support new sdbusplus error without SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.
Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
b508a81c | 01-Sep-2023 |
Patrick Williams <patrick@stwcx.xyz> |
elog-gen: handle new sdbusplus error names
The sdbusplus repository changed the format of the error names that it generates, which causes the forward-declarations created by elog-gen to cause a comp
elog-gen: handle new sdbusplus error names
The sdbusplus repository changed the format of the error names that it generates, which causes the forward-declarations created by elog-gen to cause a compiler error due to a name-conflict between a `struct` and an `using` alias. Trying to handle just the sdbusplus rename was challenging, so instead I also changed the phosphor-logging structs and created a similar old-style alias.
As a side-effect of this work, I was able to simplify quite a bit of the mako template as well.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4177654da83387ace892acc481e095901e9549e4
show more ...
|
26919f07 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I6e8d56540a30898369d7f232d900fd74de2e7bd1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
d27675d7 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
black: re-format
black and isort are enabled in the openbmc-build-scripts on Python files to have a consistent formatting. Re-run the formatter on the whole repository.
Change-Id: I8b1542d2681ef39
black: re-format
black and isort are enabled in the openbmc-build-scripts on Python files to have a consistent formatting. Re-run the formatter on the whole repository.
Change-Id: I8b1542d2681ef3985455920fa939a6ea2482be22 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
a7bc9ab3 | 18-Oct-2022 |
Matt Spinler <spinler@us.ibm.com> |
Don't install elog-gen.py and mako templates
These were actually getting installed into the BMC flash image, which isn't desirable. Bitbake runs these straight from the source tree so removing this
Don't install elog-gen.py and mako templates
These were actually getting installed into the BMC flash image, which isn't desirable. Bitbake runs these straight from the source tree so removing this doesn't affect builds.
This does mean they wouldn't be installed into usr/share in the SDK, but it's not like that was in $PATH anyway.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I65fff38bcdf82e8b812177d65a6918fc9abbd5fd
show more ...
|
e6555f5b | 04-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
format: reformat with black
CI seems to be failing due to a new version of pycodestyle with errors such as:
``` ./tools/elog-gen.py:26:11: E275 missing whitespace after keyword if(i_parents
format: reformat with black
CI seems to be failing due to a new version of pycodestyle with errors such as:
``` ./tools/elog-gen.py:26:11: E275 missing whitespace after keyword if(i_parents[error] is not None): ```
Attempt to reformat the whole codebase with `black`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2fb63670cf4828d4dee19a9c7f247e9ffecdb398
show more ...
|
50654a83 | 16-Nov-2021 |
Matt Spinler <spinler@us.ibm.com> |
elog-gen.py: Remove missing metadata print
It's fairly common now for errors defined in the errors.yaml files to not have a corresponding entry in their metadata.yaml file, so this commit removes th
elog-gen.py: Remove missing metadata print
It's fairly common now for errors defined in the errors.yaml files to not have a corresponding entry in their metadata.yaml file, so this commit removes the print statement complaining about that case because it can mislead people into thinking there is a real problem.
The intent of the original design was to at least define the error level (i.e. severity) in the metadata file, though since the script already defaults that to 'ERR' it isn't really necessary.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iec7ece2382becc101fff6a03f38a3607fa2e43af
show more ...
|
a9ee22bb | 09-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
elog-gen: sort exceptions for file stability
In the elog-gen template there is an iteration over a Python `set`. Sets are not guaranteed to have any particular order from execution to execution, whi
elog-gen: sort exceptions for file stability
In the elog-gen template there is an iteration over a Python `set`. Sets are not guaranteed to have any particular order from execution to execution, which means that a template generated from the exact same data can have different values. Add a 'sorted' into the set iteration so that the file output is stable.
Stability is useful for two reasons: 1. Some repositories check in a version of the file for UT purposes, which causes drastic changes in the version in that repo. 2. Tools like ccache can only speed up builds if the header files are unchanged.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie3dc5489be5314fc7ecda49dc4bf795cfc81f064
show more ...
|
efcf7663 | 09-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
elog-gen: minor changes to reduce clang-format diffs
Perform minor changes to the elog-gen template so that the resulting file more closely conforms to our project-wide clang-format settings. Curren
elog-gen: minor changes to reduce clang-format diffs
Perform minor changes to the elog-gen template so that the resulting file more closely conforms to our project-wide clang-format settings. Currently phosphor-host-ipmid checks in a copy of the output header and this reduces the differences between the version from the build and the version checked in (which must pass clang-format).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ica61261a25696caf7db53f2603a2cd1407281432
show more ...
|
66580a90 | 03-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: define get_errno for example types
The sdbusplus base exception class now defines a get_errno and it will become a pure-virtual soon. Prep for that by defining function for any of the ex
exception: define get_errno for example types
The sdbusplus base exception class now defines a get_errno and it will become a pure-virtual soon. Prep for that by defining function for any of the example exception types (sdbus++ generated types are already provided).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3b2a0e9d356022e1e71ff523eee02ab102d383a2
show more ...
|
e0538848 | 11-Jun-2021 |
William A. Kennington III <wak@google.com> |
build: Refactor to separate out library
This makes it more clear what code is intended for use by the phosphor-logging shared library. This is especially nice since it isolates the `phosphor_logging
build: Refactor to separate out library
This makes it more clear what code is intended for use by the phosphor-logging shared library. This is especially nice since it isolates the `phosphor_logging_dep` to only provide the exported headers instead of everything in the project.
Additionally, this adds an option to build only the library components of the project when the services aren't needed.
Change-Id: Ied0858fc70e8054df4c056d91f35a6f0b3acfcb1 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
7dc8c3be | 17-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
elog-gen: handle missing YAML without crashing
The code to build the mako template path was buried inside a for-loop, which ran against every found YAML file (redundantly). If, for some reason, the
elog-gen: handle missing YAML without crashing
The code to build the mako template path was buried inside a for-loop, which ran against every found YAML file (redundantly). If, for some reason, the script is configured where the error YAML is missing, the for-loop never runs and we end up with a Python crash:
File "../tools/elog-gen.py", line 167, in gen_elog_hpp template = Template(filename=template_path) UnboundLocalError: local variable 'template_path' referenced before assignment
Pull the template path code out of the for loop to better handle this case.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic3dd4e8d9c7a9a9ed4fa382b879ecdc4b1b04838
show more ...
|
bb6af860 | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
python: enable code formatting
Enable code formatting in CI by creating a dummy Python 'setup.cfg' and fix up the minor errors reported.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-I
python: enable code formatting
Enable code formatting in CI by creating a dummy Python 'setup.cfg' and fix up the minor errors reported.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9ddaa263f7407c42fb4f58d478bd2efb1d2fe026
show more ...
|
c5e3e5e5 | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
elog-gen: handle empty template directories
In some cases, such as when building with meson, it is not useful to separate the template directory for the template file when invoking elog-gen. Modify
elog-gen: handle empty template directories
In some cases, such as when building with meson, it is not useful to separate the template directory for the template file when invoking elog-gen. Modify the template path handling code slightly so that an empty template directory can be used with the template file having the full path.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I26cae0f4af2fd03dfd194d593f40e9dedea9d012
show more ...
|
cea3f89b | 03-Dec-2020 |
Lei YU <yulei.sh@bytedance.com> |
elog-gen: Support more types
Support boolean, int8, uint8 types.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I4e16b80788994e07050ce1e2bdb3ea8eeb7666a3 |
d9c2fea7 | 05-Mar-2020 |
Matt Spinler <spinler@us.ibm.com> |
Update elog-gen.py for python3
2to3 suggested this change as a better, though not strictly necessary, way to do things.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2147d5a6e334f25d
Update elog-gen.py for python3
2to3 suggested this change as a better, though not strictly necessary, way to do things.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2147d5a6e334f25d5a57250584eb0c77e88526a3
show more ...
|
52a4980c | 13-Aug-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Empty set for no elog lookup meta data
Create an empty set when there is no elog lookup meta data instead of defaulting to add a single empty string entry.
Tested: Built image and verified empt
Empty set for no elog lookup meta data
Create an empty set when there is no elog lookup meta data instead of defaulting to add a single empty string entry.
Tested: Built image and verified empty string no longer in errors where no meta data is defined.
Change-Id: I7bf1ff2ab18f174d4cfa78cf22eeac4918033148 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
19fe323b | 12-Aug-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Remove empty entries in elog lookup meta data
A journal entry is produced for failure to find empty string meta data for elogs due to an empty string entry within the generated elog lookup source. T
Remove empty entries in elog lookup meta data
A journal entry is produced for failure to find empty string meta data for elogs due to an empty string entry within the generated elog lookup source. This empty string is due to error yamls that do not contain any meta data entry of their own and only inherit from another error yaml.
An example of the journal entry for the empty string meta data that is removed with this fix::
CODE_LINE=76 CODE_FUNC=helper_log _SYSTEMD_SLICE=system.slice CODE_FILE=../git/phosphor-logging/log.hpp MESSAGE=Failed to find metadata TRANSACTION_ID=4016514682 META_FIELD= SYSLOG_IDENTIFIER=phosphor-log-manager _PID=181 _COMM=phosphor-log-ma _EXE=/usr/bin/phosphor-log-manager
Tested: Built image and verified empty string entry no longer generated on errors without meta data but inherit meta data from other error yaml
Change-Id: I3c8745acd86173873827cd59eb6e8d4f687b0e1b Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
b17e8768 | 04-Oct-2018 |
William A. Kennington III <wak@google.com> |
tools/elog-gen: Clean up missing error metadata message
Change-Id: I880cf6793e64db29a6eee74839f5a5bdabb1dff2 Signed-off-by: William A. Kennington III <wak@google.com> |
80aa4762 | 18-Jul-2018 |
Lei YU <mine260309@gmail.com> |
elog-gen: allow inherits from errors without meta
Previously, elog-gen only support inherits from errors that have meta, and if we inherit from an error without meta, e.g. Common.InternalFailure, we
elog-gen: allow inherits from errors without meta
Previously, elog-gen only support inherits from errors that have meta, and if we inherit from an error without meta, e.g. Common.InternalFailure, we get build error like:
KeyError: 'xyz.openbmc_project.Common.InternalFailure'
This commit makes elog-gen to allow such case, so it is possible to allow a base error without meta, and inheriting error with additional error, e.g.
# In Common: - name: NotAllowed ## No meta
# In Time: - name: NotAllowed inherits: - xyz.openbmc_project.Common.NotAllowed meta: - str: "OWNER=%s" type: string - str: "SYNC_METHOD=%s" type: string
Note: the "inherit" here does not mean the the error inherits from base errors in c++ class, it just makes error "logically" inherits base errors. And in future commits we could make it "really" inherits base errors in c++ level.
Tested: Verify phosphor-logging builds correctly with above example error interfaces, and service is able to use such errors with elog.
Change-Id: I8dccd7112881e3eb77a8f6ec62a532062348d2ef Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
14a8c8de | 06-Mar-2018 |
Andrew Jeffery <andrew@aj.id.au> |
templates: Allow use of -fsanitize=undefined
Push down the str member to avoid linker errors about the lack of storage for str when using -fsanitize=undefined.
Change-Id: I1a6b1ba9632aa6e4294573a6b
templates: Allow use of -fsanitize=undefined
Push down the str member to avoid linker errors about the lack of storage for str when using -fsanitize=undefined.
Change-Id: I1a6b1ba9632aa6e4294573a6be3252d5230992b9 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
deae3cac | 25-Oct-2017 |
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: Idea8f
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: Idea8f76487125a7c7334b415a369c73d9fac40c4 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
979632ae | 18-Jun-2017 |
Marri Devender Rao <devenrao@in.ibm.com> |
fix checkstop error logged as INFO
Fix lookup mako template to use sdbus++ error name in error level and error meta map.
Resolves openbmc/openbmc#1800
Change-Id: Id3bd7d8113ad0305f25a8fc321f6b79ab
fix checkstop error logged as INFO
Fix lookup mako template to use sdbus++ error name in error level and error meta map.
Resolves openbmc/openbmc#1800
Change-Id: Id3bd7d8113ad0305f25a8fc321f6b79ab5033bb0 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
show more ...
|
4952aa6b | 03-Jun-2017 |
Patrick Williams <patrick@stwcx.xyz> |
elog-gen: python3 fixes for print
In python3 print requires () wrapping around parameters.
Change-Id: I830ef0d0e8c9e42c1157b708153bf96599346977 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
99b33918 | 14-May-2017 |
Marri Devender Rao <devenrao@in.ibm.com> |
Remove inheriting from sdbus exception for error metadata
For logging/reporting exceptions, applications need to use exceptions generated by using sdbus++.
For metadata, use header file generated b
Remove inheriting from sdbus exception for error metadata
For logging/reporting exceptions, applications need to use exceptions generated by using sdbus++.
For metadata, use header file generated by elog-gen script.
Change-Id: Id8f61f8692bfd694d8875359d883465c1124bedf Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
show more ...
|