From 64cb7bbcc6fc0e8641672ee1734c58b036551c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= Date: Tue, 5 Oct 2021 18:07:42 +0200 Subject: [PATCH 1/3] parser.py: ensure unique counts are strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes some crashes when using e.g. `--uniq --print --fields '. Signed-off-by: Vincent Stehlé --- parser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parser.py b/parser.py index ff6fb76..acaf80c 100755 --- a/parser.py +++ b/parser.py @@ -439,6 +439,10 @@ def uniq(cross_check): h[i]['count'] += 1 + # Transform all counts to string. + for k in h.keys(): + h[k]['count'] = str(h[k]['count']) + # Transform back to list r = list(h.values()) logging.info(f"{len(r)} unique entries") -- GitLab From 64f34b8aa83fd5e58724e6a21f3b8146c9aa50ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= Date: Fri, 8 Oct 2021 09:28:57 +0200 Subject: [PATCH 2/3] EBBR.yaml: reclassify set state warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-classify warnings issued by the SCT regarding SetState() returning unsupported as known ACS limitations and drop the known SCT limitation category. Also, add a reference to the corresponding edk2-test bug entry. Signed-off-by: Vincent Stehlé --- EBBR.yaml | 53 +++++++++++++++++++++++++---------------------------- README.md | 4 ---- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/EBBR.yaml b/EBBR.yaml index a6fb1ff..b202c62 100644 --- a/EBBR.yaml +++ b/EBBR.yaml @@ -1959,23 +1959,6 @@ update: result: KNOWN U-BOOT LIMITATION -- rule: Force simple text input ex protocol warnings as known U-Boot limitation - criteria: - descr: Simple Text Input Ex Protocol Test - device path: No device path - group: ConsoleSupportTest - guid: 6647A0E7-483C-4777-A94B-C8BCA3DFC79C - log: SimpleTextInputExBBTestConformance.c - name: SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState - SetState() returns - EFI_INVALID_PARAMETER with KeyToggleState being NULL. - result: WARNING - revision: '0x00010000' - set guid: 5B40A8A9-F77A-4134-9FF1-417720B765B4 - sub set: SetStateConformance - test set: SimpleTextInputExProtocolTest - update: - result: KNOWN U-BOOT LIMITATION - - rule: Force misc runtime services update capsule conformance failure as known U-Boot limitation UpdateCapsule implementation in U-Boot up to (at least) v2021.07 does not @@ -2175,16 +2158,10 @@ update: result: KNOWN ACS LIMITATION -############################################################################### -# Known SCT limitations # -############################################################################### - -# We force the following tests result as `KNOWN SCT LIMITATION'. They are -# genuine bugs, which are fixed in a more recent version of the SCT or which -# must ultimately be fixed and which we know about. - -- rule: Force simple text input ex protocol warning as known SCT limitation - Unsupported is a valid return value for SetState(). +- rule: Force simple text input ex protocol warning as known ACS limitation + Unsupported is a valid return value for SetState() and this is a limitation + in the SCT. + https://bugzilla.tianocore.org/show_bug.cgi?id=3390 criteria: descr: Simple Text Input Ex Protocol Test device path: No device path @@ -2199,7 +2176,27 @@ sub set: ReadKeyStrokeExFunctionAuto test set: SimpleTextInputExProtocolTest update: - result: KNOWN SCT LIMITATION + result: KNOWN ACS LIMITATION + +- rule: Force simple text input ex protocol warning (2) as known ACS limitation + Unsupported is a valid return value for SetState() and this is a limitation + in the SCT. + https://bugzilla.tianocore.org/show_bug.cgi?id=3390 + criteria: + descr: Simple Text Input Ex Protocol Test + device path: No device path + group: ConsoleSupportTest + guid: 6647A0E7-483C-4777-A94B-C8BCA3DFC79C + log: Status - Unsupported + name: SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState - SetState() returns + EFI_INVALID_PARAMETER with KeyToggleState being NULL. + result: WARNING + revision: '0x00010000' + set guid: 5B40A8A9-F77A-4134-9FF1-417720B765B4 + sub set: SetStateConformance + test set: SimpleTextInputExProtocolTest + update: + result: KNOWN ACS LIMITATION ############################################################################### # Comments # diff --git a/README.md b/README.md index f883a26..ecac247 100644 --- a/README.md +++ b/README.md @@ -288,10 +288,6 @@ ones: `KNOWN ACS LIMITATION` Genuine bugs, which are fixed in a more recent version of the ACS or which must ultimately be fixed and which we know about. - - `KNOWN SCT LIMITATION` Genuine bugs, which are fixed in a more recent - version of the SCT or which must ultimately be fixed - and which we know about. ------------------------------------------------------------------------------- Some of the rules just add a `comments` field with some help text. -- GitLab From b53e3be93b5f8a98bdd4c14e4d71b0146d8a34a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= Date: Fri, 8 Oct 2021 09:40:29 +0200 Subject: [PATCH 3/3] parser.py: colorize more messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add red/yellow/green colors to more messages. Signed-off-by: Vincent Stehlé --- parser.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/parser.py b/parser.py index acaf80c..5601902 100755 --- a/parser.py +++ b/parser.py @@ -175,10 +175,10 @@ def ekl_parser(file): n += 1 except Exception: logging.error(f"Line {i+1}: {split_line}") - logging.error("your log may be corrupted") + logging.error(f"{red}your log may be corrupted{normal}") sys.exit(1) else: - logging.error(f"Unparsed line {i} `{line}'") + logging.error(f"{red}Unparsed line{normal} {i} `{line}'") if s: logging.debug(f'{s} skipped test set(s)') @@ -193,7 +193,7 @@ def seq_parser(file): magic = 7 # a test in a seq file is 7 lines, if not mod7, something wrong.. if len(lines) % magic != 0: - logging.error("seqfile cut short, should be mod7") + logging.error(f"{red}seqfile cut short{normal}, should be mod7") sys.exit(1) # the utf-16 char makes this looping a bit harder, so we use x+(i) where i # is next 0-6th @@ -284,13 +284,14 @@ def sanitize_yaml(conf): conf[i] = r if r['rule'] in rules: - logging.warning(f"Duplicate rule {i} `{r['rule']}'") + logging.warning( + f"{yellow}Duplicate rule{normal} {i} `{r['rule']}'") rules.add(r['rule']) if 'criteria' not in r or not type(r['criteria']) is dict or \ 'update' not in r or not type(r['update']) is dict: - logging.error(f"Bad rule {i} `{r}'") + logging.error(f"{red}Bad rule{normal} {i} `{r}'") raise Exception() @@ -680,9 +681,11 @@ def ident_seq(seq_file, seq_db): # Try to identify the seq file if h in known_seqs: - logging.info(f"""Identified `{seq_file}' as "{known_seqs[h]}".""") + logging.info( + f"""{green}Identified{normal} `{seq_file}'""" + f""" as "{known_seqs[h]}".""") else: - logging.debug(f"Could not identify `{seq_file}'...") + logging.warning(f"{yellow}Could not identify{normal} `{seq_file}'...") # Read the .ekl log file and the .seq file and combine them into a single -- GitLab