Move parselog ignores from code to data
cover Move parselog ignores from code to data
From: Ross Burton <[email protected]>
Hi,
This series changes the parselogs runtime QA test so that the list of warnings to ignore is not embedded in a huge dictionary but instead read at test time from text files in the layers. The generic ignores remain in oe-core, but ignores that are specific to e.g. genericx86-64 can be moved to meta-yocto-bsp.
This ultimately allows BSPs that are not in in oe-core/meta-yocto-bsp to use parselogs without having to add their ignore lists into core.
The final patch in this series is for meta-poky, but as they need to be applied in unison I thought it best to post them together. There will also need to be a follow-up patch for meta-intel, which I have queued locally.
Ross
Ross Burton (3):
oeqa/runtime/parselogs: load ignores from disk oeqa/runtime/parselogs: migrate ignores meta-yocto-bsp/oeqa/parselogs: add BSP-specific ignores
.../parselogs-ignores-beaglebone-yocto.txt | 4 + .../cases/parselogs-ignores-genericx86-64.txt | 7 + .../cases/parselogs-ignores-common.txt | 59 +++++ .../cases/parselogs-ignores-mipsarch.txt | 2 + .../cases/parselogs-ignores-qemuall.txt | 27 +++ .../cases/parselogs-ignores-qemuarm64.txt | 6 + .../cases/parselogs-ignores-qemuarmv5.txt | 15 ++ .../cases/parselogs-ignores-qemuppc.txt | 6 + .../cases/parselogs-ignores-qemuppc64.txt | 4 + .../cases/parselogs-ignores-qemux86.txt | 2 + .../runtime/cases/parselogs-ignores-x86.txt | 10 + .../cases/parselogs-ignores-x86_64.txt | 1 + meta/lib/oeqa/runtime/cases/parselogs.py | 214 +++--------------- 13 files changed, 175 insertions(+), 182 deletions(-) create mode 100644 meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt create mode 100644 meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-common.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-mipsarch.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuall.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuarm64.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuarmv5.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuppc.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuppc64.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemux86.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-x86.txt create mode 120000 meta/lib/oeqa/runtime/cases/parselogs-ignores-x86_64.txt
Signature · 1 line
2.34.1
PATCH 1/3 oeqa/runtime/parselogs: load ignores from disk
From: Ross Burton <[email protected]>
Instead of hardcoding the list of ignored errors/warnings in the test itself, read them plain text files on disk.
This uses importlib to try to open a file called oeqa.runtime.cases.parselogs-ignores-[candidate].txt, where the candidate will be:
- "common"
- The TARGET_ARCH
- Each of the MACHINEOVERRDES
This allows the common and tune-specific ignores to be retained in oe-core, and machine-specific ignores added to the layer where the machine is defined.
[ YOCTO #14604 ]
--- meta/lib/oeqa/runtime/cases/parselogs.py | 40 +++++++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-)
meta/lib/oeqa/runtime/cases/parselogs.py +35 -5
@@ -6,6 +6,7 @@ import collections import os +import sys from shutil import rmtree from oeqa.runtime.case import OERuntimeTestCase
@@ -190,6 +191,23 @@ ignore_errors = { ] + common_errors, } + +# importlib.resources.open_text in Python <3.10 doesn't search all directories +# when a package is split across multiple directories. Until we can rely on +# 3.10+, reimplement the searching logic. +if sys.version_info < (3, 10): + def _open_text(package, resource): + import importlib, pathlib + module = importlib.import_module(package) + for path in module.__path__: + candidate = pathlib.Path(path) / resource + if candidate.exists(): + return candidate.open(encoding='utf-8') + raise FileNotFoundError +else: + from importlib.resources import open_text as _open_text + + class ParseLogsTest(OERuntimeTestCase): # Which log files should be collected
@@ -198,6 +216,9 @@ class ParseLogsTest(OERuntimeTestCase): # The keywords that identify error messages in the log files errors = ["error", "cannot", "can't", "failed"] + # A list of error messages that should be ignored + ignore_errors = [] + @classmethod def setUpClass(cls): # When systemd is enabled we need to notice errors on
@@ -212,11 +233,20 @@ class ParseLogsTest(OERuntimeTestCase): cls.errors = [s.casefold() for s in cls.errors] - try: - cls.ignore_errors = [s.casefold() for s in ignore_errors[cls.td.get('MACHINE')]] - except KeyError: - cls.logger.info('No ignore list found for this machine, using default') - cls.ignore_errors = [s.casefold() for s in ignore_errors['default']] + cls.load_machine_ignores() + + @classmethod + def load_machine_ignores(cls): + # Add TARGET_ARCH explicitly as not every machine has that in MACHINEOVERRDES (eg qemux86-64) + for candidate in ["common", cls.td.get("TARGET_ARCH")] + cls.td.get("MACHINEOVERRIDES").split(":"): + try: + name = f"parselogs-ignores-{candidate}.txt" + for line in _open_text("oeqa.runtime.cases", name): + line = line.strip() + if line and not line.startswith("#"): + cls.ignore_errors.append(line.casefold()) + except FileNotFoundError: + pass # Go through the log locations provided and if it's a folder # create a list with all the .log files in it, if it's a file
Signature · 1 line
2.34.1
PATCH 2/3 oeqa/runtime/parselogs: migrate ignores
In reply to [email protected]From: Ross Burton <[email protected]>
Move the ignores from a huge dict in the parselogs.py module to .txt files. This is just the common, tune, and qemu machine ignores; the machine ignores that are not in oe-core will be added to the relevant layers.
The list of ignores has not been reviewed in any meaningful way, this should be done soon as I suspect a number of these are redundant.
--- .../cases/parselogs-ignores-common.txt | 59 ++++++ .../cases/parselogs-ignores-mipsarch.txt | 2 + .../cases/parselogs-ignores-qemuall.txt | 27 +++ .../cases/parselogs-ignores-qemuarm64.txt | 6 + .../cases/parselogs-ignores-qemuarmv5.txt | 15 ++ .../cases/parselogs-ignores-qemuppc.txt | 6 + .../cases/parselogs-ignores-qemuppc64.txt | 4 + .../cases/parselogs-ignores-qemux86.txt | 2 + .../runtime/cases/parselogs-ignores-x86.txt | 10 + .../cases/parselogs-ignores-x86_64.txt | 1 + meta/lib/oeqa/runtime/cases/parselogs.py | 180 ------------------ 11 files changed, 132 insertions(+), 180 deletions(-) create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-common.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-mipsarch.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuall.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuarm64.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuarmv5.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuppc.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuppc64.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-qemux86.txt create mode 100644 meta/lib/oeqa/runtime/cases/parselogs-ignores-x86.txt create mode 120000 meta/lib/oeqa/runtime/cases/parselogs-ignores-x86_64.txt
meta/lib/oeqa/runtime/cases/parselogs-ignores-common.txt new file +59 -0
@@ -0,0 +1,59 @@ +# Xserver explains what the short codes mean +(WW) warning, (EE) error, (NI) not implemented, (??) unknown. + +# Xserver warns if compiled with ACPI but no acpid running +Open ACPI failed (/var/run/acpid.socket) (No such file or directory) + +# Some machines (eg qemux86) don't enable PAE (they probably should though) +NX (Execute Disable) protection cannot be enabled: non-PAE kernel! + +# Connman's pacrunner warns if external connectivity isn't available +Failed to find URL:http://ipv4.connman.net/online/status.html +Failed to find URL:http://ipv6.connman.net/online/status.html + +# These should be reviewed to see if they are still needed +dma timeout +can\'t add hid device: +usbhid: probe of +_OSC failed (AE_ERROR) +_OSC failed (AE_SUPPORT) +AE_ALREADY_EXISTS +ACPI _OSC request failed (AE_SUPPORT) +can\'t disable ASPM +Failed to load module "vesa" +Failed to load module "modesetting" +Failed to load module "glx" +Failed to load module "fbdev" +Failed to load module "ati" +[drm] Cannot find any crtc or sizes +_OSC failed (AE_NOT_FOUND); disabling ASPM +hd.: possibly failed opcode +NETLINK INITIALIZATION FAILED +kernel: Cannot find map file +omap_hwmod: debugss: _wait_target_disable failed +VGA arbiter: cannot open kernel arbiter, no multi-card support +Online check failed for +netlink init failed +Fast TSC calibration +controller can't do DEVSLP, turning off +stmmac_dvr_probe: warning: cannot get CSR clock +error: couldn\'t mount because of unsupported optional features +GPT: Use GNU Parted to correct GPT errors +Cannot set xattr user.Librepo.DownloadInProgress +Failed to read /var/lib/nfs/statd/state: Success +error retry time-out = +logind: cannot setup systemd-logind helper (-61), using legacy fallback +Failed to rename network interface +Failed to process device, ignoring: Device or resource busy +Cannot find a map file +[rdrand]: Initialization Failed +[rndr ]: Initialization Failed +[pulseaudio] authkey.c: Failed to open cookie file +[pulseaudio] authkey.c: Failed to load authentication key +was skipped because of a failed condition check +was skipped because all trigger condition checks failed +xf86OpenConsole: Switching VT failed +Failed to read LoaderConfigTimeoutOneShot variable, ignoring: Operation not supported +Failed to read LoaderEntryOneShot variable, ignoring: Operation not supported +Direct firmware load for regulatory.db +failed to load regulatory.db
meta/lib/oeqa/runtime/cases/parselogs-ignores-mipsarch.txt new file +2 -0
@@ -0,0 +1,2 @@ +# These should be reviewed to see if they are still needed +cacheinfo: Failed to find cpu0 device node
meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuall.txt new file +27 -0
@@ -0,0 +1,27 @@ +# psplash +FBIOPUT_VSCREENINFO failed, double buffering disabled + +# PCI host bridge to bus 0000:00 +# pci_bus 0000:00: root bus resource [mem 0x10000000-0x17ffffff] +# pci_bus 0000:00: root bus resource [io 0x1000-0x1fffff] +# pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff] +# pci 0000:00:00.0: [2046:ab11] type 00 class 0x100000 +# pci 0000:00:00.0: [Firmware Bug]: reg 0x10: invalid BAR (can't size) +# pci 0000:00:00.0: [Firmware Bug]: reg 0x14: invalid BAR (can't size) +# pci 0000:00:00.0: [Firmware Bug]: reg 0x18: invalid BAR (can't size) +# pci 0000:00:00.0: [Firmware Bug]: reg 0x1c: invalid BAR (can't size) +# pci 0000:00:00.0: [Firmware Bug]: reg 0x20: invalid BAR (can't size) +# pci 0000:00:00.0: [Firmware Bug]: reg 0x24: invalid BAR (can't size) +invalid BAR (can't size) + +# These should be reviewed to see if they are still needed +wrong ELF class +fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge +can't claim BAR +amd_nb: Cannot enumerate AMD northbridges +tsc: HPET/PMTIMER calibration failed +modeset(0): Failed to initialize the DRI2 extension +glamor initialization failed +blk_update_request: I/O error, dev fd0, sector 0 op 0x0:(READ) +floppy: error +failed to IDENTIFY (I/O error, err_mask=0x4)
meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuarm64.txt new file +6 -0
@@ -0,0 +1,6 @@ +# These should be reviewed to see if they are still needed +Fatal server error: +(EE) Server terminated with error (1). Closing log file. +dmi: Firmware registration failed. +irq: type mismatch, failed to map hwirq-27 for /intc +logind: failed to get session seat
meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuarmv5.txt new file +15 -0
@@ -0,0 +1,15 @@ +# These should be reviewed to see if they are still needed +mmci-pl18x: probe of fpga:05 failed with error -22 +mmci-pl18x: probe of fpga:0b failed with error -22 +OF: amba_device_add() failed (-19) for /amba/smc@10100000 +OF: amba_device_add() failed (-19) for /amba/mpmc@10110000 +OF: amba_device_add() failed (-19) for /amba/sctl@101e0000 +OF: amba_device_add() failed (-19) for /amba/watchdog@101e1000 +OF: amba_device_add() failed (-19) for /amba/sci@101f0000 +OF: amba_device_add() failed (-19) for /amba/spi@101f4000 +OF: amba_device_add() failed (-19) for /amba/ssp@101f4000 +OF: amba_device_add() failed (-19) for /amba/fpga/sci@a000 +Failed to initialize '/amba/timer@101e3000': -22 +jitterentropy: Initialization failed with host not compliant with requirements: 2 +clcd-pl11x: probe of 10120000.display failed with error -2 +arm-charlcd 10008000.lcd: error -ENXIO: IRQ index 0 not found
meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuppc.txt new file +6 -0
@@ -0,0 +1,6 @@ +# These should be reviewed to see if they are still needed +PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff] +host side 80-wire cable detection failed, limiting max speed +mode "640x480" test failed +can't handle BAR above 4GB +Cannot reserve Legacy IO
meta/lib/oeqa/runtime/cases/parselogs-ignores-qemuppc64.txt new file +4 -0
@@ -0,0 +1,4 @@ +# These should be reviewed to see if they are still needed +vio vio: uevent: failed to send synthetic uevent +synth uevent: /devices/vio: failed to send uevent +PCI 0000:00 Cannot reserve Legacy IO [io 0x10000-0x10fff]
meta/lib/oeqa/runtime/cases/parselogs-ignores-qemux86.txt new file +2 -0
@@ -0,0 +1,2 @@ +# These should be reviewed to see if they are still needed +Failed to access perfctr msr (MSR
meta/lib/oeqa/runtime/cases/parselogs-ignores-x86.txt new file +10 -0
@@ -0,0 +1,10 @@ +# These should be reviewed to see if they are still needed +[drm:psb_do_init] *ERROR* Debug is +wrong ELF class +Could not enable PowerButton event +probe of LNXPWRBN:00 failed with error -22 +pmd_set_huge: Cannot satisfy +failed to setup card detect gpio +amd_nb: Cannot enumerate AMD northbridges +failed to retrieve link info, disabling eDP +Direct firmware load for iwlwifi
meta/lib/oeqa/runtime/cases/parselogs-ignores-x86_64.txt new file +1 -0
@@ -0,0 +1 @@ +parselogs-ignores-x86.txt
meta/lib/oeqa/runtime/cases/parselogs.py +0 -180
186 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 3/3 meta-yocto-bsp/oeqa/parselogs: add BSP-specific ignores
In reply to [email protected]From: Ross Burton <[email protected]>
Add machine-specific ignores from oe-core to meta-yocto-bsp.
--- .../runtime/cases/parselogs-ignores-beaglebone-yocto.txt | 4 ++++ .../oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt create mode 100644 meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt
meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt new file +4 -0
@@ -0,0 +1,4 @@ +# These should be reviewed to see if they are still needed +l4_wkup_cm +Failed to make EGL context current +glamor initialization failed
meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt new file +7 -0
@@ -0,0 +1,7 @@ +# These should be reviewed to see if they are still needed +Direct firmware load for i915 +Failed to load firmware i915 +Failed to fetch GuC +Failed to initialize GuC +Failed to load DMC firmware +The driver is built-in, so to load the firmware you need to
Signature · 1 line
2.34.1