From 6ad2fb6c009c7501865f18d8c14fbe1c06dd829d Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Thu, 15 Jun 2023 12:50:14 -0500 Subject: subtree updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit meta-openembedded: c5668905a6..cbbaa82238: Alex Kiernan (1): lldpd: Upgrade 1.0.14 -> 1.0.15 Alexander Stein (1): dool: Add patch to fix rebuild Archana Polampalli (1): Nodejs - Upgrade to 16.18.1 Armin Kuster (2): meta-oe][PATCH] gst-editing-services: fix typo in LICENSE field. Revert "waf-samba.bbclass: point PYTHON_CONFIG to target python3-config" Arsalan H. Awan (1): meta-networking/licenses/netperf: remove unused license Changqing Li (3): redis: 7.0.5 -> 7.0.7 redis: 6.2.7 -> 6.2.8 redis: upgrade 7.0.9 -> 7.0.10 Chee Yang Lee (5): zsh: Fix CVE-2021-45444 fwupd: Fix CVE-2022-3287 redis: Upgrade to 7.0.8 redis: Upgrade to 6.2.9 tinyproxy: fix CVE-2022-40468 Chen Pei (1): botan: upgrade 2.19.2 -> 2.19.3 Chen Qi (4): xfce4-verve-plugin: fix do_configure faiure about missing libpcre networkmanager: fix dhcpcd PACKAGECONFIG networkmanager: install config files into correct place networkmanager: fix /etc/resolv.conf handling Dmitry Baryshkov (1): nss: fix cross-compilation error Geoff Parker (1): python3-pillow: add tk to RDEPENDS ptest pkg only if x11 in DISTRO_FEATURES Hermes Zhang (1): kernel_add_regdb: Change the task order Jasper Orschulko (1): python3-gcovr: Add missing runtime dependency Joe Slater (1): phoronix-test-suite: fix CVE-2022-40704 Kai Kang (2): freeradius: fix multilib systemd service start failure postfix: fix multilib conflict of sample-main.cf Khem Raj (15): gnome-text-editor: Add missing libpcre build time depenedency ettercap: Add missing dependency on libpcre imapfilter: Upgrade to 2.7.6 aufs-util: Fix build with large file support enabled systems volume-key: Inherit python3targetconfig audit: Inherit python3targetconfig waf-samba.bbclass: point PYTHON_CONFIG to target python3-config fontforge: Inherit python3targetconfig sshpass: Use SPDX identified string for GPLv2 perfetto: Do not pass TUNE_CCARGS to native/host compiler net-snmp: Fix build with clang16 ncmpc: Upgrade to 0.47 mpd: Upgrade to 0.23.12 release redis: Upgrade 6.x recipe to 6.2.11 redis: Upgrade 7.x to 7.0.9 Leon Anavi (1): python3-pythonping: Upgrade 1.1.3 -> 1.1.4 Markus Volk (3): libcamera: upgrade -> 0.0.1 blueman: add RDEPEND on python3-fcntl perfetto: pass TUNE_CCARGS to use machine tune Martin Jansa (11): monkey: use git fetcher nss: fix SRC_URI exiv2: fix SRC_URI mdns: use git fetcher zsh: fix installed-vs-shipped with multilib restinio: fix S variable in multilib builds mongodb: fix chown user for multilib builds pahole: respect libdir lvgl,lv-lib-png,lv-drivers: fix installed-vs-shipped QA issue with multilib lirc: fix do_install with multilib dleyna-{server,renderer}: fix dev-so QA issue with multilib Mathieu Dubois-Briand (2): nss: Add missing CVE product nss: Whitelist CVEs related to libnssdbm Mingli Yu (1): php: Upgrade to 8.1.16 Narpat Mali (1): net-snmp: CVE-2022-44792 & CVE-2022-44793 Fix NULL Pointer Exception Omkar Patil (1): ntfs-3g-ntfsprogs: Upgrade 2022.5.17 to 2022.10.3 Peter Kjellerstedt (2): chrony: Make it possible to enable editline support again chrony: Remove the libcap and nss PACKAGECONFIGs Peter Marko (4): cpputest: remove dev package dependency ntp: whitelist CVE-2019-11331 c-ares: fix CVE-2022-4904 dnsmasq: fix CVE-2023-28450 Polampalli, Archana (1): nodejs: Upgrade 16.19.0 -> 16.19.1 Preeti Sachan (1): fluidsynth: update SRC_URI to remove non-existing 2.2.x branch Randy MacLeod (2): python3-pillow: add ptest support python3-pillow: Add distutils, unixadmin for ptest Robert Joslyn (1): fwupd: Fix plugin_gpio PACKAGECONFIG Samuli Piippo (1): protobuf: stage protoc binary to sysroot Stefan Ghinea (1): mbedtls: upgrade to 2.28.2 to fix CVE-2022-46392, CVE-2022-46393 Tim Orling (1): nodejs: upgrade 16.18.1 -> 16.19.0 Tom Hochstein (1): nlohmann-json: Allow empty main package for SDK Valeria Petrov (1): apache2: upgrade 2.4.56 -> 2.4.57 Wang Mingyu (34): bats: upgrade 1.8.0 -> 1.8.2 ctags: upgrade 5.9.20221009.0 -> 5.9.20221016.0 fvwm: upgrade 2.6.9 -> 2.7.0 makedumpfile: upgrade 1.7.1 -> 1.7.2 sanlock: upgrade 3.8.4 -> 3.8.5 python3-astroid: upgrade 2.12.11 -> 2.12.12 python3-charset-normalizer: upgrade 2.1.1 -> 3.0.0 python3-google-api-python-client: upgrade 2.64.0 -> 2.65.0 python3-google-auth: upgrade 2.12.0 -> 2.13.0 python3-huey: upgrade 2.4.3 -> 2.4.4 python3-oauthlib: upgrade 3.2.1 -> 3.2.2 python3-pandas: upgrade 1.5.0 -> 1.5.1 python3-pika: upgrade 1.3.0 -> 1.3.1 python3-protobuf: upgrade 4.21.7 -> 4.21.8 python3-pywbemtools: upgrade 1.0.0 -> 1.0.1 python3-socketio: upgrade 5.7.1 -> 5.7.2 python3-sqlalchemy: upgrade 1.4.41 -> 1.4.42 tracker: upgrade 3.4.0 -> 3.4.1 wolfssl: upgrade 5.5.1 -> 5.5.2 cglm: upgrade 0.8.5 -> 0.8.7 ctags: upgrade 5.9.20221016.0 -> 5.9.20221023.0 function2: upgrade 4.2.1 -> 4.2.2 poco: upgrade 1.12.2 -> 1.12.3 audit: upgrade 3.0.8 -> 3.0.9 colord: upgrade 1.4.5 -> 1.4.6 smcroute: upgrade 2.5.5 -> 2.5.6 openwsman: upgrade 2.7.1 -> 2.7.2 python3-pillow: upgrade 9.2.0 -> 9.3.0 python3-pillow: upgrade 9.3.0 -> 9.4.0 apache2: upgrade 2.4.54 -> 2.4.55 python3-django: upgrade 4.1 -> 4.1.3 python3-django: upgrade 4.1.3 -> 4.1.6 apache2: upgrade 2.4.55 -> 2.4.56 openwsman: Change download branch from master to main. Xiangyu Chen (1): ipmitool: fix typo in .bb file's comments, using = instead of =? Yi Zhao (4): ostree: fix selinux policy rebuild error on first deployment strongswan: upgrade 5.9.8 -> 5.9.9 freeradius: Security fixes for CVE-2022-41860 CVE-2022-41861 apache2: use /run instead of /var/run for systemd volatile config Yogita Urade (1): multipath-tools: fix CVE-2022-41974 zhengruoqin (2): tcpslice: upgrade 1.5 -> 1.6 tio: upgrade 2.1 -> 2.2 meta-arm: 4ee457693e..58952aa7ba: Abdellatif El Khlifi (1): arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the user guide Adam Johnston (2): arm/trusted-services: Fix 'no such file' when building libts CI: Remove ts-smm-gateway from N1SDP Adrian Herrera (2): atp: decouple m5readfile from m5ops atp: move m5readfile to meta-gem5 Adrián Herrera Arcila (5): atp: fix failing test_readme gem5: support for EXTRAS atp: separate recipe for gem5 models atp: fix machine overrides in recipes ci: add meta-atp to check-layers Anton Antonov (1): arm-bsp/fvp-base: Enable virtio-rng support and unset preferred 5.15 kernel Daniel Díaz (1): arm-bsp/firmware-image-juno: Fix deployment of compressed Image Diego Sueiro (2): arm/classes: Introduce apply_local_src_patches bbclass arm/trusted-firmware-m: Fix local source patches application Emekcan (3): arm-bsp/trusted-services: add checks for null attributes in smm gateway arm-bsp/trusted-services: Fix GetNextVariable max_name_len in smm gateway arm/fvp: Upgrade Corstone1000 FVP Emekcan Aras (3): arm-bsp/documentation: corstone1000: update the user guide kas/corstone1000-base.yml: set refspec for Corstone1000 release arm/trusted-firmware-m: Do not use release branches Gowtham Suresh Kumar (6): arm/edk2-basetools: Add edk2 base tool native recipe arm-bsp/uefi_capsule: Add UEFI capsule generation class arm-bsp/corstone1000-image: Generate UEFI capsule for corstone1000 platform arm/edk2-basetools: Convert edk2 basetools recipes to native only arm-bsp/uefi_capsule: Use json file to pass capsule config arm-bsp/uefi_capsule: Move UEFI capsule to IMGDEPLOYDIR Jon Mason (4): CI: define DEFAULT_TAG and CPU_REQUEST arm-bsp/juno: move to compressed initramfs image arm-bsp/juno: Update kernel patches to the latest CI: dev kernel allow failure Luca Fancellu (1): arm,arm-bsp/recipes-kernel: don't use PN in arm-ffa-transport.inc Peter Hoyes (15): arm/fvp: Join cli arguments in verbose logging arm/lib: Factor out asyncio in FVPRunner arm/lib: Decouple console parsing from the FVPRunner arm/oeqa: Log the FVP output in OEFVPSSHTarget runfvp: Fix verbose output when using --console arm/fvp: Backport shlex.join from Python 3.8 arm/fvpboot: Disable timing annotation by default arm/classes: Ensure patch files are sorted in apply_local_src_patches arm/scp-firmware: Ensure CMAKE_BUILD_TYPE is capitalized arm/scp-firmware: Disable cppcheck arm/lib: Add XAUTHORITY to runfvp environment classes: Define FVP_ENV_PASSTHROUGH variable dependencies classes: Prevent passing None to the runfvp environment classes: Set ARMLMD_LICENSE_FILE in the runfvp environment CI: Add BUILD_ENABLE_REGEX option to conditionally enable builds Qi Feng (1): kas/fvp-baser-aemv8r64: Use langdale as kas default refspec Robbie Cao (1): arm/fvp-base-r-aem: upgrade to version 11.20.15 Ross Burton (9): arm/linux-arm64-ack: fix buildpaths in the perf Python module CI: revert a meta-clang change which breaks pixman (thus, xserver) CI: add variables needed for k8s runners CI: add tags to all jobs CI: no need to install telnet CI: use the .setup fragment in machine-coverage CI: fix builds with clang CI: pin to kas 3.2 as 3.2.1 fails arm-bsp/external-system: fix the gen_module race, again Rui Miguel Silva (4): arm/trusted-services: check before applying patches arm-bsp/trusted-services: psa test setup corstone1000 arm-bsp/trusted-firmware-m: adjust ps assets for corstone1000 kas/corstone500.yml: pin repos to langdale Vishnu Banavath (3): arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the release notes arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the change log arm-bsp/optee: register DRAM1 for N1SDP target poky: 6b9db5a99b..3e95f268ce: Adrian Freihofer (2): buildconf: compare abspath bblayers/setupwriters/oe-setup-layers: create dir if not exists Alejandro Hernandez Samaniego (2): baremetal-image: Avoid overriding qemu variables from IMAGE_CLASSES testimage: Fix error message to reflect new syntax Alex Kiernan (2): cargo_common.bbclass: Fix typos classes: image: Set empty weak default IMAGE_LINGUAS Alex Stewart (2): lsof: add update-alternatives logic opkg: upgrade to version 0.6.1 Alexander Kanavin (69): rust-target-config: match riscv target names with what rust expects rust: install rustfmt for riscv32 as well shadow: update 4.12.1 -> 4.12.3 lttng-modules: upgrade 2.13.4 -> 2.13.5 quilt: backport a patch to address grep 3.8 failures go: submit patch upstream go: update 1.19 -> 1.19.2 groff: submit patches upstream tcl: correct patch status lttng-tools: submit determinism.patch upstream kea: submit patch upstream ovmf: correct patches status libffi: submit patch upstream rust: submit a rewritten version of crossbeam_atomic.patch upstream ffmpeg: upgrade 5.1.1 -> 5.1.2 linux-firmware: upgrade 20220913 -> 20221012 xwayland: upgrade 22.1.3 -> 22.1.4 libffi: upgrade 3.4.2 -> 3.4.4 libical: upgrade 3.0.15 -> 3.0.16 mtd-utils: upgrade 2.1.4 -> 2.1.5 selftest: add a copy of previous mtd-utils version to meta-selftest gdk-pixbuf: upgrade 2.42.9 -> 2.42.10 pango: upgrade 1.50.10 -> 1.50.11 pango: replace a recipe fix with an upstream submitted patch gstreamer1.0: upgrade 1.20.3 -> 1.20.4 libepoxy: convert to git libepoxy: update 1.5.9 -> 1.5.10 mesa: do not rely on native llvm-config in target sysroot systemd: update 251.4 -> 251.8 vala: install vapigen-wrapper into /usr/bin/crosscripts and stage only that gnomebase.bbclass: return the whole version for tarball directory if it is a number glibc-tests: correctly pull in the actual tests when installing -ptest package libnewt: update 0.52.21 -> 0.52.23 ruby: merge .inc into .bb ruby: update 3.1.2 -> 3.1.3 tzdata: update 2022d -> 2022g cmake: update 3.24.0 -> 3.24.2 devtool/upgrade: correctly handle recipes where S is a subdir of upstream tree libarchive: upgrade 3.6.1 -> 3.6.2 go: update 1.19.3 -> 1.19.4 devtool: process local files only for the main branch libksba: update 1.6.2 -> 1.6.3 linux-firmware: upgrade 20221109 -> 20221214 xwayland: upgrade 22.1.5 -> 22.1.7 xserver-xorg: upgrade 21.1.4 -> 21.1.6 selftest/virgl: use pkg-config from the host vulkan-samples: branch rename master -> main gdk-pixbuf: do not use tools from gdk-pixbuf-native when building tests oeqa/qemurunner: do not use Popen.poll() when terminating runqemu with a signal diffutils: update 3.8 -> 3.9 lttng-tools: update 2.13.8 -> 2.13.9 apr: update 1.7.0 -> 1.7.2 apr-util: update 1.6.1 -> 1.6.3 bind: upgrade 9.18.10 -> 9.18.11 libjpeg-turbo: upgrade 2.1.4 -> 2.1.5 pkgconf: upgrade 1.9.3 -> 1.9.4 linux-firmware: upgrade 20221214 -> 20230117 sudo: upgrade 1.9.12p1 -> 1.9.12p2 libgit2: upgrade 1.5.0 -> 1.5.1 vim: update 9.0.1211 -> 9.0.1293 to resolve open CVEs dbus: upgrade 1.14.4 -> 1.14.6 linux-firmware: upgrade 20230117 -> 20230210 wireless-regdb: upgrade 2022.08.12 -> 2023.02.13 bblayers/makesetup: skip git repos that are submodules sudo: update 1.9.12p2 -> 1.9.13p2 libdnf: update 0.69.0 -> 0.70.0 pango: upgrade 1.50.12 -> 1.50.13 apt: re-enable version check devtool/upgrade: do not delete the workspace/recipes directory Alexey Smirnov (1): classes: make TOOLCHAIN more permissive for kernel Alexis Lothoré (1): oeqa/selftest/resulttooltests: fix minor typo Andrew Geissler (1): filemap.py: enforce maximum of 4kb block size Anton Antonov (1): rust: Do not use default compiler flags defined in CC crate Antonin Godard (2): busybox: always start do_compile with orig config files busybox: rm temporary files if do_compile was interrupted Armin Kuster (1): lttng-modules: Fix for 5.10.163 kernel version Arnout Vandecappelle (1): python3-pytest: depend on python3-tomli instead of python3-toml Arturo Buzarra (1): run-postinsts: Set dependency for ldconfig to avoid boot issues Benoît Mauduit (1): lib/oe/reproducible: Use git log without gpg signature Bernhard Rosenkränzer (1): cmake-native: Fix host tool contamination Bhabu Bindu (1): qemu: Fix CVE-2022-4144 Bruce Ashfield (35): linux-yocto/5.15: update to v5.15.72 linux-yocto/5.19: update to v5.19.14 kern-tools: fix relative path processing linux-yocto/5.15: update to v5.15.74 linux-yocto/5.15: update to v5.15.76 linux-yocto/5.15: update to v5.15.78 linux-yocto/5.15: fix CONFIG_CRYPTO_CCM mismatch warnings linux-yocto/5.19: update to v5.19.16 linux-yocto/5.19: update to v5.19.17 linux-yocto/5.19: cfg: intel and vesa updates linux-yocto/5.19: security.cfg: remove configs which have been dropped linux-yocto/5.19: fix CONFIG_CRYPTO_CCM mismatch warnings linux-yocto/5.19: fix elfutils run-backtrace-native-core ptest failure kern-tools: integrate ZFS speedup patch linux-yocto/5.19: fix perf build with clang linux-yocto/5.15: ltp and squashfs fixes linux-yocto/5.15: fix perf build with clang linux-yocto/5.15: libbpf: Fix build warning on ref_ctr_off linux-yocto/5.15: update to v5.15.84 linux-yocto/5.15: powerpc: Fix reschedule bug in KUAP-unlocked user copy linux-yocto/5.19: powerpc: Fix reschedule bug in KUAP-unlocked user copy linux-yocto/5.15: update to v5.15.87 linux-yocto/5.15: update to v5.15.89 linux-yocto/5.15: update to v5.15.91 lttng-modules: fix for kernel 6.2+ linux-yocto/5.15: update to v5.15.94 linux-yocto/5.15: update to v5.15.96 linux-yocto-rt/5.15: update to -rt59 linux-yocto/5.15: update to v5.15.98 linux-yocto/5.15: update to v5.15.103 lttng-modules: update to v2.13.9 kernel-devsrc: fix mismatched compiler warning linux-yocto/5.15: update to v5.15.106 linux-yocto/5.15: update to v5.15.107 linux-yocto/5.15: update to v5.15.108 Carlos Alberto Lopez Perez (3): xwayland: libxshmfence is needed when dri3 is enabled mesa-gl: gallium is required when enabling x11 mesa-demos: packageconfig weston should have a dependency on wayland-protocols Changqing Li (2): base.bbclass: Fix way to check ccache path apt: fix do_package_qa failure Charlie Johnston (1): opkg: ensure opkg uses private gpg.conf when applying keys. Chee Yang Lee (5): git: upgrade to 2.37.5 tiff: fix multiple CVEs git: ignore CVE-2023-22743 tiff: Fix CVE-2023-0795 CVE-2023-0796 CVE-2023-0797 CVE-2023-0798 CVE-2023-0799 go: upgrade to 1.19.7 Chen Qi (9): kernel.bbclass: make KERNEL_DEBUG_TIMESTAMPS work at rebuild dhcpcd: fix to work with systemd resolvconf: make it work psplash: consider the situation of psplash not exist for systemd bc: extend to nativesdk rm_work: adjust dependency to make do_rm_work_all depend on do_rm_work dhcpcd: backport two patches to fix runtime error libseccomp: fix typo in DESCRIPTION ffmpeg: fix configure failure on noexec /tmp host Chris Elledge (1): busybox: move hwclock init earlier in startup Christian Eggers (1): linux-firmware: split rtl8761 firmware Christoph Lauer (1): populate_sdk_base: add zip options Claus Stovgaard (1): gstreamer1.0-libav: fix errors with ffmpeg 5.x Diego Sueiro (1): kernel.bbclass: Include randstruct seed assets in STAGING_KERNEL_BUILDDIR Dmitry Baryshkov (5): linux-firmware: upgrade 20221012 -> 20221109 linux-firmware: add new fw file to ${PN}-qcom-adreno-a530 linux-firmware: properly set license for all Qualcomm firmware linux-firmware: add yamato fw files to qcom-adreno-a2xx package ffmpeg: fix build failure when vulkan is enabled Ed Tanous (1): openssl: Upgrade 3.0.5 -> 3.0.7 Enguerrand de Ribaucourt (1): bitbake-layers: fix a typo Enrico Jörns (8): sstatesig: emit more helpful error message when not finding sstate manifest oeqa/selftest/cases/runqemu: update imports oeqa/targetcontrol: fix misspelled RuntimeError oeqa/targetcontrol: do not set dump_host_cmds redundantly oeqa/targetcontrol: remove unused imports oeqa/utils/commands: fix usage of undefined EPIPE oeqa/utils/commands: remove unused imports oeqa/utils/qemurunner: replace hard-coded user 'root' in debug output Etienne Cordonnier (2): mirrors.bbclass: use shallow tarball for binutils-native bitbake: siggen: Fix inefficient string concatenation Fawzi KHABER (3): ref-manual: update DEV_PKG_DEPENDENCY in variables package.bbclass: check packages name conflict in do_package oeqa/selftest/cases/package.py: adding unittest for package rename conflicts Federico Pellegrin (1): curl: fix dependencies when building with ldap/ldaps Frank de Brabander (2): bitbake: process: log odd unlink events with bitbake.sock bitbake: bin/utils: Ensure locale en_US.UTF-8 is available on the system Frederic Martinsons (1): cargo.bbclass: use offline mode for building Geoffrey GIRY (2): cve-extra-exclusions: ignore inapplicable linux-yocto CVEs cve-check: Fix false negative version issue Harald Seiler (2): opkg: Set correct info_dir and status_file in opkg.conf bootchart2: Fix usrmerge support He Zhe (1): lttng-modules: update 2.13.7 -> 2.13.8 Hitendra Prajapati (3): openssl: CVE-2022-3358 Using a Custom Cipher with NID_undef may lead to NULL encryption libarchive: CVE-2022-36227 NULL pointer dereference in archive_write.c libxml2: Fix CVE-2022-40303 && CVE-2022-40304 Jagadeesh Krishnanjanappa (1): qemuboot.bbclass: make sure runqemu boots bundled initramfs kernel image Jan Kircher (1): toolchain-scripts: compatibility with unbound variable protection Jan-Simon Moeller (1): buildtools-tarball: export certificates to python and curl Jeremy Puhlman (1): qemu-native: Add PACKAGECONFIG option for jack Jermain Horsman (1): cve-check: write the cve manifest to IMGDEPLOYDIR Jose Quaresma (10): kernel-yocto: improve fatal error messages of symbol_why.py archiver: avoid using machine variable as it breaks multiconfig sstatesig: skip the rm_work task signature rm_work: exclude the SSTATETASKS from the rm_work tasks sinature sstate: Allow optimisation of do_deploy_archives task dependencies Revert "gstreamer1.0: disable flaky gstbin:test_watch_for_state_change test" gstreamer1.0: Fix race conditions in gstbin tests oeqs/selftest: OESelftestTestContext: replace the os.environ after subprocess.check_output oeqa/selftest: OESelftestTestContext: convert relative to full path when newbuilddir is provided oeqa/selftest/reproducible: Split different packages from missing packages output Joshua Watt (6): runqemu: Do not perturb script environment runqemu: Fix gl-es argument from causing other arguments to be ignored qemu-helper-native: Re-write bridge helper as C program qemu-helper-native: Correctly pass program name as argv[0] scripts: convert-overrides: Allow command-line customizations classes/populate_sdk_base: Append cleandirs Justin Bronder (1): bitbake: asyncrpc: serv: correct closed client socket detection Kai Kang (3): mesa: only apply patch to fix ALWAYS_INLINE for native libuv: fixup SRC_URI xserver-xorg: 21.1.6 -> 21.1.7 Keiya Nobuta (1): create-spdx: Remove ";name=..." for downloadLocation Kenfe-Mickael Laventure (3): buildtools-tarball: Handle spaces within user $PATH toolchain-scripts: Handle spaces within user $PATH populate_sdk_ext: Handle spaces within user $PATH Khem Raj (11): tiff: Add packageconfig knob for webp createrepo-c: Include missing rpm/rpmstring.h libtirpc: Check if file exists before operating on it libusb1: Link with latomic only if compiler has no atomic builtins libusb1: Strip trailing whitespaces scons: Pass MAXLINELENGTH to scons invocation scons.bbclass: Make MAXLINELENGTH overridable libcomps: Fix callback function prototype for PyCOMPS_hash rpm: Fix hdr_hash function prototype systemd.bbclass: Add /usr/lib/systemd to searchpaths as well Revert "runqemu: Add workaround for APIC hang on pre 4.15 kernels on qemux86" Konrad Weihmann (1): create-spdx: default share_src for shared sources Lee Chee Yang (2): git: Upgrade to 2.37.4 migration-guides: add release-notes for 4.0.7 Leon Anavi (1): get_module_deps3.py: Check attribute '__file__' Liam Beguin (1): meson: make wrapper options sub-command specific Louis Rannou (1): oeqa/selftest/locales: Add selftest for locale generation/presence Luca Boccassi (1): systemd: add systemd-creds and systemd-cryptenroll to systemd-extra-utils Luis (1): rm_work.bbclass: use HOSTTOOLS 'rm' binary exclusively Marek Vasut (5): bluez5: Point hciattach bcm43xx firmware search path to /lib/firmware systemd: Make importd depend on glib-2.0 again bitbake: fetch2/git: Prevent git fetcher from fetching gitlab repository metadata bitbake: fetch2/git: Clarify the meaning of namespace cpio: Fix wrong CRC with ASCII CRC for large files Mark Asselstine (1): bitbake: bitbake: bitbake-layers: checkout layer(s) branch when clone exists Markus Volk (2): mesa: update 22.2.0 -> 22.2.2 librsvg: enable vapi build Marta Rybczynska (1): cve-update-db-native: avoid incomplete updates Martin Jansa (12): vulkan-samples: add lfs=0 to SRC_URI to avoid git smudge errors in do_unpack externalsrc.bbclass: fix git repo detection libxml2: fix test data checksums meta: remove True option to getVar and getVarFlag calls (again) timezone: use 'tz' subdir instead of ${WORKDIR} directly tzdata: use separate B instead of WORKDIR for zic output tzcode-native: fix build with gcc-13 on host selftest: devtool: set BB_HASHSERVE_UPSTREAM when setting SSTATE_MIRROR bmap-tools: switch to main branch selftest: runqemu: better check for ROOTFS: in the log selftest: runqemu: use better error message when asserts fail runqemu: respect IMAGE_LINK_NAME Mateusz Marciniec (1): sstatesig: Improve output hash calculation Mathieu Dubois-Briand (1): dbus: Add missing CVE product name Mauro Queiros (1): image.bbclass: print all QA functions exceptions Michael Halstead (3): uninative: Upgrade to 3.8.1 to include libgcc selftest/runtime_test/virgl: Disable for all Rocky Linux uninative: Upgrade to 3.9 to include glibc 2.37 Michael Opdenacker (13): bitbake: bitbake-user-manual: details about variable flags starting with underscore create-spdx.bbclass: remove unused SPDX_INCLUDE_PACKAGED backport SPDX documentation and vulnerability improvements Expand create-spdx class documentation Expand cve-check class documentation manuals: add 4.0.5 and 4.0.6 release notes dev-manual: fix old override syntax ref-manual: variables.rst: fix broken hyperlink profile-manual: update WireShark hyperlinks bsp-guide: fix broken git URLs and missing word manuals: update patchwork instance URL dev-manual: common-tasks.rst: add link to FOSDEM 2023 video migration-guides: update release notes Mikko Rapeli (13): common-tasks.rst: fix oeqa runtime test path oeqa context.py: fix --target-ip comment to include ssh port number oeqa ssh.py: move output prints to new line oeqa ssh.py: add connection keep alive options to ssh client oeqa dump.py: add error counter and stop after 5 failures oeqa qemurunner: read more data at a time from serial oeqa qemurunner.py: add timeout to QMP calls oeqa qemurunner.py: try to avoid reading one character at a time oeqa ssh.py: fix hangs in run() runqemu: kill qemu if it hangs oeqa rtc.py: skip if read-only-rootfs oeqa ping.py: avoid busylooping failing ping command oeqa ping.py: fail test if target IP address has not been set Ming Liu (1): linux: inherit pkgconfig in kernel.bbclass Mingli Yu (6): grub: disable build on armv7ve/a with hardfp glslang: branch rename master -> main mdadm: Fix testcase 06wrmostly mdadm: fix tests/02lineargrow mdadm: Fix raid0 tests report-error: catch Nothing PROVIDES error Narpat Mali (4): ffmpeg: fix for CVE-2022-3964 ffmpeg: fix for CVE-2022-3965 libseccomp: fix for the ptest result format python3-setuptools: fix for CVE-2022-40897 Nathan Rossi (2): oeqa/selftest/lic_checksum: Cleanup changes to emptytest include package: Fix handling of minidebuginfo with newer binutils Niko Mauno (3): systemd: Consider PACKAGECONFIG in RRECOMMENDS Fix missing leading whitespace with ':append' ref-manual: Fix invalid feature name Ola x Nilsson (1): kbd: Don't build tests Ovidiu Panait (1): kernel.bbclass: remove empty module directories to prevent QA issues Pavel Zhukov (4): bitbake: gitsm: Fix regression in gitsm submodule path parsing oeqa/rpm.py: Increase timeout and add debug output wic: Fix usage of fstype=none in wic u-boot: Map arm64 into map for u-boot dts installation Pawel Zalewski (1): classes/fs-uuid: Fix command output decoding issue Peter Bergin (1): gptfdisk: remove warning message from target system Peter Kjellerstedt (4): externalsrc.bbclass: Remove a trailing slash from ${B} pango: Make it build with ptest disabled librsvg: Only enable the Vala bindings if GObject Introspection is enabled devshell: Do not add scripts/git-intercept to PATH Peter Marko (6): systemd: add group render to udev package meta-selftest/staticids: add render group for systemd externalsrc: fix lookup for .gitmodules oeqa/selftest/externalsrc: add test for srctree_hash_files systemd: add group sgx to udev package gcc-shared-source: do not use ${S}/.. in deploy_source_date_epoch Petr Kubizňák (1): harfbuzz: remove bindir only if it exists Piotr Łobacz (1): systemd: fix wrong nobody-group assignment Polampalli, Archana (1): libpam: fix CVE-2022-28321 Qiu, Zheng (3): tiff: fix a typo for CVE-2022-2953.patch tiff: Security fix for CVE-2022-3970 vim: upgrade 9.0.0820 -> 9.0.0947 Quentin Schulz (4): cairo: update patch for CVE-2019-6461 with upstream solution docs: kernel-dev: faq: update tip on how to not include kernel in image docs: migration-4.0: specify variable name change for kernel inclusion in image recipe cairo: fix CVE patches assigned wrong CVE number Randy MacLeod (3): valgrind: skip the boost_thread test on arm vim: upgrade 9.0.0947 -> 9.0.1211 vim: upgrade 9.0.1403 -> 9.0.1429 Ranjitsinh Rathod (1): curl: Correct LICENSE from MIT-open-group to curl Ravula Adhitya Siddartha (2): linux-yocto/5.15: update genericx86* machines to v5.15.72 linux-yocto/5.19: update genericx86* machines to v5.19.14 Richard Purdie (37): build-appliance-image: Update to langdale head revision bitbake: runqueue: Fix race issues around hash equivalence and sstate reuse lttng-modules: upgrade 2.13.5 -> 2.13.7 bitbake.conf: Drop export of SOURCE_DATE_EPOCH_FALLBACK gcc-shared-source: Fix source date epoch handling gcc-source: Fix gengtypes race gcc-source: Drop gengtype manipulation gcc-source: Ensure deploy_source_date_epoch sstate hash doesn't change sanity: Drop data finalize call oeqa/selftest/tinfoil: Add test for separate config_data with recipe_parse_file() qemu: Ensure libpng dependency is deterministic yocto-check-layer: Allow OE-Core to be tested oeqa/concurrencytest: Add number of failures to summary output build-appliance-image: Update to langdale head revision bitbake: server/process: Add bitbake.sock race handling native: Drop special variable handling kernel/linux-kernel-base: Fix kernel build artefact determinism issues make-mod-scripts: Ensure kernel build output is deterministic perf: Enable debug/source packaging libc-locale: Fix on target locale generation libssh2: Clean up ptest patch/coverage build-appliance-image: Update to langdale head revision bitbake: utils: Allow to_boolean to support int values bitbake: cookerdata: Remove incorrect SystemExit usage bitbake: cookerdata: Improve early exception handling bitbake: cookerdata: Drop dubious exception handling code binutils: Fix nativesdk ld.so search oeqa/selftest/prservice: Improve debug output for failure staging: Separate out different multiconfig manifests staging/multilib: Fix manifest corruption glibc: Add missing binutils dependency selftest/recipetool: Stop test corrupting tinfoil class base-files: Drop localhost.localdomain from hosts file pybootchartui: Fix python syntax issue pybootchart: Fix extents handling to account for cpu/io/mem pressure changes xdg-utils: Add a patch for CVE-2020-27748 xdg-utils: Fix CVE number Robert Andersson (1): go-crosssdk: avoid host contamination by GOCACHE Robert Joslyn (2): curl: Backport CVE fixes curl: Fix CVE-2022-43551 and CVE-2022-43552 Robert Yang (1): bitbake: fetch/git: Fix local clone url to make it work with repo Rodolfo Quesada Zumbado (1): tar: CVE-2022-48303 Romuald JEANNE (1): image_types: fix vname var init in multiubi_mkfs() function Romuald Jeanne (1): image_types: fix multiubi var init Ross Burton (48): libx11: apply the fix for CVE-2022-3554 xserver-xorg: ignore CVE-2022-3553 as it is XQuartz-specific xserver-xorg: backport fixes for CVE-2022-3550 and CVE-2022-3551 tiff: fix a number of CVEs qemu: backport the fix for CVE-2022-3165 pango: upgrade 1.50.9 -> 1.50.10 zlib: do out-of-tree builds zlib: upgrade 1.2.12 -> 1.2.13 bitbake: fetch2/git: don't set core.fsyncobjectfiles=0 pixman: backport fix for CVE-2022-44638 sudo: backport fix for CVE-2022-43995 sanity: check for GNU tar specifically expat: upgrade to 2.5.0 oeqa/runtime/dnf: rewrite test_dnf_installroot_usrmerge insane: add codeload.github.com to src-uri-bad check linux-firmware: don't put the firmware into the sysroot lib/buildstats: fix parsing of trees with reduced_proc_pressure directories combo-layer: remove unused import combo-layer: dont use bb.utils.rename combo-layer: add sync-revs command libepoxy: remove upstreamed patch cve-update-db-native: show IP on failure pango: upgrade 1.50.11 -> 1.50.12 oeqa/selftest/debuginfod: improve testcase curl: don't enable debug builds bitbake: bb/utils: include SSL certificate paths in export_proxies ppp: backport fix for CVE-2022-4603 quilt: fix intermittent failure in faildiff.test spirv-headers/spirv-tools: set correct branch name quilt: use upstreamed faildiff.test fix git: ignore CVE-2022-41953 buildtools-tarball: set pkg-config search path sdkext/cases/devtool: pass a logger to HTTPService httpserver: add error handler that write to the logger less: backport the fix for CVE-2022-46663 lib/buildstats: handle tasks that never finished cml1: remove redundant addtask shadow: ignore CVE-2016-15024 vim: add missing pkgconfig inherit vim: upgrade to 9.0.1403 vim: set modified-by to the recipe MAINTAINER meson: remove obsolete RPATH stripping patch lib/resulttool: fix typo breaking resulttool log --ptest scripts/lib/buildstats: handle top-level build_stats not being complete tzdata: upgrade to 2023c oeqa/runtime: clean up deprecated backslash expansion xserver-xorg: backport fix for CVE-2023-1393 screen: backport fix for CVE-2023-24626 Ryan Eatmon (1): go: Update reproducibility patch to fix panic errors Sakib Sajal (2): go: update 1.19.2 -> 1.19.3 git: upgrade 2.37.5 -> 2.37.6 Sandeep Gundlupet Raju (3): libdrm: Remove libdrm-kms package kernel-fitimage: Adjust order of dtb/dtbo files kernel-fitimage: Allow user to select dtb when multiple dtb exists Saul Wold (2): at: Change when files are copied busybox: Fix depmod patch Sean Anderson (3): uboot-sign: Fix using wrong KEY_REQ_ARGS kernel: Clear SYSROOT_DIRS instead of replacing sysroot_stage_all kernel-fitimage: Use KERNEL_OUTPUT_DIR where appropriate Sergei Zhmylev (2): wic: honor the SOURCE_DATE_EPOCH in case of updated fstab wic: make ext2/3/4 images reproducible Siddharth (1): harfbuzz: Security fix for CVE-2023-25193 Siddharth Doshi (3): openssl: Upgrade 3.0.7 -> 3.0.8 epiphany: Security fix for CVE-2023-26081 openssl: Security fix for CVE-2023-0464, CVE-2023-0465, CVE-2023-0466 Soumya (1): shadow: Fix can not print full login timeout message Steve Sakoman (8): poky.conf: bump version for 4.1.1 Revert "sudo: backport fix for CVE-2022-43995" poky.conf: bump version for 4.1.2 poky.conf: Update SANITY_TESTED_DISTROS to match autobuilder system-requirements.rst: Add Fedora 36, AlmaLinux 8.7 & 9.1, and OpenSUSE 15.4 to list of supported distros poky.conf: bump version for 4.1.3 poky.conf: bump version for 4.1.4 build-appliance-image: Update to langdale head revision Sudip Mukherjee (1): libgit2: update license information Teoh Jay Shen (1): vim: Upgrade 9.0.0598 -> 9.0.0614 Thomas Perrot (1): xserver-xorg: move some recommended dependencies in required Thomas Roos (1): devtool: fix devtool finish when gitmodules file is empty Tim Orling (7): vim: upgrade 9.0.0614 -> 9.0.0820 python3-mako: upgrade 1.2.2 -> 1.2.3 mirrors.bbclass: update CPAN_MIRROR bitbake: toaster: fixtures/README: django 1.8 -> 3.2 bitbake: toaster: fixtures/gen_fixtures.py: update branches bitbake: toaster: Add refreshed oe-core and poky fixtures cracklib: update github branch to 'main' Tobias Hagelborn (2): sstate.bbclass: Fetch non-existing local .sig files if needed lib/oe/gpg_sign.py: Avoid race when creating .sig files in detach_sign Tom Hochstein (2): meson: Fix wrapper handling of implicit setup command oeqa/sdk: Improve Meson test Trevor Woerner (3): cups: use BUILDROOT instead of DESTDIR cups: check PACKAGECONFIG for pam feature cups: add/fix web interface packaging Ulrich Ölmann (4): recipe_sanity: fix old override syntax lsof: fix old override syntax update-alternatives: fix typos kernel-yocto: fix kernel-meta data detection Vincent Davis Jr (1): linux-firmware: package amdgpu firmware Vivek Kumbhar (1): openssl: fix CVE-2022-3996 double locking leads to denial of service Vyacheslav Yurkov (1): overlayfs: Allow not used mount points Wang Mingyu (26): bind: upgrade 9.18.7 -> 9.18.8 inetutils: upgrade 2.3 -> 2.4 socat: upgrade 1.7.4.3 -> 1.7.4.4 libxcrypt: upgrade 4.4.28 -> 4.4.30 xwayland: upgrade 22.1.4 -> 22.1.5 sysstat: upgrade 12.6.0 -> 12.6.1 mobile-broadband-provider-info: upgrade 20220725 -> 20221107 libsdl2: upgrade 2.24.1 -> 2.24.2 mesa: upgrade 22.2.2 -> 22.2.3 babeltrace: upgrade 1.5.8 -> 1.5.11 iso-codes: upgrade 4.11.0 -> 4.12.0 bind: upgrade 9.18.8 -> 9.18.9 libxcrypt-compat: upgrade 4.4.30 -> 4.4.33 mpfr: upgrade 4.1.0 -> 4.1.1 libpng: upgrade 1.6.38 -> 1.6.39 help2man: upgrade 1.49.2 -> 1.49.3 gstreamer1.0: upgrade 1.20.4 -> 1.20.5 bind: upgrade 9.18.9 -> 9.18.10 libjpeg-turbo: upgrade 2.1.5 -> 2.1.5.1 xwayland: upgrade 22.1.7 -> 22.1.8 iso-codes: upgrade 4.12.0 -> 4.13.0 libmicrohttpd: upgrade 0.9.75 -> 0.9.76 lua: Fix install conflict when enable multilib. vala: Fix install conflict when enable multilib. dhcpcd: Fix install conflict when enable multilib. xcb-proto: Fix install conflict when enable multilib. Xiangyu Chen (7): sudo: upgrade 1.9.11p3 -> 1.9.12p1 grub: backport patches to fix CVE-2022-28736 openssh: remove RRECOMMENDS to rng-tools for sshd package grub2: backport patch to fix CVE-2022-2601 CVE-2022-3775 numactl: skip test case when target platform doesn't have 2 CPU node dhcpcd: fix dhcpcd start failure on qemuppc64 sudo: update 1.9.13p2 -> 1.9.13p3 Zoltan Boszormenyi (1): piglit: Fix build time dependency ciarancourtney (1): wic: swap partitions are not added to fstab leimaohui (1): libpng: Enable NEON for aarch64 to enensure consistency with arm32. pgowda (1): binutils: Add patch to fix CVE-2022-4285 wangmy (13): meson: upgrade 0.63.2 -> 0.63.3 mtools: upgrade 4.0.40 -> 4.0.41 ifupdown: upgrade 0.8.37 -> 0.8.39 gnutls: upgrade 3.7.7 -> 3.7.8 libcap: upgrade 2.65 -> 2.66 libical: upgrade 3.0.14 -> 3.0.15 numactl: upgrade 2.0.15 -> 2.0.16 wpebackend-fdo: upgrade 1.12.1 -> 1.14.0 libksba: upgrade 1.6.0 -> 1.6.2 libsdl2: upgrade 2.24.0 -> 2.24.1 lttng-ust: upgrade 2.13.4 -> 2.13.5 lighttpd: upgrade 1.4.66 -> 1.4.67 dbus: upgrade 1.14.0 -> 1.14.4 meta-security: 2aa48e6f4e..a4562b1912: Anton Antonov (2): Flush caches after OEQA tests Fix PACKAGECONFIG check in Parsec OEQA tests Armin Kuster (2): packagegroup-security-tpm2: restore pkgs removed earlier Revert "meta-parsec/layer.conf: Insert addpylib declaration" Peter Hoyes (1): meta-parsec/layer.conf: Insert addpylib declaration meta-raspberrypi: 722c51647c..8e3cbfa598: Andrei Gherzan (2): ci: Bump actions/checkout to v3 ci: Fix dco-check job with newer git versions Florin Sarbu (1): udev-rules-rpi: Use 99-com.rules directly from upstream Martin Jansa (1): raspberrypi4-64: drop DEFAULTTUNE assignment Sung Gon Kim (1): libcamera: rename bbappend to match any version Signed-off-by: Patrick Williams Change-Id: I394eff2a339089121317b9dfb1a2ff4dfcae3339 --- poky/meta/lib/oeqa/core/target/ssh.py | 43 ++++++++++---- poky/meta/lib/oeqa/core/utils/concurrencytest.py | 4 +- poky/meta/lib/oeqa/runtime/cases/apt.py | 4 +- poky/meta/lib/oeqa/runtime/cases/buildcpio.py | 7 ++- poky/meta/lib/oeqa/runtime/cases/dnf.py | 32 ++++------- poky/meta/lib/oeqa/runtime/cases/ping.py | 3 + poky/meta/lib/oeqa/runtime/cases/rpm.py | 23 ++++---- poky/meta/lib/oeqa/runtime/cases/rtc.py | 8 ++- poky/meta/lib/oeqa/runtime/cases/systemd.py | 2 +- poky/meta/lib/oeqa/runtime/context.py | 4 +- poky/meta/lib/oeqa/sdk/cases/buildepoxy.py | 2 +- poky/meta/lib/oeqa/sdkext/cases/devtool.py | 2 +- poky/meta/lib/oeqa/selftest/cases/cve_check.py | 19 ++++++ poky/meta/lib/oeqa/selftest/cases/debuginfod.py | 67 +++++++++++++++++++--- poky/meta/lib/oeqa/selftest/cases/devtool.py | 5 +- poky/meta/lib/oeqa/selftest/cases/externalsrc.py | 44 ++++++++++++++ poky/meta/lib/oeqa/selftest/cases/lic_checksum.py | 2 + poky/meta/lib/oeqa/selftest/cases/locales.py | 45 +++++++++++++++ poky/meta/lib/oeqa/selftest/cases/package.py | 7 +++ poky/meta/lib/oeqa/selftest/cases/prservice.py | 2 +- poky/meta/lib/oeqa/selftest/cases/recipetool.py | 5 +- poky/meta/lib/oeqa/selftest/cases/reproducible.py | 10 +++- .../lib/oeqa/selftest/cases/resulttooltests.py | 2 +- poky/meta/lib/oeqa/selftest/cases/runqemu.py | 16 ++++-- poky/meta/lib/oeqa/selftest/cases/runtime_test.py | 5 +- poky/meta/lib/oeqa/selftest/cases/tinfoil.py | 14 +++++ poky/meta/lib/oeqa/selftest/context.py | 20 +++++-- poky/meta/lib/oeqa/targetcontrol.py | 8 +-- poky/meta/lib/oeqa/utils/commands.py | 6 +- poky/meta/lib/oeqa/utils/dump.py | 23 +++++++- poky/meta/lib/oeqa/utils/httpserver.py | 6 ++ poky/meta/lib/oeqa/utils/qemurunner.py | 24 +++++--- 32 files changed, 361 insertions(+), 103 deletions(-) create mode 100644 poky/meta/lib/oeqa/selftest/cases/externalsrc.py create mode 100644 poky/meta/lib/oeqa/selftest/cases/locales.py (limited to 'poky/meta/lib/oeqa') diff --git a/poky/meta/lib/oeqa/core/target/ssh.py b/poky/meta/lib/oeqa/core/target/ssh.py index f956a7744f..4ab0cddb43 100644 --- a/poky/meta/lib/oeqa/core/target/ssh.py +++ b/poky/meta/lib/oeqa/core/target/ssh.py @@ -34,6 +34,8 @@ class OESSHTarget(OETarget): self.timeout = timeout self.user = user ssh_options = [ + '-o', 'ServerAliveCountMax=2', + '-o', 'ServerAliveInterval=30', '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-o', 'LogLevel=ERROR' @@ -224,27 +226,33 @@ def SSHCall(command, logger, timeout=None, **opts): def run(): nonlocal output nonlocal process + output_raw = b'' starttime = time.time() process = subprocess.Popen(command, **options) if timeout: endtime = starttime + timeout eof = False + os.set_blocking(process.stdout.fileno(), False) while time.time() < endtime and not eof: - logger.debug('time: %s, endtime: %s' % (time.time(), endtime)) try: + logger.debug('Waiting for process output: time: %s, endtime: %s' % (time.time(), endtime)) if select.select([process.stdout], [], [], 5)[0] != []: - reader = codecs.getreader('utf-8')(process.stdout, 'ignore') - data = reader.read(1024, 4096) + # wait a bit for more data, tries to avoid reading single characters + time.sleep(0.2) + data = process.stdout.read() if not data: - process.stdout.close() eof = True else: - output += data - logger.debug('Partial data from SSH call: %s' % data) + output_raw += data + # ignore errors to capture as much as possible + logger.debug('Partial data from SSH call:\n%s' % data.decode('utf-8', errors='ignore')) endtime = time.time() + timeout except InterruptedError: + logger.debug('InterruptedError') continue + process.stdout.close() + # process hasn't returned yet if not eof: process.terminate() @@ -252,16 +260,30 @@ def SSHCall(command, logger, timeout=None, **opts): try: process.kill() except OSError: + logger.debug('OSError when killing process') pass endtime = time.time() - starttime lastline = ("\nProcess killed - no output for %d seconds. Total" " running time: %d seconds." % (timeout, endtime)) - logger.debug('Received data from SSH call %s ' % lastline) + logger.debug('Received data from SSH call:\n%s ' % lastline) output += lastline else: - output = process.communicate()[0].decode('utf-8', errors='ignore') - logger.debug('Data from SSH call: %s' % output.rstrip()) + output_raw = process.communicate()[0] + + output = output_raw.decode('utf-8', errors='ignore') + logger.debug('Data from SSH call:\n%s' % output.rstrip()) + + # timout or not, make sure process exits and is not hanging + if process.returncode == None: + try: + process.wait(timeout=5) + except TimeoutExpired: + try: + process.kill() + except OSError: + logger.debug('OSError') + pass options = { "stdout": subprocess.PIPE, @@ -290,4 +312,5 @@ def SSHCall(command, logger, timeout=None, **opts): process.kill() logger.debug('Something went wrong, killing SSH process') raise - return (process.wait(), output.rstrip()) + + return (process.returncode, output.rstrip()) diff --git a/poky/meta/lib/oeqa/core/utils/concurrencytest.py b/poky/meta/lib/oeqa/core/utils/concurrencytest.py index 383479c959..4f77589b00 100644 --- a/poky/meta/lib/oeqa/core/utils/concurrencytest.py +++ b/poky/meta/lib/oeqa/core/utils/concurrencytest.py @@ -59,6 +59,7 @@ class BBThreadsafeForwardingResult(ThreadsafeForwardingResult): self.outputbuf = output self.finalresult = finalresult self.finalresult.buffer = True + self.target = target def _add_result_with_semaphore(self, method, test, *args, **kwargs): self.semaphore.acquire() @@ -67,13 +68,14 @@ class BBThreadsafeForwardingResult(ThreadsafeForwardingResult): self.result.starttime[test.id()] = self._test_start.timestamp() self.result.threadprogress[self.threadnum].append(test.id()) totalprogress = sum(len(x) for x in self.result.threadprogress.values()) - self.result.progressinfo[test.id()] = "%s: %s/%s %s/%s (%ss) (%s)" % ( + self.result.progressinfo[test.id()] = "%s: %s/%s %s/%s (%ss) (%s failed) (%s)" % ( self.threadnum, len(self.result.threadprogress[self.threadnum]), self.totalinprocess, totalprogress, self.totaltests, "{0:.2f}".format(time.time()-self._test_start.timestamp()), + self.target.failed_tests, test.id()) finally: self.semaphore.release() diff --git a/poky/meta/lib/oeqa/runtime/cases/apt.py b/poky/meta/lib/oeqa/runtime/cases/apt.py index 4e09374add..8000645843 100644 --- a/poky/meta/lib/oeqa/runtime/cases/apt.py +++ b/poky/meta/lib/oeqa/runtime/cases/apt.py @@ -39,9 +39,9 @@ class AptRepoTest(AptTest): self.target.run('cd %s; echo deb [ allow-insecure=yes ] %s/all ./ > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server)) def setup_source_config_for_package_install_signed(self): - apt_get_source_server = 'http:\/\/%s:%s' % (self.tc.target.server_ip, self.repo_server.port) + apt_get_source_server = 'http://%s:%s' % (self.tc.target.server_ip, self.repo_server.port) apt_get_sourceslist_dir = '/etc/apt/' - self.target.run("cd %s; cp sources.list sources.list.bak; sed -i 's/\[trusted=yes\] http:\/\/bogus_ip:bogus_port/%s/g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server)) + self.target.run("cd %s; cp sources.list sources.list.bak; sed -i 's|\[trusted=yes\] http://bogus_ip:bogus_port|%s|g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server)) def cleanup_source_config_for_package_install(self): apt_get_sourceslist_dir = '/etc/apt/' diff --git a/poky/meta/lib/oeqa/runtime/cases/buildcpio.py b/poky/meta/lib/oeqa/runtime/cases/buildcpio.py index bd3b46d9ef..3728855d24 100644 --- a/poky/meta/lib/oeqa/runtime/cases/buildcpio.py +++ b/poky/meta/lib/oeqa/runtime/cases/buildcpio.py @@ -29,7 +29,10 @@ class BuildCpioTest(OERuntimeTestCase): @OEHasPackage(['autoconf']) def test_cpio(self): self.project.download_archive() - self.project.run_configure('--disable-maintainer-mode', - 'sed -i -e "/char \*program_name/d" src/global.c;') + self.project.run_configure('--disable-maintainer-mode') + # This sed is needed until + # https://git.savannah.gnu.org/cgit/cpio.git/commit/src/global.c?id=641d3f489cf6238bb916368d4ba0d9325a235afb + # is in a release. + self.project._run(r'sed -i -e "/char \*program_name/d" %s/src/global.c' % self.project.targetdir) self.project.run_make() self.project.run_install() diff --git a/poky/meta/lib/oeqa/runtime/cases/dnf.py b/poky/meta/lib/oeqa/runtime/cases/dnf.py index 410d456bdf..3ccb18ce83 100644 --- a/poky/meta/lib/oeqa/runtime/cases/dnf.py +++ b/poky/meta/lib/oeqa/runtime/cases/dnf.py @@ -147,29 +147,21 @@ class DnfRepoTest(DnfTest): rootpath = '/home/root/chroot/test' #Copy necessary files to avoid errors with not yet installed tools on #installroot directory. - self.target.run('mkdir -p %s/etc' % rootpath, 1500) - self.target.run('mkdir -p %s/usr/bin %s/usr/sbin' % (rootpath, rootpath), 1500) - self.target.run('ln -sf -r %s/usr/bin %s/bin' % (rootpath, rootpath), 1500) - self.target.run('ln -sf -r %s/usr/sbin %s/sbin' % (rootpath, rootpath), 1500) - self.target.run('mkdir -p %s/dev' % rootpath, 1500) + self.target.run('mkdir -p %s/etc' % rootpath) + self.target.run('mkdir -p %s/usr/bin %s/usr/sbin' % (rootpath, rootpath)) + self.target.run('ln -sf usr/bin %s/bin' % (rootpath)) + self.target.run('ln -sf usr/sbin %s/sbin' % (rootpath)) + self.target.run('mkdir -p %s/dev' % rootpath) #Handle different architectures lib dirs - self.target.run('mkdir -p %s/usr/lib' % rootpath, 1500) - self.target.run('mkdir -p %s/usr/libx32' % rootpath, 1500) - self.target.run('mkdir -p %s/usr/lib64' % rootpath, 1500) - self.target.run('cp /lib/libtinfo.so.5 %s/usr/lib' % rootpath, 1500) - self.target.run('cp /libx32/libtinfo.so.5 %s/usr/libx32' % rootpath, 1500) - self.target.run('cp /lib64/libtinfo.so.5 %s/usr/lib64' % rootpath, 1500) - self.target.run('ln -sf -r %s/lib %s/usr/lib' % (rootpath,rootpath), 1500) - self.target.run('ln -sf -r %s/libx32 %s/usr/libx32' % (rootpath,rootpath), 1500) - self.target.run('ln -sf -r %s/lib64 %s/usr/lib64' % (rootpath,rootpath), 1500) - self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500) - self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500) - self.target.run('cp /bin/sh %s/bin' % rootpath, 1500) - self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500) + self.target.run("for l in /lib*; do mkdir -p %s/usr/$l; ln -s usr/$l %s/$l; done" % (rootpath, rootpath)) + self.target.run('cp -r /etc/rpm %s/etc' % rootpath) + self.target.run('cp -r /etc/dnf %s/etc' % rootpath) + self.target.run('cp /bin/busybox %s/bin/sh' % rootpath) + self.target.run('mount -o bind /dev %s/dev/' % rootpath) self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox' % rootpath) - status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500) + status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath) self.assertEqual(0, status, output) - status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500) + status, output = self.target.run('test -e %s/bin/busybox' % rootpath) self.assertEqual(0, status, output) @OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache']) diff --git a/poky/meta/lib/oeqa/runtime/cases/ping.py b/poky/meta/lib/oeqa/runtime/cases/ping.py index 967b44175f..f72460e7f3 100644 --- a/poky/meta/lib/oeqa/runtime/cases/ping.py +++ b/poky/meta/lib/oeqa/runtime/cases/ping.py @@ -5,6 +5,7 @@ # from subprocess import Popen, PIPE +from time import sleep from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.oetimeout import OETimeout @@ -16,6 +17,7 @@ class PingTest(OERuntimeTestCase): def test_ping(self): output = '' count = 0 + self.assertNotEqual(len(self.target.ip), 0, msg="No target IP address set") try: while count < 5: cmd = 'ping -c 1 %s' % self.target.ip @@ -25,6 +27,7 @@ class PingTest(OERuntimeTestCase): count += 1 else: count = 0 + sleep(1) except OEQATimeoutError: self.fail("Ping timeout error for address %s, count %s, output: %s" % (self.target.ip, count, output)) msg = ('Expected 5 consecutive, got %d.\n' diff --git a/poky/meta/lib/oeqa/runtime/cases/rpm.py b/poky/meta/lib/oeqa/runtime/cases/rpm.py index e3cd818b2b..fa86eb0537 100644 --- a/poky/meta/lib/oeqa/runtime/cases/rpm.py +++ b/poky/meta/lib/oeqa/runtime/cases/rpm.py @@ -51,21 +51,20 @@ class RpmBasicTest(OERuntimeTestCase): msg = 'status: %s. Cannot run rpm -qa: %s' % (status, output) self.assertEqual(status, 0, msg=msg) - def check_no_process_for_user(u): - _, output = self.target.run(self.tc.target_cmds['ps']) - if u + ' ' in output: - return False - else: - return True + def wait_for_no_process_for_user(u, timeout = 120): + timeout_at = time.time() + timeout + while time.time() < timeout_at: + _, output = self.target.run(self.tc.target_cmds['ps']) + if u + ' ' not in output: + return + time.sleep(1) + user_pss = [ps for ps in output.split("\n") if u + ' ' in ps] + msg = "There're %s 's process(es) still running: %s".format(u, "\n".join(user_pss)) + assertTrue(True, msg=msg) def unset_up_test_user(u): # ensure no test1 process in running - timeout = time.time() + 30 - while time.time() < timeout: - if check_no_process_for_user(u): - break - else: - time.sleep(1) + wait_for_no_process_for_user(u) status, output = self.target.run('userdel -r %s' % u) msg = 'Failed to erase user: %s' % output self.assertTrue(status == 0, msg=msg) diff --git a/poky/meta/lib/oeqa/runtime/cases/rtc.py b/poky/meta/lib/oeqa/runtime/cases/rtc.py index b2159b1134..6e45c5db4f 100644 --- a/poky/meta/lib/oeqa/runtime/cases/rtc.py +++ b/poky/meta/lib/oeqa/runtime/cases/rtc.py @@ -5,6 +5,7 @@ # from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.data import skipIfFeature from oeqa.runtime.decorator.package import OEHasPackage import re @@ -21,12 +22,14 @@ class RTCTest(OERuntimeTestCase): self.logger.debug('Starting systemd-timesyncd daemon') self.target.run('systemctl enable --now --runtime systemd-timesyncd') + @skipIfFeature('read-only-rootfs', + 'Test does not work with read-only-rootfs in IMAGE_FEATURES') @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['coreutils', 'busybox']) def test_rtc(self): (status, output) = self.target.run('hwclock -r') self.assertEqual(status, 0, msg='Failed to get RTC time, output: %s' % output) - + (status, current_datetime) = self.target.run('date +"%m%d%H%M%Y"') self.assertEqual(status, 0, msg='Failed to get system current date & time, output: %s' % current_datetime) @@ -37,7 +40,6 @@ class RTCTest(OERuntimeTestCase): (status, output) = self.target.run('date %s' % current_datetime) self.assertEqual(status, 0, msg='Failed to reset system date & time, output: %s' % output) - + (status, output) = self.target.run('hwclock -w') self.assertEqual(status, 0, msg='Failed to reset RTC time, output: %s' % output) - diff --git a/poky/meta/lib/oeqa/runtime/cases/systemd.py b/poky/meta/lib/oeqa/runtime/cases/systemd.py index 720b4b517a..37f295492d 100644 --- a/poky/meta/lib/oeqa/runtime/cases/systemd.py +++ b/poky/meta/lib/oeqa/runtime/cases/systemd.py @@ -154,7 +154,7 @@ class SystemdJournalTests(SystemdTest): """ # The expression chain that uniquely identifies the time boot message. - expr_items=['Startup finished', 'kernel', 'userspace','\.$'] + expr_items=['Startup finished', 'kernel', 'userspace', r'\.$'] try: output = self.journalctl(args='-o cat --reverse') except AssertionError: diff --git a/poky/meta/lib/oeqa/runtime/context.py b/poky/meta/lib/oeqa/runtime/context.py index 8092dd0bae..0c5d1869ab 100644 --- a/poky/meta/lib/oeqa/runtime/context.py +++ b/poky/meta/lib/oeqa/runtime/context.py @@ -67,11 +67,11 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): % self.default_target_type) runtime_group.add_argument('--target-ip', action='store', default=self.default_target_ip, - help="IP address of device under test, default: %s" \ + help="IP address and optionally ssh port (default 22) of device under test, for example '192.168.0.7:22'. Default: %s" \ % self.default_target_ip) runtime_group.add_argument('--server-ip', action='store', default=self.default_target_ip, - help="IP address of device under test, default: %s" \ + help="IP address of the test host from test target machine, default: %s" \ % self.default_server_ip) runtime_group.add_argument('--host-dumper-dir', action='store', diff --git a/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py b/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py index ee515be188..147ee3e0ee 100644 --- a/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py +++ b/poky/meta/lib/oeqa/sdk/cases/buildepoxy.py @@ -35,7 +35,7 @@ class EpoxyTest(OESDKTestCase): self.assertTrue(os.path.isdir(dirs["source"])) os.makedirs(dirs["build"]) - log = self._run("meson -Degl=no -Dglx=no -Dx11=false {build} {source}".format(**dirs)) + log = self._run("meson --warnlevel 1 -Degl=no -Dglx=no -Dx11=false {build} {source}".format(**dirs)) # Check that Meson thinks we're doing a cross build and not a native self.assertIn("Build type: cross build", log) self._run("ninja -C {build} -v".format(**dirs)) diff --git a/poky/meta/lib/oeqa/sdkext/cases/devtool.py b/poky/meta/lib/oeqa/sdkext/cases/devtool.py index a5c6a76e02..5ffb732556 100644 --- a/poky/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/poky/meta/lib/oeqa/sdkext/cases/devtool.py @@ -112,7 +112,7 @@ class SdkUpdateTest(OESDKExtTestCase): cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir) subprocess.check_output(cmd, shell=True) - self.http_service = HTTPService(self.publish_dir) + self.http_service = HTTPService(self.publish_dir, logger=self.logger) self.http_service.start() self.http_url = "http://127.0.0.1:%d" % self.http_service.port diff --git a/poky/meta/lib/oeqa/selftest/cases/cve_check.py b/poky/meta/lib/oeqa/selftest/cases/cve_check.py index ac47af1990..9534c9775c 100644 --- a/poky/meta/lib/oeqa/selftest/cases/cve_check.py +++ b/poky/meta/lib/oeqa/selftest/cases/cve_check.py @@ -54,6 +54,25 @@ class CVECheck(OESelftestTestCase): self.assertTrue( result ,msg="Failed to compare version with suffix '1.0_patch2' < '1.0_patch3'") + def test_convert_cve_version(self): + from oe.cve_check import convert_cve_version + + # Default format + self.assertEqual(convert_cve_version("8.3"), "8.3") + self.assertEqual(convert_cve_version(""), "") + + # OpenSSL format version + self.assertEqual(convert_cve_version("1.1.1t"), "1.1.1t") + + # OpenSSH format + self.assertEqual(convert_cve_version("8.3_p1"), "8.3p1") + self.assertEqual(convert_cve_version("8.3_p22"), "8.3p22") + + # Linux kernel format + self.assertEqual(convert_cve_version("6.2_rc8"), "6.2-rc8") + self.assertEqual(convert_cve_version("6.2_rc31"), "6.2-rc31") + + def test_recipe_report_json(self): config = """ INHERIT += "cve-check" diff --git a/poky/meta/lib/oeqa/selftest/cases/debuginfod.py b/poky/meta/lib/oeqa/selftest/cases/debuginfod.py index 3c40119282..37f51760fb 100644 --- a/poky/meta/lib/oeqa/selftest/cases/debuginfod.py +++ b/poky/meta/lib/oeqa/selftest/cases/debuginfod.py @@ -12,6 +12,36 @@ from oeqa.utils.commands import bitbake, get_bb_var, runqemu class Debuginfod(OESelftestTestCase): + + def wait_for_debuginfod(self, port): + """ + debuginfod takes time to scan the packages and requesting too early may + result in a test failure if the right packages haven't been scanned yet. + + Request the metrics endpoint periodically and wait for there to be no + busy scanning threads. + + Returns True if debuginfod is ready, False if we timed out + """ + import time, urllib + + # Wait a minute + countdown = 6 + delay = 10 + + while countdown: + time.sleep(delay) + try: + with urllib.request.urlopen("http://localhost:%d/metrics" % port) as f: + lines = f.read().decode("ascii").splitlines() + if "thread_busy{role=\"scan\"} 0" in lines: + return True + except urllib.error.URLError as e: + self.logger.error(e) + countdown -= 1 + return False + + def test_debuginfod(self): self.write_config( """ @@ -25,29 +55,50 @@ CORE_IMAGE_EXTRA_INSTALL += "elfutils" cmd = [ os.path.join(native_sysroot, "usr", "bin", "debuginfod"), "--verbose", + # In-memory database, this is a one-shot test "--database=:memory:", + # Don't use all the host cores + "--concurrency=8", + "--connection-pool=8", + # Disable rescanning, this is a one-shot test + "--rescan-time=0", + "--groom-time=0", get_bb_var("DEPLOY_DIR"), ] - for format in get_bb_var("PACKAGE_CLASSES").split(): - if format == "package_deb": - cmd.append("--scan-deb-dir") - elif format == "package_ipk": - cmd.append("--scan-deb-dir") - elif format == "package_rpm": - cmd.append("--scan-rpm-dir") + + format = get_bb_var("PACKAGE_CLASSES").split()[0] + if format == "package_deb": + cmd.append("--scan-deb-dir") + elif format == "package_ipk": + cmd.append("--scan-deb-dir") + elif format == "package_rpm": + cmd.append("--scan-rpm-dir") + else: + self.fail("Unknown package class %s" % format) + # Find a free port with socketserver.TCPServer(("localhost", 0), None) as s: port = s.server_address[1] cmd.append("--port=%d" % port) try: - debuginfod = subprocess.Popen(cmd) + # Remove DEBUGINFOD_URLS from the environment so we don't try + # looking in the distro debuginfod + env = os.environ.copy() + if "DEBUGINFOD_URLS" in env: + del env["DEBUGINFOD_URLS"] + + self.logger.info(f"Starting server {cmd}") + debuginfod = subprocess.Popen(cmd, env=env) with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: + self.assertTrue(self.wait_for_debuginfod(port)) + cmd = ( "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/debuginfod" % (qemu.server_ip, port) ) + self.logger.info(f"Starting client {cmd}") status, output = qemu.run_serial(cmd) # This should be more comprehensive self.assertIn("/.cache/debuginfod_client/", output) diff --git a/poky/meta/lib/oeqa/selftest/cases/devtool.py b/poky/meta/lib/oeqa/selftest/cases/devtool.py index 142932e12f..877d77d488 100644 --- a/poky/meta/lib/oeqa/selftest/cases/devtool.py +++ b/poky/meta/lib/oeqa/selftest/cases/devtool.py @@ -276,6 +276,7 @@ class DevtoolBase(DevtoolTestCase): cls.sstate_conf = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n' % cls.original_sstate) + cls.sstate_conf += ('BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"\n') @classmethod def tearDownClass(cls): @@ -954,7 +955,7 @@ class DevtoolUpdateTests(DevtoolBase): def test_devtool_update_recipe_git(self): # Check preconditions - testrecipe = 'mtd-utils' + testrecipe = 'mtd-utils-selftest' bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe) recipefile = bb_vars['FILE'] src_uri = bb_vars['SRC_URI'] @@ -1075,7 +1076,7 @@ class DevtoolUpdateTests(DevtoolBase): def test_devtool_update_recipe_append_git(self): # Check preconditions - testrecipe = 'mtd-utils' + testrecipe = 'mtd-utils-selftest' bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe) recipefile = bb_vars['FILE'] src_uri = bb_vars['SRC_URI'] diff --git a/poky/meta/lib/oeqa/selftest/cases/externalsrc.py b/poky/meta/lib/oeqa/selftest/cases/externalsrc.py new file mode 100644 index 0000000000..1d800dc82c --- /dev/null +++ b/poky/meta/lib/oeqa/selftest/cases/externalsrc.py @@ -0,0 +1,44 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +import os +import shutil +import tempfile + +from oeqa.selftest.case import OESelftestTestCase +from oeqa.utils.commands import get_bb_var, runCmd + +class ExternalSrc(OESelftestTestCase): + # test that srctree_hash_files does not crash + # we should be actually checking do_compile[file-checksums] but oeqa currently does not support it + # so we check only that a recipe with externalsrc can be parsed + def test_externalsrc_srctree_hash_files(self): + test_recipe = "git-submodule-test" + git_url = "git://git.yoctoproject.org/git-submodule-test" + externalsrc_dir = tempfile.TemporaryDirectory(prefix="externalsrc").name + + self.write_config( + """ +INHERIT += "externalsrc" +EXTERNALSRC:pn-%s = "%s" +""" % (test_recipe, externalsrc_dir) + ) + + # test with git without submodules + runCmd('git clone %s %s' % (git_url, externalsrc_dir)) + os.unlink(externalsrc_dir + "/.gitmodules") + open(".gitmodules", 'w').close() # local file .gitmodules in cwd should not affect externalsrc parsing + self.assertEqual(get_bb_var("S", test_recipe), externalsrc_dir, msg = "S does not equal to EXTERNALSRC") + os.unlink(".gitmodules") + + # test with git with submodules + runCmd('git checkout .gitmodules', cwd=externalsrc_dir) + runCmd('git submodule update --init --recursive', cwd=externalsrc_dir) + self.assertEqual(get_bb_var("S", test_recipe), externalsrc_dir, msg = "S does not equal to EXTERNALSRC") + + # test without git + shutil.rmtree(os.path.join(externalsrc_dir, ".git")) + self.assertEqual(get_bb_var("S", test_recipe), externalsrc_dir, msg = "S does not equal to EXTERNALSRC") diff --git a/poky/meta/lib/oeqa/selftest/cases/lic_checksum.py b/poky/meta/lib/oeqa/selftest/cases/lic_checksum.py index 5897a396d9..2d0b805b90 100644 --- a/poky/meta/lib/oeqa/selftest/cases/lic_checksum.py +++ b/poky/meta/lib/oeqa/selftest/cases/lic_checksum.py @@ -28,6 +28,7 @@ LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" """ % (urllib.parse.quote(lic_path), urllib.parse.quote(lic_path))) result = bitbake(bitbake_cmd) + self.delete_recipeinc('emptytest') # Verify that changing a license file that has an absolute path causes @@ -53,5 +54,6 @@ SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" f.write("data") result = bitbake(bitbake_cmd, ignore_status=True) + self.delete_recipeinc('emptytest') if error_msg not in result.output: raise AssertionError(result.output) diff --git a/poky/meta/lib/oeqa/selftest/cases/locales.py b/poky/meta/lib/oeqa/selftest/cases/locales.py new file mode 100644 index 0000000000..433991abf9 --- /dev/null +++ b/poky/meta/lib/oeqa/selftest/cases/locales.py @@ -0,0 +1,45 @@ +# +# SPDX-License-Identifier: MIT +# + +from oeqa.selftest.case import OESelftestTestCase +from oeqa.core.decorator import OETestTag +from oeqa.utils.commands import bitbake, runqemu + +class LocalesTest(OESelftestTestCase): + + @OETestTag("runqemu") + def test_locales_on(self): + """ + Summary: Test the locales are generated + Expected: 1. Check the locale exist in the locale-archive + 2. Check the locale exist for the glibc + 3. Check the locale can be generated + Product: oe-core + Author: Louis Rannou + AutomatedBy: Louis Rannou + """ + + features = [] + features.append('EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password allow-root-login"') + features.append('IMAGE_INSTALL:append = " glibc-utils localedef"') + features.append('GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fr_FR.UTF-8"') + features.append('IMAGE_LINGUAS:append = " en-us fr-fr"') + features.append('ENABLE_BINARY_LOCALE_GENERATION = "1"') + self.write_config("\n".join(features)) + + # Build a core-image-minimal + bitbake('core-image-minimal') + + with runqemu("core-image-minimal", ssh=False, runqemuparams='nographic') as qemu: + cmd = "locale -a" + status, output = qemu.run_serial(cmd) + # output must includes fr_FR or fr_FR.UTF-8 + self.assertEqual(status, 1, msg='locale test command failed: output: %s' % output) + self.assertIn("fr_FR", output, msg='locale -a test failed: output: %s' % output) + + cmd = "localedef --list-archive -v" + status, output = qemu.run_serial(cmd) + # output must includes fr_FR.utf8 + self.assertEqual(status, 1, msg='localedef test command failed: output: %s' % output) + self.assertIn("fr_FR.utf8", output, msg='localedef test failed: output: %s' % output) diff --git a/poky/meta/lib/oeqa/selftest/cases/package.py b/poky/meta/lib/oeqa/selftest/cases/package.py index 2d1b48a15d..cc09a1442d 100644 --- a/poky/meta/lib/oeqa/selftest/cases/package.py +++ b/poky/meta/lib/oeqa/selftest/cases/package.py @@ -89,6 +89,13 @@ class VersionOrdering(OESelftestTestCase): self.assertEqual(status - 100, sort, "%s %s (%d) failed" % (ver1, ver2, sort)) class PackageTests(OESelftestTestCase): + # Verify that a recipe cannot rename a package into an existing one + def test_package_name_conflict(self): + res = bitbake("packagenameconflict", ignore_status=True) + self.assertNotEqual(res.status, 0) + err = "package name already exists" + self.assertTrue(err in res.output) + # Verify that a recipe which sets up hardlink files has those preserved into split packages # Also test file sparseness is preserved def test_preserve_sparse_hardlinks(self): diff --git a/poky/meta/lib/oeqa/selftest/cases/prservice.py b/poky/meta/lib/oeqa/selftest/cases/prservice.py index cb95503c2c..9fe3b80a31 100644 --- a/poky/meta/lib/oeqa/selftest/cases/prservice.py +++ b/poky/meta/lib/oeqa/selftest/cases/prservice.py @@ -77,7 +77,7 @@ class BitbakePrTests(OESelftestTestCase): exported_db_path = os.path.join(self.builddir, 'export.inc') export_result = runCmd("bitbake-prserv-tool export %s" % exported_db_path, ignore_status=True) self.assertEqual(export_result.status, 0, msg="PR Service database export failed: %s" % export_result.output) - self.assertTrue(os.path.exists(exported_db_path)) + self.assertTrue(os.path.exists(exported_db_path), msg="%s didn't exist, tool output %s" % (exported_db_path, export_result.output)) if replace_current_db: current_db_path = os.path.join(get_bb_var('PERSISTENT_DIR'), 'prserv.sqlite3') diff --git a/poky/meta/lib/oeqa/selftest/cases/recipetool.py b/poky/meta/lib/oeqa/selftest/cases/recipetool.py index 25b06cdcf0..b193f0f5c8 100644 --- a/poky/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/poky/meta/lib/oeqa/selftest/cases/recipetool.py @@ -581,7 +581,10 @@ class RecipetoolTests(RecipetoolBase): commonlicdir = get_bb_var('COMMON_LICENSE_DIR') - d = bb.tinfoil.TinfoilDataStoreConnector + class DataConnectorCopy(bb.tinfoil.TinfoilDataStoreConnector): + pass + + d = DataConnectorCopy d.getVar = Mock(return_value=commonlicdir) srctree = tempfile.mkdtemp(prefix='recipetoolqa') diff --git a/poky/meta/lib/oeqa/selftest/cases/reproducible.py b/poky/meta/lib/oeqa/selftest/cases/reproducible.py index f4dd779842..cd7aa8aafa 100644 --- a/poky/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/poky/meta/lib/oeqa/selftest/cases/reproducible.py @@ -292,9 +292,13 @@ class ReproducibleTests(OESelftestTestCase): self.copy_file(d.reference, '/'.join([save_dir, 'packages-excluded', strip_topdir(d.reference)])) self.copy_file(d.test, '/'.join([save_dir, 'packages-excluded', strip_topdir(d.test)])) - if result.missing or result.different: - fails.append("The following %s packages are missing or different and not in exclusion list: %s" % - (c, '\n'.join(r.test for r in (result.missing + result.different)))) + if result.different: + fails.append("The following %s packages are different and not in exclusion list:\n%s" % + (c, '\n'.join(r.test for r in (result.different)))) + + if result.missing and len(self.sstate_targets) == 0: + fails.append("The following %s packages are missing and not in exclusion list:\n%s" % + (c, '\n'.join(r.test for r in (result.missing)))) # Clean up empty directories if self.save_results: diff --git a/poky/meta/lib/oeqa/selftest/cases/resulttooltests.py b/poky/meta/lib/oeqa/selftest/cases/resulttooltests.py index c2e76f1a44..efdfd98af3 100644 --- a/poky/meta/lib/oeqa/selftest/cases/resulttooltests.py +++ b/poky/meta/lib/oeqa/selftest/cases/resulttooltests.py @@ -71,7 +71,7 @@ class ResultToolTests(OESelftestTestCase): self.assertTrue('target_result1' in results['runtime/mydistro/qemux86/image'], msg="Pair not correct:%s" % results) self.assertTrue('target_result3' in results['runtime/mydistro/qemux86-64/image'], msg="Pair not correct:%s" % results) - def test_regrresion_can_get_regression_result(self): + def test_regression_can_get_regression_result(self): base_result_data = {'result': {'test1': {'status': 'PASSED'}, 'test2': {'status': 'PASSED'}, 'test3': {'status': 'FAILED'}, diff --git a/poky/meta/lib/oeqa/selftest/cases/runqemu.py b/poky/meta/lib/oeqa/selftest/cases/runqemu.py index c1d277a095..d3eeee3b41 100644 --- a/poky/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/poky/meta/lib/oeqa/selftest/cases/runqemu.py @@ -4,13 +4,13 @@ # SPDX-License-Identifier: MIT # +import os import re -import tempfile import time import oe.types from oeqa.core.decorator import OETestTag from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd +from oeqa.utils.commands import bitbake, runqemu, get_bb_var @OETestTag("runqemu") class RunqemuTests(OESelftestTestCase): @@ -57,14 +57,16 @@ SYSLINUX_TIMEOUT = "10" cmd = "%s %s ext4" % (self.cmd_common, self.machine) with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: with open(qemu.qemurunnerlog) as f: - self.assertIn('rootfs.ext4', f.read(), "Failed: %s" % cmd) + regexp = r'\nROOTFS: .*\.ext4]\n' + self.assertRegex(f.read(), regexp, "Failed to find '%s' in '%s' after running '%s'" % (regexp, qemu.qemurunnerlog, cmd)) def test_boot_machine_iso(self): """Test runqemu machine iso""" cmd = "%s %s iso" % (self.cmd_common, self.machine) with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: with open(qemu.qemurunnerlog) as f: - self.assertIn('media=cdrom', f.read(), "Failed: %s" % cmd) + text_in = 'media=cdrom' + self.assertIn(text_in, f.read(), "Failed to find '%s' in '%s' after running '%s'" % (text_in, qemu.qemurunnerlog, cmd)) def test_boot_recipe_image(self): """Test runqemu recipe-image""" @@ -79,14 +81,16 @@ SYSLINUX_TIMEOUT = "10" cmd = "%s %s wic.vmdk" % (self.cmd_common, self.recipe) with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: with open(qemu.qemurunnerlog) as f: - self.assertIn('format=vmdk', f.read(), "Failed: %s" % cmd) + text_in = 'format=vmdk' + self.assertIn(text_in, f.read(), "Failed to find '%s' in '%s' after running '%s'" % (text_in, qemu.qemurunnerlog, cmd)) def test_boot_recipe_image_vdi(self): """Test runqemu recipe-image vdi""" cmd = "%s %s wic.vdi" % (self.cmd_common, self.recipe) with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: with open(qemu.qemurunnerlog) as f: - self.assertIn('format=vdi', f.read(), "Failed: %s" % cmd) + text_in = 'format=vdi' + self.assertIn(text_in, f.read(), "Failed to find '%s' in '%s' after running '%s'" % (text_in, qemu.qemurunnerlog, cmd)) def test_boot_deploy(self): """Test runqemu deploy_dir_image""" diff --git a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py index fe83b248f3..533b5d7453 100644 --- a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -254,7 +254,8 @@ class TestImage(OESelftestTestCase): import subprocess, os distro = oe.lsb.distro_identifier() - if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04'] or distro.startswith('almalinux')): + if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04'] or + distro.startswith('almalinux') or distro.startswith('rocky')): self.skipTest('virgl headless cannot be tested with %s' %(distro)) render_hint = """If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one suitable for mesa llvmpipe software renderer.""" @@ -265,7 +266,7 @@ class TestImage(OESelftestTestCase): except FileNotFoundError: self.fail("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint)) try: - dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True) + dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True) except subprocess.CalledProcessError as e: self.fail("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.") qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native') diff --git a/poky/meta/lib/oeqa/selftest/cases/tinfoil.py b/poky/meta/lib/oeqa/selftest/cases/tinfoil.py index 0a66615fd1..dd13c20402 100644 --- a/poky/meta/lib/oeqa/selftest/cases/tinfoil.py +++ b/poky/meta/lib/oeqa/selftest/cases/tinfoil.py @@ -66,6 +66,20 @@ class TinfoilTests(OESelftestTestCase): localdata.setVar('PN', 'hello') self.assertEqual('hello', localdata.getVar('BPN')) + # The config_data API tp parse_recipe_file is used by: + # layerindex-web layerindex/update_layer.py + def test_parse_recipe_custom_data(self): + with bb.tinfoil.Tinfoil() as tinfoil: + tinfoil.prepare(config_only=False, quiet=2) + localdata = bb.data.createCopy(tinfoil.config_data) + localdata.setVar("TESTVAR", "testval") + testrecipe = 'mdadm' + best = tinfoil.find_best_provider(testrecipe) + if not best: + self.fail('Unable to find recipe providing %s' % testrecipe) + rd = tinfoil.parse_recipe_file(best[3], config_data=localdata) + self.assertEqual("testval", rd.getVar('TESTVAR')) + def test_list_recipes(self): with bb.tinfoil.Tinfoil() as tinfoil: tinfoil.prepare(config_only=False, quiet=2) diff --git a/poky/meta/lib/oeqa/selftest/context.py b/poky/meta/lib/oeqa/selftest/context.py index 78c7a467e2..0e3244a1c5 100644 --- a/poky/meta/lib/oeqa/selftest/context.py +++ b/poky/meta/lib/oeqa/selftest/context.py @@ -86,17 +86,27 @@ class OESelftestTestContext(OETestContext): oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") oe.path.copytree(selftestdir, newselftestdir) + subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) + + # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow + subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) + + # Relative paths in BBLAYERS only works when the new build dir share the same ascending node + if self.newbuilddir: + bblayers = subprocess.check_output("bitbake-getvar --value BBLAYERS | tail -1", cwd=builddir, shell=True, text=True) + if '..' in bblayers: + bblayers_abspath = [os.path.abspath(path) for path in bblayers.split()] + with open("%s/conf/bblayers.conf" % newbuilddir, "a") as f: + newbblayers = "# new bblayers to be used by selftest in the new build dir '%s'\n" % newbuilddir + newbblayers += 'BBLAYERS = "%s"\n' % ' '.join(bblayers_abspath) + f.write(newbblayers) + for e in os.environ: if builddir + "/" in os.environ[e]: os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/") if os.environ[e].endswith(builddir): os.environ[e] = os.environ[e].replace(builddir, newbuilddir) - subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) - - # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow - subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) - os.chdir(newbuilddir) def patch_test(t): diff --git a/poky/meta/lib/oeqa/targetcontrol.py b/poky/meta/lib/oeqa/targetcontrol.py index 1fdff82889..f5f2ce2f12 100644 --- a/poky/meta/lib/oeqa/targetcontrol.py +++ b/poky/meta/lib/oeqa/targetcontrol.py @@ -7,18 +7,14 @@ # This module is used by testimage.bbclass for setting up and controlling a target machine. import os -import shutil import subprocess import bb -import traceback -import sys import logging from oeqa.utils.sshcontrol import SSHControl from oeqa.utils.qemurunner import QemuRunner from oeqa.utils.qemutinyrunner import QemuTinyRunner from oeqa.utils.dump import TargetDumper from oeqa.utils.dump import MonitorDumper -from oeqa.controllers.testtargetloader import TestTargetLoader from abc import ABCMeta, abstractmethod class BaseTarget(object, metaclass=ABCMeta): @@ -145,7 +141,7 @@ class QemuTarget(BaseTarget): boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT")), use_kvm = use_kvm, dump_dir = dump_dir, - dump_host_cmds = d.getVar("testimage_dump_host"), + dump_host_cmds = dump_host_cmds, logger = logger, tmpfsdir = d.getVar("RUNQEMU_TMPFS_DIR"), serial_ports = len(d.getVar("SERIAL_CONSOLES").split())) @@ -205,7 +201,7 @@ class QemuTarget(BaseTarget): self.server_ip = self.runner.server_ip self.connection = SSHControl(ip=self.ip, logfile=self.sshlog) else: - raise RuntimError("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) + raise RuntimeError("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) def run_serial(self, command, timeout=60): return self.runner.run_serial(command, timeout=timeout) diff --git a/poky/meta/lib/oeqa/utils/commands.py b/poky/meta/lib/oeqa/utils/commands.py index f733fcdf3c..473aa38d41 100644 --- a/poky/meta/lib/oeqa/utils/commands.py +++ b/poky/meta/lib/oeqa/utils/commands.py @@ -8,11 +8,8 @@ # This module is mainly used by scripts/oe-selftest and modules under meta/oeqa/selftest # It provides a class and methods for running commands on the host in a convienent way for tests. - - import os import sys -import signal import subprocess import threading import time @@ -21,6 +18,7 @@ from oeqa.utils import CommandError from oeqa.utils import ftools import re import contextlib +import errno # Export test doesn't require bb try: import bb @@ -85,7 +83,7 @@ class Command(object): except OSError as ex: # It's not an error when the command does not consume all # of our data. subprocess.communicate() also ignores that. - if ex.errno != EPIPE: + if ex.errno != errno.EPIPE: raise # We write in a separate thread because then we can read diff --git a/poky/meta/lib/oeqa/utils/dump.py b/poky/meta/lib/oeqa/utils/dump.py index bcee03b576..d420b497f9 100644 --- a/poky/meta/lib/oeqa/utils/dump.py +++ b/poky/meta/lib/oeqa/utils/dump.py @@ -93,37 +93,55 @@ class HostDumper(BaseDumper): self._write_dump(cmd.split()[0], result.output) class TargetDumper(BaseDumper): - """ Class to get dumps from target, it only works with QemuRunner """ + """ Class to get dumps from target, it only works with QemuRunner. + Will give up permanently after 5 errors from running commands over + serial console. This helps to end testing when target is really dead, hanging + or unresponsive. + """ def __init__(self, cmds, parent_dir, runner): super(TargetDumper, self).__init__(cmds, parent_dir) self.runner = runner + self.errors = 0 def dump_target(self, dump_dir=""): + if self.errors >= 5: + print("Too many errors when dumping data from target, assuming it is dead! Will not dump data anymore!") + return if dump_dir: self.dump_dir = dump_dir for cmd in self.cmds: # We can continue with the testing if serial commands fail try: (status, output) = self.runner.run_serial(cmd) + if status == 0: + self.errors = self.errors + 1 self._write_dump(cmd.split()[0], output) except: + self.errors = self.errors + 1 print("Tried to dump info from target but " "serial console failed") print("Failed CMD: %s" % (cmd)) class MonitorDumper(BaseDumper): - """ Class to get dumps via the Qemu Monitor, it only works with QemuRunner """ + """ Class to get dumps via the Qemu Monitor, it only works with QemuRunner + Will stop completely if there are more than 5 errors when dumping monitor data. + This helps to end testing when target is really dead, hanging or unresponsive. + """ def __init__(self, cmds, parent_dir, runner): super(MonitorDumper, self).__init__(cmds, parent_dir) self.runner = runner + self.errors = 0 def dump_monitor(self, dump_dir=""): if self.runner is None: return if dump_dir: self.dump_dir = dump_dir + if self.errors >= 5: + print("Too many errors when dumping data from qemu monitor, assuming it is dead! Will not dump data anymore!") + return for cmd in self.cmds: cmd_name = cmd.split()[0] try: @@ -137,4 +155,5 @@ class MonitorDumper(BaseDumper): output = self.runner.run_monitor(cmd_name) self._write_dump(cmd_name, output) except Exception as e: + self.errors = self.errors + 1 print("Failed to dump QMP CMD: %s with\nException: %s" % (cmd_name, e)) diff --git a/poky/meta/lib/oeqa/utils/httpserver.py b/poky/meta/lib/oeqa/utils/httpserver.py index 8ce1dd42f4..5860b0a383 100644 --- a/poky/meta/lib/oeqa/utils/httpserver.py +++ b/poky/meta/lib/oeqa/utils/httpserver.py @@ -40,6 +40,12 @@ class HTTPService(object): self.port = self.server.server_port self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir, self.logger]) + def handle_error(self, request, client_address): + import traceback + exception = traceback.format_exc() + self.logger.warn("Exception when handling %s: %s" % (request, exception)) + self.server.handle_error = handle_error + # The signal handler from testimage.bbclass can cause deadlocks here # if the HTTPServer is terminated before it can restore the standard #signal behaviour diff --git a/poky/meta/lib/oeqa/utils/qemurunner.py b/poky/meta/lib/oeqa/utils/qemurunner.py index 6a85f57e49..a455b3b389 100644 --- a/poky/meta/lib/oeqa/utils/qemurunner.py +++ b/poky/meta/lib/oeqa/utils/qemurunner.py @@ -198,7 +198,7 @@ class QemuRunner: qmp_file = "." + next(tempfile._get_candidate_names()) qmp_param = ' -S -qmp unix:./%s,server,wait' % (qmp_file) qmp_port = self.tmpdir + "/" + qmp_file - # Create a second socket connection for debugging use, + # Create a second socket connection for debugging use, # note this will NOT cause qemu to block waiting for the connection qmp_file2 = "." + next(tempfile._get_candidate_names()) qmp_param += ' -qmp unix:./%s,server,nowait' % (qmp_file2) @@ -346,6 +346,8 @@ class QemuRunner: return False try: + # set timeout value for all QMP calls + self.qmp.settimeout(self.runqemutime) self.qmp.connect() connect_time = time.time() self.logger.info("QMP connected to QEMU at %s and took %s seconds" % @@ -463,6 +465,8 @@ class QemuRunner: socklist.remove(self.server_socket) self.logger.debug("Connection from %s:%s" % addr) else: + # try to avoid reading only a single character at a time + time.sleep(0.1) data = data + sock.recv(1024) if data: bootlog += data @@ -507,7 +511,7 @@ class QemuRunner: (status, output) = self.run_serial(self.boot_patterns['send_login_user'], raw=True, timeout=120) if re.search(self.boot_patterns['search_login_succeeded'], output): self.logged = True - self.logger.debug("Logged as root in serial console") + self.logger.debug("Logged in as %s in serial console" % self.boot_patterns['send_login_user'].replace("\n", "")) if netconf: # configure guest networking cmd = "ifconfig eth0 %s netmask %s up\n" % (self.ip, self.netmask) @@ -518,7 +522,7 @@ class QemuRunner: self.logger.debug("Couldn't configure guest networking") else: self.logger.warning("Couldn't login into serial console" - " as root using blank password") + " as %s using blank password" % self.boot_patterns['send_login_user'].replace("\n", "")) self.logger.warning("The output:\n%s" % output) except: self.logger.warning("Serial console failed while trying to login") @@ -538,10 +542,13 @@ class QemuRunner: except OSError as e: if e.errno != errno.ESRCH: raise - endtime = time.time() + self.runqemutime - while self.runqemu.poll() is None and time.time() < endtime: - time.sleep(1) - if self.runqemu.poll() is None: + try: + outs, errs = self.runqemu.communicate(timeout = self.runqemutime) + if outs: + self.logger.info("Output from runqemu:\n%s", outs.decode("utf-8")) + if errs: + self.logger.info("Stderr from runqemu:\n%s", errs.decode("utf-8")) + except TimeoutExpired: self.logger.debug("Sending SIGKILL to runqemu") os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL) if not self.runqemu.stdout.closed: @@ -618,6 +625,7 @@ class QemuRunner: def run_monitor(self, command, args=None, timeout=60): if hasattr(self, 'qmp') and self.qmp: + self.qmp.settimeout(timeout) if args is not None: return self.qmp.cmd(command, args) else: @@ -645,6 +653,8 @@ class QemuRunner: except InterruptedError: continue if sread: + # try to avoid reading single character at a time + time.sleep(0.1) answer = self.server_socket.recv(1024) if answer: data += answer.decode('utf-8') -- cgit v1.2.3