aboutsummaryrefslogtreecommitdiff
path: root/external/fwts
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26SPDX-ify all skiboot codeStewart Smith2-26/+2
Use Software Package Data Exchange (SPDX) to indicate license for each file that is unique to skiboot. At the same time, ensure the (C) who and years are correct. See https://spdx.org/ Signed-off-by: Stewart Smith <stewart@linux.ibm.com> [oliver: Added a few missing files] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2017-01-05generate-fwts-olog: add support for parsing prerror()Stewart Smith1-6/+10
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-14external/fwts: Add 'last-tag' to FWTS olog outputJack Miller1-5/+12
This isn't so useful at the moment, but this will make cleaning out crufty old error definitions much easier. Signed-off-by: Jack Miller <jack@codezen.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-14external/fwts: Add FWTS olog merge scriptJack Miller1-0/+115
A script to merge olog error definitions from multiple skiboot versions into a single olog JSON file. Will prompt when conflicting patterns are found to update the pattern, or add both. Signed-off-by: Jack Miller <jack@codezen.org> [stewart@linux.vnet.ibm.com: add copyright notice] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-22fwts/generate-fwts-olog: Fix whitespace on json.dumpsDeb McLemore1-0/+1
Using the indent option on json dump extra whitespace preceeds the newline in the json separator formatting. We need to remove the extra whitespace when the indent option is used to allow clean patch application. Signed-off-by: Deb McLemore <debmc@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-27external/fwts: fix regex generation for %p formatJeremy Kerr1-1/+1
Currently, we're emitting a non-grouping bracket expression for %p formats, which isn't supported by regex(7). This change uses the grouping format instead. The creation of a group has no effect in the fwts olog code, so this should have no consequence on matches. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-21fwts/generate-fwts-olog: Fix regex matches to allow more printf formatsJeremy Kerr1-2/+2
We currently aren't handling the 'll' length modifier, or widths starting with zero (eg %016x). The former is becase we have the shorter 'l' match in the group first (so borking on the second l). The latter is because we don't allow a leading zero on width matches. This change fixes those issues. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-28external/fwts: Add parser to extract olog pattern definitionsJeremy Kerr1-0/+229
The fwts project has a facility to scan system logs for interesting error messages, by matching on patterns in a JSON file. Recently, Deb has added support for the OPAL msglog to fwts, called 'olog': http://kernel.ubuntu.com/git/hwe/fwts.git/commit/?id=652b79b However, we don't yet have any patterns for OPAL. Rather than generate a separate set of patterns that may go stale, Anton suggested that we may want to pull these directly from the OPAL source. This change implements a parser to generate olog pattern definitions from annotations in OPAL itself. For example, a check in the flash code might look like: if (!ffs) { /** * @fwts-label SystemFlashNoPartitionTable * @fwts-advice OPAL Could not read a partition table on * system flash. Since we've still booted the machine (which * requires flash), check that we're registering the proper * system flash device. */ prlog(PR_WARNING, "FLASH: attempted to register system flash " "%s, wwhich has no partition info\n", name); return; } By running generate-fwts-olog on the codebase, we get: { "olog_error_warning_patterns": [ { "advice": "OPAL Could not read a partition table on system flash. Since we've still booted the machine (which requires flash), check that we're registering the proper system flash device.", "compare_mode": "regex", "label": "SystemFlashNoPartitionTable", "level": "LOG_LEVEL_HIGH", "pattern": "FLASH: attempted to register system flash .*, wwhich has no partition info" } ] } - which is suitable for input to the fwts pattern definitions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> [stewart@linux.vnet.ibm.com: squash trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>