From patchwork Mon Jul 25 14:05:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593274 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2708964mab; Mon, 25 Jul 2022 07:08:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t14qUkKrduQMB1zUVcBQWz4hIhTFPhz448MgkG+w8CoE7oRsVRG5s70T3qpBjf0bhWRRJh X-Received: by 2002:a05:620a:410c:b0:6b2:82d8:dcae with SMTP id j12-20020a05620a410c00b006b282d8dcaemr8985680qko.259.1658758129371; Mon, 25 Jul 2022 07:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758129; cv=none; d=google.com; s=arc-20160816; b=l5Wbt5jFZCABV9lBTg1WAldVqe3lb/sN4cuwRJhKnyej+MbW/5zgGtP14unI/ovv4h 6Mxi7GJmrAPjtbYmIIQr6sJZ+E7/FliYWjpzwlQ0p/ENlJ+PRASTk9uvKNSvlrm2T2f+ 6YYNS71pq11FJvzReeIdaEAuoyxle1v3wJp8NOj7ep0AeuGJaJSbYbWT9XcOuyAR0Ymc GVF6oBI2f6H6XQq7Asdqjo6mCndTV3TcaxXTBqIYdf+pQr4VCofUIcoAkvodkHOg47ac 0kFCReBs9uti/4q5sOoyA5NYZQ6cX+s5T1oHZU7PUEhfKBIEXU6NpdFjOVZKvBz3Cs2d sBYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mJGYXebDFqVvPg297f4Cmt4PgS14GK+fT+8gV4JsznE=; b=s2LsvZhMCdvVluI6TXOeni+UEW8nEXd+rQt9Ggox1cUlgCp+jcKQXHIAQsq5zp/BXW BhAk847mhR3iww8NabpuInvR497dyF3sg8ARP0HO8VeZqHafiz/9XQmG8PoOYElsYhos yPRmVTewKQnll1sCQUdXxvMoMGPwsHhjZPDml3N8wsoKPMEtNjrbFthe3VTgdfi3Q48V oo9NxCFfLfZlsMVUbAyix2nmyehhpVpIHl/nMvyC83rRgLxOk0mrlGy1YChVDRE/dD6l cIyRzyK7eg60WxJLKGdLGRt/hMa64IZ7cC5olLNedoXkHyTVCN9t9XMCI9H35XhGrxuG cs4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4eOiBex; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c13-20020ad45aed000000b00473f86097a9si8989077qvh.368.2022.07.25.07.08.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:08:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4eOiBex; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFylM-00023N-UO for patch@linaro.org; Mon, 25 Jul 2022 10:08:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyi9-0000rc-Rx for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:31 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi5-0000Da-3t for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:28 -0400 Received: by mail-wr1-x42e.google.com with SMTP id g2so8064804wru.3 for ; Mon, 25 Jul 2022 07:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mJGYXebDFqVvPg297f4Cmt4PgS14GK+fT+8gV4JsznE=; b=d4eOiBex87nNlOa/cP3KcK6P0qQBML1UWguh2twF3FhSrmUV/zXBKf86ooY+p854/9 up98r5OQ37Ku/ghZPH3xiI5TrsDY671Sey5iSDLjzKIdKh463lfUSR2NQq8m32c3xC3F tMGE+m6ubxfyNUbEx8RrlN9B+EbJyaRGeXFjvLZ//lMcnuUelt4EtjRQPTBuJnymjlgz QjuDGgjDEq9iutQlEQNU8WpnAzGXb4IujwLYy43wg29+XJtzsd8bHaaZqT7UwcM++kuR fadWea6bDjWvx8wKAiDnEYsXgGbFXCsj8uypZbocgc//AJWaOQJEs33GtZrurdm0JLx9 WXRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mJGYXebDFqVvPg297f4Cmt4PgS14GK+fT+8gV4JsznE=; b=6yUCgeNMnkHL8e8d9/7R5GY7t08RdpAP6Z6WADvEiCwY+408yhCTQS1HU/ooyPcW4O Z0RZzqzDsUO3dOvQvZHMoqA/o1opUZVeXfve528MMkkGjRKPRVkPqcMHACz/WItJocP6 JnDtEIto+5MqKKVg5ayeZqnxU5q66JDeZrQBYOH7ozqVGAp+zqeaxUJap7rxj1p7l+eC JMAdlVOdUkNVu5bfdX/5gndVPMn1meQoMlo65VjhdpYfYM3zInT/ZJEmXRWdH5jF/5WH jlxkr/3u9OIZiHHLddxj1gT6S5X8ZsMaUOocANSJDI6DIP2TeaAPZASTWUDWFoSWZClC 3e4Q== X-Gm-Message-State: AJIora+bLDVHJurDovXZhPqbhVgQSLtxf8OGnNPHfr9TpRwLJnv3BHeJ Lq07Q/Fa2FeFu3OpA6tf44rSVg== X-Received: by 2002:a5d:5847:0:b0:21d:b75e:12d0 with SMTP id i7-20020a5d5847000000b0021db75e12d0mr7604049wrf.208.1658757922987; Mon, 25 Jul 2022 07:05:22 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id f7-20020a1c3807000000b003a3080eacb9sm14742584wma.24.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AAF311FFB8; Mon, 25 Jul 2022 15:05:20 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 01/13] tests: refresh to latest libvirt-ci module Date: Mon, 25 Jul 2022 15:05:08 +0100 Message-Id: <20220725140520.515340-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé Notable changes: - libvirt-ci source tree was re-arranged, so the script we run now lives in a bin/ sub-dir - opensuse 15.2 is replaced by opensuse 15.3 - libslirp is temporarily dropped on opensuse as the libslirp-version.h is broken https://bugzilla.opensuse.org/show_bug.cgi?id=1201551 - The incorrectly named python3-virtualenv module was changed to python3-venv, but most distros don't need any package as 'venv' is a standard part of python - glibc-static was renamed to libc-static, to reflect fact that it isn't going to be glibc on all distros - The cmocka/json-c deps that were manually added to the centos dockerfile and are now consistently added to all targets Acked-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Message-Id: <20220722130431.2319019-2-berrange@redhat.com> Signed-off-by: Alex Bennée Acked-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/cirrus/freebsd-12.vars | 3 +-- .gitlab-ci.d/cirrus/freebsd-13.vars | 3 +-- .gitlab-ci.d/cirrus/macos-11.vars | 4 ++-- tests/docker/dockerfiles/alpine.docker | 4 +++- tests/docker/dockerfiles/centos8.docker | 6 +++--- tests/docker/dockerfiles/debian-amd64.docker | 2 ++ tests/docker/dockerfiles/debian-arm64-cross.docker | 2 ++ tests/docker/dockerfiles/debian-armel-cross.docker | 2 ++ tests/docker/dockerfiles/debian-armhf-cross.docker | 2 ++ tests/docker/dockerfiles/debian-mips64el-cross.docker | 2 ++ tests/docker/dockerfiles/debian-mipsel-cross.docker | 2 ++ tests/docker/dockerfiles/debian-ppc64el-cross.docker | 2 ++ tests/docker/dockerfiles/debian-s390x-cross.docker | 2 ++ tests/docker/dockerfiles/fedora.docker | 3 ++- tests/docker/dockerfiles/opensuse-leap.docker | 7 ++++--- tests/docker/dockerfiles/ubuntu2004.docker | 2 ++ tests/lcitool/libvirt-ci | 2 +- tests/lcitool/projects/qemu.yml | 6 ++++-- tests/lcitool/refresh | 4 ++-- 19 files changed, 41 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars index f59263731f..8fa5a320e9 100644 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ b/.gitlab-ci.d/cirrus/freebsd-12.vars @@ -1,5 +1,4 @@ # THIS FILE WAS AUTO-GENERATED -# ... and then edited to fix py39, pending proper lcitool update. # # $ lcitool variables freebsd-12 qemu # @@ -12,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-virtualenv py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars index 40fc961398..8ed7e33a77 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -1,5 +1,4 @@ # THIS FILE WAS AUTO-GENERATED -# ... and then edited to fix py39, pending proper lcitool update. # # $ lcitool variables freebsd-13 qemu # @@ -12,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-virtualenv py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/macos-11.vars b/.gitlab-ci.d/cirrus/macos-11.vars index cfe9181fd4..bec6e862d4 100644 --- a/.gitlab-ci.d/cirrus/macos-11.vars +++ b/.gitlab-ci.d/cirrus/macos-11.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='brew' PIP3='/usr/local/bin/pip3' -PKGS='bash bc bzip2 capstone ccache ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd' -PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv' +PKGS='bash bc bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd' +PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme' PYTHON='/usr/local/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index 3f4c0f95cb..806cb19f17 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -21,6 +21,7 @@ RUN apk update && \ cdrkit \ ceph-dev \ clang \ + cmocka-dev \ ctags \ curl-dev \ cyrus-sasl-dev \ @@ -39,6 +40,7 @@ RUN apk update && \ glib-static \ gnutls-dev \ gtk+3.0-dev \ + json-c-dev \ libaio-dev \ libbpf-dev \ libcap-ng-dev \ @@ -64,6 +66,7 @@ RUN apk update && \ mesa-dev \ meson \ multipath-tools \ + musl-dev \ ncurses-dev \ ndctl-dev \ net-tools \ @@ -81,7 +84,6 @@ RUN apk update && \ py3-pip \ py3-sphinx \ py3-sphinx_rtd_theme \ - py3-virtualenv \ py3-yaml \ python3 \ rpm2cpio \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index 10618bfa83..3c29883332 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -6,11 +6,12 @@ FROM quay.io/centos/centos:stream8 -RUN dnf update -y && \ +RUN dnf distro-sync -y && \ dnf install 'dnf-command(config-manager)' -y && \ dnf config-manager --set-enabled -y powertools && \ dnf install -y centos-release-advanced-virtualization && \ dnf install -y epel-release && \ + dnf install -y epel-next-release && \ dnf install -y \ SDL2-devel \ alsa-lib-devel \ @@ -45,6 +46,7 @@ RUN dnf update -y && \ gtk3-devel \ hostname \ jemalloc-devel \ + json-c-devel \ libaio-devel \ libasan \ libattr-devel \ @@ -60,7 +62,6 @@ RUN dnf update -y && \ libgcrypt-devel \ libiscsi-devel \ libjpeg-devel \ - json-c-devel \ libnfs-devel \ libpmem-devel \ libpng-devel \ @@ -99,7 +100,6 @@ RUN dnf update -y && \ python3-pip \ python3-sphinx \ python3-sphinx_rtd_theme \ - python3-virtualenv \ rdma-core-devel \ rpm \ sed \ diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker index 503e282802..8d78ba2484 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -41,6 +41,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev \ libcap-ng-dev \ libcapstone-dev \ + libcmocka-dev \ libcurl4-gnutls-dev \ libdaxctl-dev \ libdrm-dev \ @@ -59,6 +60,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev \ libjemalloc-dev \ libjpeg62-turbo-dev \ + libjson-c-dev \ liblttng-ust-dev \ liblzo2-dev \ libncursesw5-dev \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker index b60426834c..b7ba2c527f 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev:arm64 \ libcap-ng-dev:arm64 \ libcapstone-dev:arm64 \ + libcmocka-dev:arm64 \ libcurl4-gnutls-dev:arm64 \ libdaxctl-dev:arm64 \ libdrm-dev:arm64 \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev:arm64 \ libjemalloc-dev:arm64 \ libjpeg62-turbo-dev:arm64 \ + libjson-c-dev:arm64 \ liblttng-ust-dev:arm64 \ liblzo2-dev:arm64 \ libncursesw5-dev:arm64 \ diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker index a6153e5a83..9b1778261e 100644 --- a/tests/docker/dockerfiles/debian-armel-cross.docker +++ b/tests/docker/dockerfiles/debian-armel-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev:armel \ libcap-ng-dev:armel \ libcapstone-dev:armel \ + libcmocka-dev:armel \ libcurl4-gnutls-dev:armel \ libdaxctl-dev:armel \ libdrm-dev:armel \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev:armel \ libjemalloc-dev:armel \ libjpeg62-turbo-dev:armel \ + libjson-c-dev:armel \ liblttng-ust-dev:armel \ liblzo2-dev:armel \ libncursesw5-dev:armel \ diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker index a2ebce96f8..addbc9a793 100644 --- a/tests/docker/dockerfiles/debian-armhf-cross.docker +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev:armhf \ libcap-ng-dev:armhf \ libcapstone-dev:armhf \ + libcmocka-dev:armhf \ libcurl4-gnutls-dev:armhf \ libdaxctl-dev:armhf \ libdrm-dev:armhf \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev:armhf \ libjemalloc-dev:armhf \ libjpeg62-turbo-dev:armhf \ + libjson-c-dev:armhf \ liblttng-ust-dev:armhf \ liblzo2-dev:armhf \ libncursesw5-dev:armhf \ diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker index b02dcb7fd9..1bb7d8e184 100644 --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker @@ -83,6 +83,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev:mips64el \ libcap-ng-dev:mips64el \ libcapstone-dev:mips64el \ + libcmocka-dev:mips64el \ libcurl4-gnutls-dev:mips64el \ libdaxctl-dev:mips64el \ libdrm-dev:mips64el \ @@ -101,6 +102,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev:mips64el \ libjemalloc-dev:mips64el \ libjpeg62-turbo-dev:mips64el \ + libjson-c-dev:mips64el \ liblttng-ust-dev:mips64el \ liblzo2-dev:mips64el \ libncursesw5-dev:mips64el \ diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker index b6d99ae324..a94b459b23 100644 --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker @@ -83,6 +83,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev:mipsel \ libcap-ng-dev:mipsel \ libcapstone-dev:mipsel \ + libcmocka-dev:mipsel \ libcurl4-gnutls-dev:mipsel \ libdaxctl-dev:mipsel \ libdrm-dev:mipsel \ @@ -101,6 +102,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev:mipsel \ libjemalloc-dev:mipsel \ libjpeg62-turbo-dev:mipsel \ + libjson-c-dev:mipsel \ liblttng-ust-dev:mipsel \ liblzo2-dev:mipsel \ libncursesw5-dev:mipsel \ diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker index bcf04bc90b..c641fd5d0e 100644 --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev:ppc64el \ libcap-ng-dev:ppc64el \ libcapstone-dev:ppc64el \ + libcmocka-dev:ppc64el \ libcurl4-gnutls-dev:ppc64el \ libdaxctl-dev:ppc64el \ libdrm-dev:ppc64el \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev:ppc64el \ libjemalloc-dev:ppc64el \ libjpeg62-turbo-dev:ppc64el \ + libjson-c-dev:ppc64el \ liblttng-ust-dev:ppc64el \ liblzo2-dev:ppc64el \ libncursesw5-dev:ppc64el \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index ff79a2cc4f..c0cbe09e66 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -84,6 +84,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev:s390x \ libcap-ng-dev:s390x \ libcapstone-dev:s390x \ + libcmocka-dev:s390x \ libcurl4-gnutls-dev:s390x \ libdaxctl-dev:s390x \ libdrm-dev:s390x \ @@ -102,6 +103,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev:s390x \ libjemalloc-dev:s390x \ libjpeg62-turbo-dev:s390x \ + libjson-c-dev:s390x \ liblttng-ust-dev:s390x \ liblzo2-dev:s390x \ libncursesw5-dev:s390x \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 2e6a84abfd..b39d311bbc 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -53,12 +53,14 @@ exec "$@"' > /usr/bin/nosync && \ gtk3-devel \ hostname \ jemalloc-devel \ + json-c-devel \ libaio-devel \ libasan \ libattr-devel \ libbpf-devel \ libcacard-devel \ libcap-ng-devel \ + libcmocka-devel \ libcurl-devel \ libdrm-devel \ libepoxy-devel \ @@ -106,7 +108,6 @@ exec "$@"' > /usr/bin/nosync && \ python3-pip \ python3-sphinx \ python3-sphinx_rtd_theme \ - python3-virtualenv \ rdma-core-devel \ rpm \ sed \ diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker index 6f5993d602..047a435ab5 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all opensuse-leap-152 qemu +# $ lcitool dockerfile --layers all opensuse-leap-153 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.opensuse.org/opensuse/leap:15.2 +FROM registry.opensuse.org/opensuse/leap:15.3 RUN zypper update -y && \ zypper install -y \ @@ -44,6 +44,7 @@ RUN zypper update -y && \ libbz2-devel \ libcacard-devel \ libcap-ng-devel \ + libcmocka-devel \ libcurl-devel \ libdrm-devel \ libepoxy-devel \ @@ -53,6 +54,7 @@ RUN zypper update -y && \ libgnutls-devel \ libiscsi-devel \ libjpeg8-devel \ + libjson-c-devel \ libndctl-devel \ libnettle-devel \ libnfs-devel \ @@ -94,7 +96,6 @@ RUN zypper update -y && \ python3-pip \ python3-setuptools \ python3-sphinx_rtd_theme \ - python3-virtualenv \ python3-wheel \ rdma-core-devel \ rpm \ diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker index a3b38884e3..99803b343b 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -40,6 +40,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libcacard-dev \ libcap-ng-dev \ libcapstone-dev \ + libcmocka-dev \ libcurl4-gnutls-dev \ libdaxctl-dev \ libdrm-dev \ @@ -58,6 +59,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libiscsi-dev \ libjemalloc-dev \ libjpeg-turbo8-dev \ + libjson-c-dev \ liblttng-ust-dev \ liblzo2-dev \ libncursesw5-dev \ diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index f83b916d5e..324355cf62 160000 --- a/tests/lcitool/libvirt-ci +++ b/tests/lcitool/libvirt-ci @@ -1 +1 @@ -Subproject commit f83b916d5efa4bd33fbf4b7ea41bf6d535cc63fb +Subproject commit 324355cf62e86fb551408575afb123bac989ac37 diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.yml index d068a7a8de..d9f826f8eb 100644 --- a/tests/lcitool/projects/qemu.yml +++ b/tests/lcitool/projects/qemu.yml @@ -9,6 +9,7 @@ packages: - capstone - ccache - clang + - cmocka - column - ctags - cyrus-sasl @@ -26,15 +27,16 @@ packages: - genisoimage - glib2 - glib2-static - - glibc-static - glusterfs - gnutls - gtk3 - hostname + - json-c - libaio - libattr - libasan - libbpf + - libc-static - libcacard - libcap-ng - libcurl @@ -90,7 +92,7 @@ packages: - python3-pip - python3-sphinx - python3-sphinx-rtd-theme - - python3-virtualenv + - python3-venv - rpm2cpio - sdl2 - sdl2-image diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 5e260f8cd6..2a59150322 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -25,7 +25,7 @@ self_dir = Path(__file__).parent src_dir = self_dir.parent.parent dockerfiles_dir = Path(src_dir, "tests", "docker", "dockerfiles") -lcitool_path = Path(self_dir, "libvirt-ci", "lcitool") +lcitool_path = Path(self_dir, "libvirt-ci", "bin", "lcitool") lcitool_cmd = [lcitool_path, "--data-dir", self_dir] @@ -112,7 +112,7 @@ try: generate_dockerfile("debian-amd64", "debian-11", trailer="".join(debian11_extras)) generate_dockerfile("fedora", "fedora-35") - generate_dockerfile("opensuse-leap", "opensuse-leap-152") + generate_dockerfile("opensuse-leap", "opensuse-leap-153") generate_dockerfile("ubuntu2004", "ubuntu-2004", trailer="".join(ubuntu2004_tsanhack)) From patchwork Mon Jul 25 14:05:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593277 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2712860mab; Mon, 25 Jul 2022 07:12:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vDv4GqG1KHpf42dh6A0lxIMQOfJNQ7PrxtFT0FaoVsbJlzs/no3NJ1Oxp1rpZ3a0o2AHnE X-Received: by 2002:a05:6214:c2a:b0:473:7427:35a7 with SMTP id a10-20020a0562140c2a00b00473742735a7mr10654733qvd.120.1658758365962; Mon, 25 Jul 2022 07:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758365; cv=none; d=google.com; s=arc-20160816; b=FhJDUUuTPvInwcDrIwOxuqE56bkozRC2SEB5YLIcu0iTK9PpGIFbn1wIjbGmq5Wcak 2J0/k2p8qQN17Cg0vgwI++lx7mxM/AUsXOCKaAC9/IfgsOh/5hJ1ZlOdXZgrpY2BjwWH YGYkRU373HGJSjwczuY8ppJsxCGQ60ZfOFN4SsrWs75SXezlFuGOhbFpBvE3tmjurk9m JVu4B1jyPQH/3h99d7BznJeMY6Z9v6xN4SflZKJkS5Enf3ELICf6MiMbV3CT8KKCWCbY Hj6gcLyYp0ICyumGrXE1P994DaqvLHa7VTVZtJi0D5pkAI4wFXFGjIinZtsGm7oXn+hA 56jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bM/w8+B7ncjv5XtvNRo9ixZZ47c0W7NUiHr8jF0XJI4=; b=Bx34y58igs5pwn0/3h4cR+AA7XNkdXJrfM7lXjzeCkixDuxCAr/7/gZqU7L6Ata2MO J3TC1YmDks25b9V5XGlP8esR6j2OV6iqOfRXnXdnK6v4S3slVQV+hthP2zs8safZPeLd TLPhbWLQWZeGRNL+CbN1ixGKoC2dsNWz6MoveBsski1Z0nhe/musYaXS+jEdyt7TZ+Nt QzIdKnwh64aoxkLH8ER7Uhi2ANrTxsRlvFXPoSAFqo26PNDX9XbM4R5jBiA3DwFwvDpq Ry/h4rahWqdJvgTWyCMs/szjl/ggJZ4cEVXL1zNh1g/fv2ec7YKW3U61WWdtgM/xaprJ dY8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZkkkWPrS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u22-20020a05620a455600b006b250f958b5si9004515qkp.464.2022.07.25.07.12.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:12:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZkkkWPrS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFypA-00082M-GA for patch@linaro.org; Mon, 25 Jul 2022 10:12:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyi9-0000re-SA for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:31 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:43602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi6-0000Ei-K8 for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:29 -0400 Received: by mail-wm1-x335.google.com with SMTP id j29-20020a05600c1c1d00b003a2fdafdefbso6431079wms.2 for ; Mon, 25 Jul 2022 07:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bM/w8+B7ncjv5XtvNRo9ixZZ47c0W7NUiHr8jF0XJI4=; b=ZkkkWPrS4rtAqbK9HDEmqIBZXIyIK59VPM/PiMhW0b5EHcpb6e/OqtghYYjNt1MWTo ClppAtYh3Ix7PMFaIF6U1hz/ae/rwqDOT2N/tf2YDG/BBbesLkjmDt6GPxQGwC+MTUqY YIX+oRo/s/huvdAv2ayFL59OXmer3rSaWKqxzzly0SwP7sj/oa6/qA6YRm0mb6KIEZ/l l0YQj/8DvWyE6uGoUto+QlauWQu915Vii5MyBfkHqgz3t34lHCHotXURjfWYZUt897h7 9J+j+XhCj0C4cqwAFPI1NUZI7fgJtasSMdX0RWXDNYYZ24/wwwwxBM+L/JRx5uxCECIE ssFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bM/w8+B7ncjv5XtvNRo9ixZZ47c0W7NUiHr8jF0XJI4=; b=LV8AbgZ3HpuSNB/AMI0KVMKTb4LOCaRwdwYmUgLv3ClsJkyEIb9xZGTDv1aB3InR5P MXvjg942TFgdrbA/NCFaCdn+6AYS301wmaZgrTYPSlXwDYXKwJ2hiHyRrd0sFNZbaAQc bNT5Vxd5qTnAvJ8/Muupp9LH1NAIJipjXZq6TVz0ABdYSypaxIx+JhDmQSgfl/XNs52i Puu5AQm6/g+W64jCFjhPKv00Fro4VeHMXNpsrmBkP6prDifL3R6kzrmZCYb9qa66nteo vRTiwl5Whz+INUo7MrcaDjsQ88h+9mtV2idIwUf9d7ryLbrD+hGwxQNUoE5TXG+a6MNe ocuA== X-Gm-Message-State: AJIora/OaSrhZKL2D1kfkMDmPxkHj10j9fAR39L+DHHY1oz1Qas9kVAC tMrB1pSEoPCbD5z+QjcE7BUGtQ== X-Received: by 2002:a05:600c:148:b0:3a3:2753:e551 with SMTP id w8-20020a05600c014800b003a32753e551mr21396132wmm.131.1658757925036; Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id l37-20020a05600c1d2500b003a33227e49bsm14606414wms.4.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CCEDE1FFBA; Mon, 25 Jul 2022 15:05:20 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 02/13] gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail Date: Mon, 25 Jul 2022 15:05:09 +0100 Message-Id: <20220725140520.515340-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé When tests fail meson just displays a summary and tells you to look at the testlog.txt file for details. The native jobs on shared runners publish testlog.txt as an artifact. For the Cirrus jobs and custom runner jobs this is not currently possible. The best we can do is cat the log contents on failure, to give maintainers a fighting chance of diagnosing the problem. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Message-Id: <20220722130431.2319019-3-berrange@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.d/cirrus/build.yml | 3 ++- .../custom-runners/centos-stream-8-x86_64.yml | 2 ++ .gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml | 2 ++ .gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml | 12 ++++++++++++ .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml | 12 ++++++++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml index c555f5d36e..7ef6af8d33 100644 --- a/.gitlab-ci.d/cirrus/build.yml +++ b/.gitlab-ci.d/cirrus/build.yml @@ -32,5 +32,6 @@ build_task: - $MAKE -j$(sysctl -n hw.ncpu) - for TARGET in $TEST_TARGETS ; do - $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=1 ; + $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; done diff --git a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml index 49aa703f55..068b0c4335 100644 --- a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml +++ b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml @@ -23,6 +23,8 @@ centos-stream-8-x86_64: - mkdir build - cd build - ../scripts/ci/org.centos/stream/8/x86_64/configure + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make -j"$JOBS" - make NINJA=":" check + || { cat meson-logs/testlog.txt; exit 1; } ; - ../scripts/ci/org.centos/stream/8/x86_64/test-avocado diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml index 1998460d06..cbfa9cc164 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch32.yml @@ -19,5 +19,7 @@ ubuntu-20.04-aarch32-all: - mkdir build - cd build - ../configure --cross-prefix=arm-linux-gnueabihf- + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml index 65718a188a..3d878914e7 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml @@ -17,9 +17,12 @@ ubuntu-20.04-aarch64-all-linux-static: - mkdir build - cd build - ../configure --enable-debug --static --disable-system --disable-glusterfs --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; - make --output-sync -j`nproc --ignore=40` check-tcg V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-aarch64-all: needs: [] @@ -38,8 +41,10 @@ ubuntu-20.04-aarch64-all: - mkdir build - cd build - ../configure --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-aarch64-alldbg: needs: [] @@ -54,9 +59,11 @@ ubuntu-20.04-aarch64-alldbg: - mkdir build - cd build - ../configure --enable-debug --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make clean - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-aarch64-clang: needs: [] @@ -75,8 +82,10 @@ ubuntu-20.04-aarch64-clang: - mkdir build - cd build - ../configure --disable-libssh --cc=clang-10 --cxx=clang++-10 --enable-sanitizers + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-aarch64-tci: needs: [] @@ -95,6 +104,7 @@ ubuntu-20.04-aarch64-tci: - mkdir build - cd build - ../configure --disable-libssh --enable-tcg-interpreter + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` ubuntu-20.04-aarch64-notcg: @@ -114,5 +124,7 @@ ubuntu-20.04-aarch64-notcg: - mkdir build - cd build - ../configure --disable-libssh --disable-tcg + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc --ignore=40` - make --output-sync -j`nproc --ignore=40` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml index 03e74c97db..0c835939db 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml @@ -17,9 +17,12 @@ ubuntu-20.04-s390x-all-linux-static: - mkdir build - cd build - ../configure --enable-debug --static --disable-system --disable-glusterfs --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; - make --output-sync -j`nproc` check-tcg V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-s390x-all: needs: [] @@ -35,8 +38,10 @@ ubuntu-20.04-s390x-all: - mkdir build - cd build - ../configure --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-s390x-alldbg: needs: [] @@ -55,9 +60,11 @@ ubuntu-20.04-s390x-alldbg: - mkdir build - cd build - ../configure --enable-debug --disable-libssh + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make clean - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-s390x-clang: needs: [] @@ -76,8 +83,10 @@ ubuntu-20.04-s390x-clang: - mkdir build - cd build - ../configure --disable-libssh --cc=clang --cxx=clang++ --enable-sanitizers + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; ubuntu-20.04-s390x-tci: needs: [] @@ -96,6 +105,7 @@ ubuntu-20.04-s390x-tci: - mkdir build - cd build - ../configure --disable-libssh --enable-tcg-interpreter + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` ubuntu-20.04-s390x-notcg: @@ -115,5 +125,7 @@ ubuntu-20.04-s390x-notcg: - mkdir build - cd build - ../configure --disable-libssh --disable-tcg + || { cat config.log meson-logs/meson-log.txt; exit 1; } - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 + || { cat meson-logs/testlog.txt; exit 1; } ; From patchwork Mon Jul 25 14:05:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593275 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2710202mab; Mon, 25 Jul 2022 07:10:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uBfe/5RKWs1Stm4Vh6wRj7i5CcJ8BRJQmkxroRqFnYO7XtvdWwIpe2sy0E3TdaVywGu82P X-Received: by 2002:ae9:eb8e:0:b0:6b5:bf14:c029 with SMTP id b136-20020ae9eb8e000000b006b5bf14c029mr9348834qkg.712.1658758201478; Mon, 25 Jul 2022 07:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758201; cv=none; d=google.com; s=arc-20160816; b=Ovrpvnmzh9eFr0x/yuJdRtm+6bXkkhGivVQG4Qn0lMnvdw5Q84uFQHR4f1Xeti6lB6 wJZRhZz8qq2hZLNZdYVtEdr7Y/L+fdqwHkuSJdzgAhDPrleVP96eH20pEBswIb6qo/DD u+388g/Y3Bc9T0kBYXsSGB2c0GtBsjHd6KLF+R5xol4/kTIaEFWwlpwPDUlqVrWFx19G cD+xUBPha0D670MWvD8sbzT9/oOGG100rUUfcbvUETDbz8UVqLYFyfP4HC9r+SIDTpxm PXWcSZsFwD3ZR+WFevOptNrapPu45qpP78rKw7p0ELYY783DWtillP/i7pKNr2bOudFR i69w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cuuXQH2wboaX5IPGA3m9AhAnhitniNjGQ5r1hTwm0bY=; b=wYOr4lyM98Xq+M7M0C/RiN5RX97ljia3vITdYZbR7kJ1yPxaaYhnDSR9sztMcIncMz tn6aQxISiVKPsyc//diGx76l/+++TeNXRAAaLIn9/hw3UREb24Bhu/PUUy1mvdfIAxG0 jJhTlPEUVNYcDo0hOi1dvsXaXfRwqpCj9dVrK3b4ZoBLB77KuoEW6zqCtOSTXMMy56zR pRq77saD2pExCVk/yZ5b7IfoUONjSqYIA6YzqVf0N6f1jfn2YzN/0DHfNSUyAuDQm3TM H80LZS9jy8Il4qlSBXkWY2Off4nLhE6gDVe00vX4lpbV8nLeCwtrWbqi9KypMUgVb+EJ BD/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NKZuv0qN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m16-20020a05622a055000b0031ee0ceaf5esi9795136qtx.773.2022.07.25.07.10.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:10:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NKZuv0qN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFymX-0003Hf-0Z for patch@linaro.org; Mon, 25 Jul 2022 10:10:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiB-0000st-SS for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi9-0000FF-IV for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:30 -0400 Received: by mail-wr1-x430.google.com with SMTP id k11so15663607wrx.5 for ; Mon, 25 Jul 2022 07:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cuuXQH2wboaX5IPGA3m9AhAnhitniNjGQ5r1hTwm0bY=; b=NKZuv0qNEGzTKaUIUTmBpxVY44OUXGUntwZsgd7wz/7aQxYVFnSfZO3hrkuiUyK2TB lEItGRSpa4+WbUhClr4ZFZMW5MjGouq3EydCRsm+1YKkam2aCddFwfPmq9cfOGfjEMTv W6i2+Vz/NLWX4711waSi41Cx6iAwWNntx05HaYI4HahZ365XkUICbMQnKjzhiJbNspRz cpoR3tywPRIZquZxMGok718TAnFieNXj3qUQHUH1ZTkKAV5K1klc5s3LCiIwrY8iLRWF g4zBbeL6kjWXkbX2+gr/GH8PHYao/RZhFVhGozbdSIMnkKZtthqaORSR4k4JFHmHs4hC r8MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cuuXQH2wboaX5IPGA3m9AhAnhitniNjGQ5r1hTwm0bY=; b=giC7QMoV+1PYej1BEce++VilB3ny+rLGOm6MLWz6fhqJPCVbKgEXcJgq853i4RssqC tygfeCswuwaKEa4ulgzLaliKixLoUAEQV3U08AuY5/7cCaeVrRK2V3RWfFc6zxt0ru8I OYW5LqKd68rIjIGMORUwBRAJXio3QWhJvETa57WgfgOfAjmi9O8w5wdRcRJhP7pnp76a +OCElo5TrlDZJw9fapvR9WWSmy7L7YzPkflBVqDdWsKmvmSyzWedA2svyaUKzAdm+uRZ y+MVD3tmkFG+Pdly72U7gG9Zb3XCZdVDnZ+NesnAjeBChkBDc8Fu6kHSgVT/D5DtR2iw ZziQ== X-Gm-Message-State: AJIora8PlwaV2B4akFnIILsetFbaVvaGOVgw365srOmrZF5jTaz4Djcd EXaxDrVH/dziD5O94/X8DjxIlA== X-Received: by 2002:a5d:6484:0:b0:21e:8ab7:fbc9 with SMTP id o4-20020a5d6484000000b0021e8ab7fbc9mr3295507wri.316.1658757927898; Mon, 25 Jul 2022 07:05:27 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id q26-20020a056000137a00b0021e0147da47sm11935452wrz.96.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:24 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DCBB51FFBB; Mon, 25 Jul 2022 15:05:20 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 03/13] gitlab: drop 'containers-layer2' stage Date: Mon, 25 Jul 2022 15:05:10 +0100 Message-Id: <20220725140520.515340-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé Since we express dependancies via a 'needs' clause, we don't need to split container builds into separate stages. GitLab happily lets jobs depend on other jobs in the same stage and will run them when possible. Acked-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Message-Id: <20220722130431.2319019-4-berrange@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/container-cross.yml | 24 ++++++++++++------------ .gitlab-ci.d/stages.yml | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml index b7963498a3..505b267542 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -1,20 +1,20 @@ alpha-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-alpha-cross amd64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-amd64-cross amd64-debian-user-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-all-test-cross @@ -65,21 +65,21 @@ hexagon-cross-container: hppa-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-hppa-cross m68k-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-m68k-cross mips64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-mips64-cross @@ -92,7 +92,7 @@ mips64el-debian-cross-container: mips-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-mips-cross @@ -105,7 +105,7 @@ mipsel-debian-cross-container: powerpc-test-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian11-container'] variables: NAME: debian-powerpc-test-cross @@ -127,7 +127,7 @@ riscv64-debian-cross-container: # we can however build TCG tests using a non-sid base riscv64-debian-test-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian11-container'] variables: NAME: debian-riscv64-test-cross @@ -140,21 +140,21 @@ s390x-debian-cross-container: sh4-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-sh4-cross sparc64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-sparc64-cross tricore-debian-cross-container: extends: .container_job_template - stage: containers-layer2 + stage: containers needs: ['amd64-debian10-container'] variables: NAME: debian-tricore-cross diff --git a/.gitlab-ci.d/stages.yml b/.gitlab-ci.d/stages.yml index f50826018d..f92f57a27d 100644 --- a/.gitlab-ci.d/stages.yml +++ b/.gitlab-ci.d/stages.yml @@ -3,6 +3,5 @@ # - test (for test stages, using build artefacts from a build stage) stages: - containers - - containers-layer2 - build - test From patchwork Mon Jul 25 14:05:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593276 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2712396mab; Mon, 25 Jul 2022 07:12:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sJYRT6MfUrMI6jRKMMvu7DpddAphW+io3xSLiQ5yzUJq0cJhzEMV4M7aCfhCOo/F0QWJd1 X-Received: by 2002:a05:6214:21c2:b0:474:500:659d with SMTP id d2-20020a05621421c200b004740500659dmr10726443qvh.11.1658758337233; Mon, 25 Jul 2022 07:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758337; cv=none; d=google.com; s=arc-20160816; b=RLwBMNMOp3BVTRKl6l8S1UHHBQIj7YHZZdW9xXUAlxk1+/6WIWYvrth0RBw1hsXNFG 5pxi4ghuJP65FwC+tkXAjbQuE+BLp353/YXY3zmud5QMRIqzaB2nNRQTSgAeD7XxOJFF qqhePACf8EEiSIpuFUjzh9KSdSkWygLv2PZZzfKFz5bqBO1G06V4OjKjb/aRqZx1zNvE VRz9D6MREobOP0iGDcoZF2dzf7zn5lg82lGlRds89nDpzZ5nJ6dhEgo6Ygv95CK7eS8n UWw7wdOi4x9ipExwBQC3wr5mMgu8baMAgsvq82AeGHrmsumMtjmONxdkToTpXgJpJor6 KnzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mTwSnZFRTEa2KBmATJIqMqf3rBKFb32A5FdFD315qZw=; b=jp9K4JT3DEHFKaQcyzg/jp5ZkbFKacXYD5vaynWe/THT7ObL4Q67XsUYN5O9aS+2ih ri7xUXZW+2te6aa2sEKI5H/ncqcHC9sQ4Ci3+Wo2tJ6I7sCPTsNabitNEdfQC0SP8Hx7 NQp4tmyHHR5GmjWoqLP1ZOWS0HpIR42qY5uOAb92hGVu5TCRYQJ/dQnLpm+LNLrkJlpe VVzkSUP52x3SUURNnM8RAlqm7o7wovJ7NuT+O2Ijs/1BWRyAeiq4DB4oLFHGVUVt0uvp k6OUgObFg+0ibNvr/oVV2ZQTXoW6Yv7Tp4M7lRHgEQHHwyN5MO6XUw9gtjjyihttGn9H ghBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a9pEPQ0B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i187-20020a3786c4000000b006b06216ed36si6726843qkd.691.2022.07.25.07.12.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:12:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a9pEPQ0B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyoi-0006ha-P7 for patch@linaro.org; Mon, 25 Jul 2022 10:12:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiB-0000sy-Su for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:46715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyi8-0000Ey-Uj for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:31 -0400 Received: by mail-wr1-x430.google.com with SMTP id z13so16112310wro.13 for ; Mon, 25 Jul 2022 07:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mTwSnZFRTEa2KBmATJIqMqf3rBKFb32A5FdFD315qZw=; b=a9pEPQ0BccKEbo3o4aw5pE66feGjwsfTdqNxNzwwLJPSeC9cZo2+Du6wCibdlZbkKi SVq/+Yl/ursEQy9wH/n6jccD7olbn05VZAPMj5ILtirMhj11EDb7b1zyWWRbI0U7W4hZ d/PqJt5kTl/899/ACH8ZLOByez327iTf6emrqsYg1JkLy4MwKdPnmpbS2effrEkKGIhN ttMjr9frp5Bw6IUV9H6RTETDWHXRS3rF8W7NzvLOtPcQeKXthyqp1a39OsanU6RNRq74 //6DLkhFEjC79/N2n+C2jpO40pwhqXNCbqhn3jA98Nbz/WvFOyF6C5B/APtt5slAd9J0 Oy4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mTwSnZFRTEa2KBmATJIqMqf3rBKFb32A5FdFD315qZw=; b=nteWqKTm/kNQlYgnAFU3M8nOu9rG76RFy/k//IZEVIwpBHnlKbfQmeR8wFxcES10vF a8/Pjv9xM1+jr+VZHpQK9+utnYiXQr32Duq78ZYHTPPKFI5sOf/dHAu04laCLVALoK6H xTjANjYpjXkF5GTFCaAl8K+2ewg4azcBJm6UNcrAohgAt74CVY3uy6PvdoNoNTUUX454 i5ZlEdJ0HisXsalaGiF/6lLrL9GBII67i+Q2+unEpsyNJIDBDqDnxfxkm24FfEOUG9sb l5gbpyy4XvnSy2uencbtAZyX9LwdM1GZHj28tIMEWgs09Vn0mPEMlRSdj6Scfn6YETDZ 9BJw== X-Gm-Message-State: AJIora+7Bo4CJBNN+FAbtA+1myKOPWQOWTxG85KsuH6a0GhbOdGGaoAq 0pXR80SNKJXxqWUEoivuuf9eHg== X-Received: by 2002:adf:f747:0:b0:21e:8e2a:7cbc with SMTP id z7-20020adff747000000b0021e8e2a7cbcmr2278065wrp.342.1658757927086; Mon, 25 Jul 2022 07:05:27 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id m6-20020a05600c4f4600b003a3442f1229sm10926905wmq.29.2022.07.25.07.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:24 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F3AFB1FFBC; Mon, 25 Jul 2022 15:05:20 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Bin Meng , Thomas Huth , Yonggang Luo , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v1 04/13] .cirrus.yml: Change winsymlinks to 'native' Date: Mon, 25 Jul 2022 15:05:11 +0100 Message-Id: <20220725140520.515340-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng At present winsymlinks is set to 'nativestrict', and its behavior is: a) if native symlinks are enabled and exists, creates as a native Windows symlink; b) else if native symlinks are not enabled or if does not exist, 'ln -s' fails. This causes the following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" Change winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is: a) if native symlinks are enabled, and whether exists or not, creates as a native Windows symlink; b) else if native symlinks are not enabled, and whether exists or not, 'ln -s' creates as a Windows shortcut file. Signed-off-by: Bin Meng Acked-by: Thomas Huth Reviewed-by: Yonggang Luo Message-Id: <20220719161230.766063-1-bmeng.cn@gmail.com> Signed-off-by: Alex Bennée --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 20843a420c..eac39024f2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ windows_msys2_task: memory: 8G env: CIRRUS_SHELL: powershell - MSYS: winsymlinks:nativestrict + MSYS: winsymlinks:native MSYSTEM: MINGW64 MSYS2_URL: https://github.com/msys2/msys2-installer/releases/download/2022-05-03/msys2-base-x86_64-20220503.sfx.exe MSYS2_FINGERPRINT: 0 From patchwork Mon Jul 25 14:05:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593281 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2717041mab; Mon, 25 Jul 2022 07:17:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vty6DAWWDXAKUZvm5NWzK+mcL2xNBZwtU6fIm5GENPrw6x+QRbWVmwoWtJuXV0/5U39+nW X-Received: by 2002:a05:620a:2902:b0:6b6:3fdc:2018 with SMTP id m2-20020a05620a290200b006b63fdc2018mr7418350qkp.190.1658758649940; Mon, 25 Jul 2022 07:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758649; cv=none; d=google.com; s=arc-20160816; b=Ct5X2iBkjWdx/D8VlNMHkXPoWAkHJfyjwxIgZO+RxZ3Bc1QWNGGmq/TtQ5wc7hUhTv UsJJh1queq0EdMjQf1m48bRLxeqdaZ3H6gKQOov8fUBKNGZOFhgIW+Xfaan3E2mNgclR mcqjy9YRt1/w8LRlelQmiT7OrdyDFaQDOGyVQmDeSKp4NN2VkPVY2/ej87CmxYtspaje WpmCo+rPcT+AQaI6RXyvNktrQayEaLBKWG4O5gcgPZcgyj3934THsSJ/H16xI5jBnm1D maas/bLht89gG506apIShilZwex+3vcYu6DKMTXqUTL74Qvq7tvM9erv7CKVkt/3gsb3 Snng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zdxW6z5bLU/Pb6aFUspnYaHiHoxpeGOigvgPyctL6UM=; b=TWI1ZALwOR8RwdZHZObuknOTzbMhsUhfe6P1g9FfM6l2Tb3igif55ZH8MOyKjpDFX0 1XWIhqF0XJZ+18qN5TCNNu1apc24h5OqRSw5bPJBmQwkKbpIYZ09c2/e6dnyTPpR5KPs pRq3HjfTRV+1Dgjg7MNAKyzEaUz/xy/wrt/QPNMwemsF9O8WpS7MvgYMaj/3nmipq3WS 64SS/69N49VVMNJh2PYQx5Cs26wec28D5PsGojcHysWYb8Oljf/QOdy9DqNCOkYpUGLK ldSgoZOvyTEmAr+3XgQPlE1MIFDK+7SB07eg1q2sTgXuABgR4gyv3vCUTAL9yLrO31hv ma9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DScNfJlM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o1-20020a05620a2a0100b006a74751941bsi9748453qkp.442.2022.07.25.07.17.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:17:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DScNfJlM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFytl-0005VD-FG for patch@linaro.org; Mon, 25 Jul 2022 10:17:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiD-0000t5-42 for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiB-0000Da-Ev for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:32 -0400 Received: by mail-wr1-x42e.google.com with SMTP id g2so8065300wru.3 for ; Mon, 25 Jul 2022 07:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zdxW6z5bLU/Pb6aFUspnYaHiHoxpeGOigvgPyctL6UM=; b=DScNfJlMu6LtUIV1XaaONy5cibk46J2G67Fs+3r7nI+uorqtWi0/BrQAMjASrE4v0R NkinlXr8dVc2N31MIZ2tTPaLV4XN0R2GBjt+4apYE/JYKr1fSL9EhAHT2hJloceuG0fi TH0mdvMZaxCdcZTqa2+6xaRwTuD+MiaK2nJaOGE5Jj6bawO0oP6KywACryLtmJqWOQXE G1ItQTFQwEBxRYMo9HUn5l/ZMuqEHfZ95BqHit+oGnLo6CDy3A6j9S/X14Px3WeLKAFx UPvmjiTl+gciavMxtsnutG1pHMNX13zJdOdeYc4wKqw+K8yQGwY4mrH56+YVKUgm1ReA hfPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zdxW6z5bLU/Pb6aFUspnYaHiHoxpeGOigvgPyctL6UM=; b=mURsWESUhvNCUvgxLWCHEZJ+iK6s+gPzlJ7IjxsbYN8AlL4HUHtKnGNDFTF3ubByEY ULVAYS+SmzDXouXnRllORkG7qYES6gvmln/0fTBAOIhMXCoeOSl79Ez+ey2Y57uYHFCq gjsvqlq8HkFJ6qnC2ZLlZDLvEj3pvD0LmYrydjRNg9gLIt9ro+wuwHEzYSGaoCxpks1f f2C5SqM32N9B/vIE+qUdjAJkzUv1OwaJvfAH19KwbJDVrdCEnbn74MmdUHhrFwspStUZ 7K9wp11yD0mOQebCfRT9z6bya5bY/JpTe47L2F3YHXiBbelFm3eD1hmDi6OaFc5OwrkQ FHNg== X-Gm-Message-State: AJIora8h+lEQcoLO04y4k01Exh/1hj0msOZkBQoloU7CKDKf8XhBbaIT gVKffKfrXu5JAUDogmaFKUOb8kjk3KN2PQ== X-Received: by 2002:a5d:6c6b:0:b0:1ea:77ea:dde8 with SMTP id r11-20020a5d6c6b000000b001ea77eadde8mr7825288wrz.690.1658757929885; Mon, 25 Jul 2022 07:05:29 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id a8-20020adfe5c8000000b0021e5d77a489sm9919263wrn.31.2022.07.25.07.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1605F1FFBD; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Bin Meng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 05/13] .gitlab-ci.d/windows.yml: Enable native Windows symlink Date: Mon, 25 Jul 2022 15:05:12 +0100 Message-Id: <20220725140520.515340-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng The following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message. Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is: a) if native symlinks are enabled, and whether exists or not, creates as a native Windows symlink; b) else if native symlinks are not enabled, and whether exists or not, 'ln -s' creates as a Windows shortcut file. Signed-off-by: Bin Meng Message-Id: <20220725123000.807608-1-bmeng.cn@gmail.com> --- .gitlab-ci.d/windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index 1b2ede49e1..0b9572a8a3 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -57,6 +57,7 @@ msys2-64bit: mingw-w64-x86_64-zstd " - $env:CHERE_INVOKING = 'yes' # Preserve the current working directory - $env:MSYSTEM = 'MINGW64' # Start a 64 bit Mingw environment + - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu --enable-capstone --without-default-devices' - .\msys64\usr\bin\bash -lc "sed -i '/^ROMS=/d' build/config-host.mak" @@ -89,6 +90,7 @@ msys2-32bit: mingw-w64-i686-usbredir " - $env:CHERE_INVOKING = 'yes' # Preserve the current working directory - $env:MSYSTEM = 'MINGW32' # Start a 32-bit MinG environment + - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink - mkdir output - cd output - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu" From patchwork Mon Jul 25 14:05:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593279 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2713633mab; Mon, 25 Jul 2022 07:13:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vbyI4J2HzXToYqVA/2Wo1MVWuPtKUTW12kJdLwWXlhwL+DkYKGH1xdcyCCyiIpKWXPnppd X-Received: by 2002:a05:620a:c04:b0:6b5:c56b:7bba with SMTP id l4-20020a05620a0c0400b006b5c56b7bbamr9407186qki.16.1658758413676; Mon, 25 Jul 2022 07:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758413; cv=none; d=google.com; s=arc-20160816; b=SQ4yD+szPu9hpb755BffL4WRsVahM6KIh/jb4C4+csm2mizR5EmEN3t8Tu0JpYHHAa BKmdr11dyBZ3u5v/5qJGQ9/2yrc8rcxsr6lMbjuIwHqxSdZCZYQ+oHDgFsPpfS+G9Fu4 1HIJ6sEnOSqlxEdSPsmD5/YuLBigNg6msrhmnS723jMxJ69zcLtBTuezVHlkif17Mn63 aL7tx0poSmTAt+rmkhqkYfejwZUeYn9GgYHjOrwSWQmZYVVpWf4GrISecARDuNrDTYdP sWN5L2QKm+3v9Cz8hDSuNyY1iN39+9iHEMukvesBzmx5h6pgE9m1TZSR2Ql8AYmfNEnj Py/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jNWPEy+XnytumBC/Srj6YaFH4JrGJodkvAAc76627RY=; b=gmprVj0OMGuU02Xzxy1UCXDzZSKPVrMYlw7B8jCNDy1qAyoPfdctZ+ls1H7qK6RUSW MBi0cjPOKtL8wCGzuA2dOV+jI/3q5PZdA4uziI4uq/0CQcwGhBbKrpsQ9y6lX5TA8+A9 ZgqEsuX6pmBO8N1bfJYkCrC+TNi3znuh9iT69Z67zc4jbq9czEt+LNqbgDASjFaAXyxI ZxS/JpXeDP5I/BHvYU8lx55b+fX6ApFYY5+IkQ1uVpvOrQGWbTNFWDZ4doB2yl7F3+4C m7J8P7WHilC38vZBO99pl3K+d2fEGH5kjLsB8Jk+1+LAv00LSmmyi3uQVSottvBb2jo0 TEsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bYoLgcOR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o65-20020a374144000000b006b5a1204e25si6629778qka.87.2022.07.25.07.13.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bYoLgcOR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFypx-0000sa-7J for patch@linaro.org; Mon, 25 Jul 2022 10:13:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiF-0000vI-Km for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:35 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:45801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiE-0000GS-2N for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:35 -0400 Received: by mail-wr1-x42b.google.com with SMTP id v13so8342039wru.12 for ; Mon, 25 Jul 2022 07:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jNWPEy+XnytumBC/Srj6YaFH4JrGJodkvAAc76627RY=; b=bYoLgcOR+OP02jBknYaZAZZ1i0VMBlHS8jukDi1gsVfT+awdnBtEz92G1g5qJdnCCH K3orX0a4TIiO7XARBp76FB1foIWmS5/Sg024kgSfEr9CEX5ZkfK7bxg/Tjy44m5bm6Bw OzJuzVDysFaYIYL4cHTV5qGfGrOXURKzT6jcaWf9TY30DQFb4houFY3OlIjKWxU2VrRj L1PyGuSGRDeWhYGetycYjleD1kIj+UVMU442e59Q76y8ZOHzBEQ88xLuZSpJfYLaZeIf H4U0S5iebgN2/rp/KwQfqvYtaepY3mytsrxv77WYTe/GQBwQo0RnkT/GJ2IIejbfB18J 64/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jNWPEy+XnytumBC/Srj6YaFH4JrGJodkvAAc76627RY=; b=MD8sjSXugn+iGFKohHSZkubJhF3tipW2K0kDnILUqqL3XRmTZe67i3IsEquYEajlLf XOIOnmq72pDOfXMNPhAE0ccUI/cjFTTptwHIW2S9BnqxKLvQqGTbKf3NnlHXzPrG5MOe UnUmBIiUGofu1lPoJ20acf/UOzRBOvME3sfEaQodUWLdoQfT0193+4hdt2olUzOc4Z8x N8s2ZHAHu/kjZtBphx9i8P+Pwhr0Gaozw5DgSJovTxlE98y/rv2egY5HiF/ppLOcv0cj Z1fuUWDm4YxUClhITg1oGiSNi1kiWY+0hikq/+AvA/dRYcxxcAdMJJAjExnii6kSJF8E bCjg== X-Gm-Message-State: AJIora8oBb98jP4iXp4v/LPQhV2rb6egjXTkvqsayi9Qp1RmL+eKxuhG ky0E/X3dRxKzbLQOMsTrBJDHWQ== X-Received: by 2002:adf:f4d1:0:b0:21e:484e:ac59 with SMTP id h17-20020adff4d1000000b0021e484eac59mr7406811wrp.125.1658757932721; Mon, 25 Jul 2022 07:05:32 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id n11-20020a05600c304b00b003a320b6d5eesm17154014wmh.15.2022.07.25.07.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 21E5C1FFBE; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PATCH v1 06/13] semihosting: Don't return negative values on qemu_semihosting_console_write() failure Date: Mon, 25 Jul 2022 15:05:13 +0100 Message-Id: <20220725140520.515340-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The documentation comment for qemu_semihosting_console_write() says * Returns: number of bytes written -- this should only ever be short * on some sort of i/o error. and the callsites rely on this. However, the implementation code path which sends console output to a chardev doesn't honour this, and will return negative values on error. Bring it into line with the other implementation codepaths and the documentation, so that it returns 0 on error. Spotted by Coverity, because console_write() passes the return value to unlock_user(), which doesn't accept a negative length. Resolves: Coverity CID 1490288 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-2-peter.maydell@linaro.org> Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- semihosting/console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semihosting/console.c b/semihosting/console.c index 5b1ec0a1c3..0f976fe8cb 100644 --- a/semihosting/console.c +++ b/semihosting/console.c @@ -111,7 +111,8 @@ int qemu_semihosting_console_read(CPUState *cs, void *buf, int len) int qemu_semihosting_console_write(void *buf, int len) { if (console.chr) { - return qemu_chr_write_all(console.chr, (uint8_t *)buf, len); + int r = qemu_chr_write_all(console.chr, (uint8_t *)buf, len); + return r < 0 ? 0 : r; } else { return fwrite(buf, 1, len, stderr); } From patchwork Mon Jul 25 14:05:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593278 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2713209mab; Mon, 25 Jul 2022 07:13:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZAEMOb9FlV5z3qJ49lRV5pS0YM4xQA4fwUD08hdTWwlxR5eBbKW+XjFpcA1sVAPFvspZ2 X-Received: by 2002:ad4:5b83:0:b0:474:4c67:8f93 with SMTP id 3-20020ad45b83000000b004744c678f93mr3759149qvp.23.1658758386350; Mon, 25 Jul 2022 07:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758386; cv=none; d=google.com; s=arc-20160816; b=aAvo1NNTmI4yg3kCt8hsUKfLprMLAlO3VPIR3EzezFw9KRy8xcne1crHeMcibGQKg0 LqsE6j/VpHpHcJ/K5tszLru/1kx/O1hl/vwivu8gKpoK0yJ6ncUhrnxfzQLn5kuu6GHz ClzLaAaG7fa/kun0/kTvWJY5TIbQ0ScCfW52Sia6BDhs8KRMtFOY2bisHxn43mKu3Yfc jN4ptko//Bq/4vjalR5pxQL2hHpLUC+KGCMEf/EIUqVduurgtjD/rycI5iJqhJXJjrwK rwTCnXO9LY965PJjPBOyHrhqsMS1vxahIOzIV86EhQTAktNefamarnxUGPfOp5qwBvS6 mSTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cE/FR17mvWvfbQ79ls9QY67VkyGl05hhpT8w+cwb150=; b=m52c2rlDA7fveGjX37LcjS/2KrR8r9wmUGIRqFiuYj8Z+7WVllCrrTNHHwEnIeRzkC 13pciMmi5iYVIEs7s4lYvTLpL2ywNCfxx6zEEp73o5g4mirHAqBn1NSkcOvAut8K8kwC +RogNUUKrF0QWeFxhC2k9xHSOB4X7bYcrdRD3C6+fyfLfsIugLGYrmYKeX5/LUZ1+Efk 811Jh55ZGBNOd9r+H/To6pR8JUH9EHM3iaZAiHBxGpX2w+E1+ubkmAdhKHUWHogHLOrR dvSJHyEV1r8iAV8P3LpGgB6TkVkp7LZLwvws5fEXMx+a0qyPUaQ1E/jAZrLYVPdU0x3l aRCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hTWMAGJQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o12-20020ac841cc000000b0031ed2020970si7098869qtm.177.2022.07.25.07.13.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hTWMAGJQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFypV-0000Y4-T5 for patch@linaro.org; Mon, 25 Jul 2022 10:13:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiH-0000w2-59 for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:37 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiF-0000Gg-2m for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:36 -0400 Received: by mail-wr1-x429.google.com with SMTP id h8so16115847wrw.1 for ; Mon, 25 Jul 2022 07:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cE/FR17mvWvfbQ79ls9QY67VkyGl05hhpT8w+cwb150=; b=hTWMAGJQwFLMiT59GBdReM6rgU4k+6uHMiCRCi7v2eXCOXcjWFHip/nAEVDu4krBqb FWT/ujJ5lClEq8o+3BBo7wNscqDEJmClDTpKOq6YuMCRIbjnPFHZ4UUfYuQ4W0pYh9wQ VDa3Jkq2eYmMyhizsq0CfNbcmOe/EXHoOvheuGhDc4u9lBhnYc7hZJECUrOzLwC0SzAF Oa9Byo2yi+YoZHnnHvwZKUvzPqGCQYBVmW2joFU+I/5BemcYRwQlBcxnQq8zqGazP96F tvHRx/Mh4IoomSOnb87AHHJY7mkZhaA4ZqnzM/AbHXtnMq4hrOSmo0ORMqQ9Os4VFa6w d5wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cE/FR17mvWvfbQ79ls9QY67VkyGl05hhpT8w+cwb150=; b=kBtDKJuMyOmCTKTsko3UuUsJmCiqMxtwjMitptmW2BbacrQ0DFSviSu81UnC7MUAXQ 02BKraEw2RGQH6FIsvHUQlVbLX5LNd0fodIjVn8JaX3u4v9A5JFBmAkwbcRFVVyy6dms yj3ScmHP1vB9c9U0cAktKjpQ64ftc3AWb4Mg9AvcP8GfI/nUk4gWDnDUh3bpBPT1RDWZ ohI5bCwcyEWpRIC0P5xsLwy9umaTte6yQJFzFBCoMzNsrd9ftdXH113Pt/a3qixIxyth A5XKct+sZKBzImkiFOqC0A5Z378DaEvhMOpG+JkujzAUi0SsyKxH/9mkNSM8o8JW5HP1 7N9w== X-Gm-Message-State: AJIora+OVE4uquYDIN2be02dMM72z5/JpXgU2bk4kcxZZMpQNiFuBe7Z xROGURRdUsadUpkGwoTC9d2uGQiX53dGUA== X-Received: by 2002:a5d:6c65:0:b0:21d:b7c0:9930 with SMTP id r5-20020a5d6c65000000b0021db7c09930mr7627169wrz.500.1658757933719; Mon, 25 Jul 2022 07:05:33 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id j3-20020adfa543000000b0021e150553acsm9422351wrb.14.2022.07.25.07.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3950E1FFBF; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PATCH v1 07/13] semihosting: Don't copy buffer after console_write() Date: Mon, 25 Jul 2022 15:05:14 +0100 Message-Id: <20220725140520.515340-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The console_write() semihosting function outputs guest data from a buffer; it doesn't update that buffer. It therefore doesn't need to pass a length value to unlock_user(), but can pass 0, meaning "do not copy any data back to the guest memory". Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-3-peter.maydell@linaro.org> Signed-off-by: Alex Bennée --- semihosting/syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index 4847f66c02..508a0ad88c 100644 --- a/semihosting/syscalls.c +++ b/semihosting/syscalls.c @@ -627,7 +627,7 @@ static void console_write(CPUState *cs, gdb_syscall_complete_cb complete, } ret = qemu_semihosting_console_write(ptr, len); complete(cs, ret ? ret : -1, ret ? 0 : EIO); - unlock_user(ptr, buf, ret); + unlock_user(ptr, buf, 0); } static void console_fstat(CPUState *cs, gdb_syscall_complete_cb complete, From patchwork Mon Jul 25 14:05:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593273 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2707691mab; Mon, 25 Jul 2022 07:07:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s05eTkxd12A6eI+YuhgL4SbCiaGFJhE95Pks2dcC79A12momkuUuZTKt3D4R60i4jR2JN4 X-Received: by 2002:a05:6214:2aa1:b0:473:2cc2:63e with SMTP id js1-20020a0562142aa100b004732cc2063emr10993437qvb.26.1658758056326; Mon, 25 Jul 2022 07:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758056; cv=none; d=google.com; s=arc-20160816; b=Y5ItkULKzH0xYbJpMh6wICSQhNSTF5xw7KsmOoj1oS5gHm2EPse2oOEDSRFjil8hHk S+vQYAVQbiAxMNWdcwzdSNb+RqOVHK8DAHT1mc7dWWdVybaNeSCBWQygG6nCgYHHkfib UDM1Dx0y9bUIhjPFUsvqAhXJnoeDFkSESWK/Ofhacm4FxmGAYDUd3OgDzkEYdRuOmz+a 8L2dJGzvoBBibgv2HtcdrquWFdBoNtR7gKvynCPPzBgPAz8MA2QWUW7VS5NoSI8KY/js 6q/8n1bCpyBmRrgFxDI+/AGlsqhy0kA7XDRy0a7L65USC1OWqlcMB38EfLMV8T0J1HAi 11Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QS8/Mz4m9SIuDGhgYB4lvPLK9Hni5wZ7MVsQ4sSUUEo=; b=SDaqrXqw0Y83XxuhQKmMGTxOHAbQ8N88qj3Ybv/jqo7vcH0c9yLJg1m3BWahtI6v// wfbWDNOMofMpgBDg14sZFefVZ907hZdmxDeHy/k4FsfUnMDvqhgUIDhth1+IKVh0xIx+ 7to1Oc50DIIzyXCESQ8KsiGyZO6FmqdIw4RvaoXoIqvS7vVbmiji8STD6sNf/0pKBnqB 3QSApfd9yGIm+s3S8qH4qcjQzN7vCLg/mJRI8QSzKzfC/BgJuNGTY9NOu7DmlPFYH7cj tR4E0mUGvEUDRTcjwRCso/8HcNf6EzERfCjJ4gAPyf+H+4gwgF6uK1eMvUu8p2B9lki6 5kbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hF6YZy1V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o10-20020ad45c8a000000b00474116aaa74si8083273qvh.395.2022.07.25.07.07.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:07:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hF6YZy1V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFykB-0000xL-S1 for patch@linaro.org; Mon, 25 Jul 2022 10:07:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiD-0000t7-PJ for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:34 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:38575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiC-0000Fk-3Q for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:33 -0400 Received: by mail-wr1-x42e.google.com with SMTP id k11so15663810wrx.5 for ; Mon, 25 Jul 2022 07:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QS8/Mz4m9SIuDGhgYB4lvPLK9Hni5wZ7MVsQ4sSUUEo=; b=hF6YZy1VAcTK6qC1lTDtiUryQZ2Z8uxqJk6BbwyoJJu+/4lSm98/cdut9K+znTnWqh fZZiJsYlwujll5l3T/iesUTUrLTo6hiezc8grwPcrBLdxA0EnJKknzcgVmgmhDN3kEL9 wpGMR7IVTsmzBtq/6Cq/p8Pa7HvHuC2go5//XpCGk7vYlfxKmoTe9n2DBy05RLmBMKkG DtqJ4g1iVgt8HZGrfKepWt+SzEoH3ztlY6/0zqD2XMnCpD9HCGnY+gAsneqoNb3C9MYz D6J069kb9TsfEXkKpGWAk1ZauAwL3Ie8Nj+D4YZwvJluM10cg7kvAhBuOWqtoUnM3nl3 VxeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QS8/Mz4m9SIuDGhgYB4lvPLK9Hni5wZ7MVsQ4sSUUEo=; b=7KPRrrIqL4D5G0T0FMpzk5k2VKeOhh/Ilfip13DWU7KWsVqTC2/yN2tVp5kfOmoDhJ lFS9YB7phuGizre2+hLx7+7L5n2NHYvzoReYxYlHtEaIeWq/hnsPIROFK449AC/lPxNa 5NKkAo78XAYk60qMULvAG0Bg+Z+R6DWx9RAGS+OrAJu54xT6H+lhKuVWBcWHes9PYD8+ cxKnfqfAJnT0gVMl5un9v/NhLTRs4VrS/4CKVI2aoWLE6CQ3XoygN3MQJYur2jc4Rqo9 tswMCyUXY+KTtg4sw9Te+HGq2NQiW4wIv/B/YoVva07/RWkO2xZjqFOXC2hs1Sw+o9/m mi2g== X-Gm-Message-State: AJIora8qiG34iBBWQKY7AxoNjJsIrZYsPFECANtfvhqqSCw9pyag0dwV tygorfFnI8LoKgvgFpnHQvnWDARzr1/Ejw== X-Received: by 2002:a5d:434a:0:b0:21d:aa7e:b1bb with SMTP id u10-20020a5d434a000000b0021daa7eb1bbmr8292689wrr.619.1658757930685; Mon, 25 Jul 2022 07:05:30 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm20185235wmq.7.2022.07.25.07.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 45A071FFC0; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PATCH v1 08/13] semihosting: Check for errors on SET_ARG() Date: Mon, 25 Jul 2022 15:05:15 +0100 Message-Id: <20220725140520.515340-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The SET_ARG() macro returns an error indication; we check this in the TARGET_SYS_GET_CMDLINE case but not when we use it in implementing TARGET_SYS_ELAPSED. Check for and handle the errors via the do_fault codepath, and update the comment documenting the SET_ARG() and GET_ARG() macros to note how they handle memory access errors. Resolves: Coverity CID 1490287 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-4-peter.maydell@linaro.org> Signed-off-by: Alex Bennée --- semihosting/arm-compat-semi.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 1a1e2a6960..d12288fc80 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -171,6 +171,12 @@ static LayoutInfo common_semi_find_bases(CPUState *cs) * Read the input value from the argument block; fail the semihosting * call if the memory read fails. Eventually we could use a generic * CPUState helper function here. + * Note that GET_ARG() handles memory access errors by jumping to + * do_fault, so must be used as the first thing done in handling a + * semihosting call, to avoid accidentally leaking allocated resources. + * SET_ARG(), since it unavoidably happens late, instead returns an + * error indication (0 on success, non-0 for error) which the caller + * should check. */ #define GET_ARG(n) do { \ @@ -739,10 +745,14 @@ void do_common_semihosting(CPUState *cs) case TARGET_SYS_ELAPSED: elapsed = get_clock() - clock_start; if (sizeof(target_ulong) == 8) { - SET_ARG(0, elapsed); + if (SET_ARG(0, elapsed)) { + goto do_fault; + } } else { - SET_ARG(0, (uint32_t) elapsed); - SET_ARG(1, (uint32_t) (elapsed >> 32)); + if (SET_ARG(0, (uint32_t) elapsed) || + SET_ARG(1, (uint32_t) (elapsed >> 32))) { + goto do_fault; + } } common_semi_set_ret(cs, 0); break; From patchwork Mon Jul 25 14:05:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593285 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2722521mab; Mon, 25 Jul 2022 07:24:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vPo6WtgmOx0wPcp494pFy16wH87tTk0eRbEk3m/yfCH6eGQp5gq6oj8QnW5K/TZgLy/fAf X-Received: by 2002:ad4:5fc7:0:b0:474:1b46:907f with SMTP id jq7-20020ad45fc7000000b004741b46907fmr10978257qvb.55.1658759055417; Mon, 25 Jul 2022 07:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658759055; cv=none; d=google.com; s=arc-20160816; b=pezdghBKBDFK9pf/DNZXPRuXu1I6DG6Ny+U4onBpPNmWVAzHAYS3lCcT5N0KZ+MY9f bPeQqTktTY5bNsgRp0T/XeEMxvt6+qK3IaH8xvs81C+fan++j3nKjVLm+qq6mGPXXqIo sO+m/Qr/P41MU1trxBL5UhRgMjpPT2hP3LlpViAcTLVi8JXiTJZPaJ9NBosWAom8Ecfo 9T865vR0+Sd4xFWoxqSUj27CzBffF/bdPfRSaL4Yeg7NLM3JdFATzdzEj9jg+Jw042/V MqLCu9kaCr+aPgwEgldRSKT2DYfcdGFKCzdgUY3yYqZE6lUD5idZjz4vQkgTlnGbq+70 Ce/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yHj/q18KkSPTGRmybHT7bSovMuqm3TPdWZ5l7N31L9s=; b=r4xVvqQlZMaBx/KFiZOty5CLyQNvhlbPZUWEe23QCVwYoD/kFLQYAINL7k9SV3qTxz L3euvkOZxO/vWERec2JYjQU3e4edOXX8jPL6mKavjkqQYai5E1+bOYvtxx7A0T6radqe ZJRtDspU1f1Dabc6IGDqRyNJzJr7xs2fyH7J1Y47jom+6FChNZfZ6sHAro3cIv9wet+2 6LZtqXqz3Y5CfvrMVo/DgzV8iIvKoXN3iaN0stMa2URpIfnMBH2O36ow4Bq7jOgrSa5R DEX9lz+kk2lin0V+rq2vUd2cHZieSdGvhaI8k5E+aSPcNMjHe4QeHlTFwv/Njwj6SCG/ VLsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gG8Kcz88; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g12-20020a05620a108c00b006b5c88fb2cesi6446084qkk.674.2022.07.25.07.24.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:24:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gG8Kcz88; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFz0J-00058Y-0u for patch@linaro.org; Mon, 25 Jul 2022 10:24:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiP-00017m-Dq for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:45 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:43945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiN-0000JJ-Ni for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:45 -0400 Received: by mail-wr1-x42e.google.com with SMTP id d13so8460888wrn.10 for ; Mon, 25 Jul 2022 07:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yHj/q18KkSPTGRmybHT7bSovMuqm3TPdWZ5l7N31L9s=; b=gG8Kcz88Zic0aKKiiAknyouQzz1cTge1VjkglG/cQD4wZWHd/JMZF5uv+wqjSDgMlg 0EXu+JzncUS8iPBQbXPdekTCEXCkZ633iyecjxv9ro3/IeBvgfJwG17zt5SO6jMs8+eS PEwNAMiBz9FJkO7j+t2VC12nH+VQl643GZbyehtIBK7D7lo9LS9isVcyWJycd59U1UtQ CyG2rQhzkayi1Ipqyg5x13cBGFauis3bp/KWpFz1rR64bEW3etQrhHcozEGNR5x8w1ey nosIEi7AaAhMUpj7yDh7oSOkSoHxGzDjr3Ac0xXtl2ENjnwfFxxFUXTVlbUHxpvM2jUz IBOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yHj/q18KkSPTGRmybHT7bSovMuqm3TPdWZ5l7N31L9s=; b=czBeUGRAk2M1C1gt6ThFiVR3RF5GhZbn47wKHoWfluDwhyNIoQbTAGF5T1SkhCtLQq QJjzty2kd0jItRHmR69Cb8Fqb9VUQ2VNG4AMKTfJvO8WYoya/OmAv3Non5rEp5FfwN5t FB4TTtpLJoUQrz7QszHLdqG274lvYMESJBe3tI3/B1xeuR9W0gRcd/7OEeaEc04USah6 OI2LlPvzsBbyXKE3BJoOekLSrSwAAp4H4OFhCfUFRYclg5zXytnRKLrN/FiMfTEiX+V+ thJyQeaWbH1TGxI3rwqtr1gsqa3f+Hkd4ZMdx41TS1W+5YA1vGn4HnEXboc2hQr7z8G+ VP8g== X-Gm-Message-State: AJIora9n3gfgku6S3A44xAeV2oL44Z6EtSHM0Zo00xK3+5rd0m7fqgFQ N/Bhu9W1GSlsw32RksGQdi01jw== X-Received: by 2002:a5d:5250:0:b0:21e:526c:d4ad with SMTP id k16-20020a5d5250000000b0021e526cd4admr7297062wrc.103.1658757942481; Mon, 25 Jul 2022 07:05:42 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id k22-20020a5d5256000000b0021d6a520ce9sm12377002wrc.47.2022.07.25.07.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5C0031FFC1; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PATCH v1 09/13] semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM Date: Mon, 25 Jul 2022 15:05:16 +0100 Message-Id: <20220725140520.515340-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The TARGET_SYS_TMPNAM implementation has two bugs spotted by Coverity: * confusion about whether 'len' has the length of the string including or excluding the terminating NUL means we lock_user() len bytes of memory but memcpy() len + 1 bytes * In the error-exit cases we forget to free() the buffer that asprintf() returned to us Resolves: Coverity CID 1490285, 1490289 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220719121110.225657-5-peter.maydell@linaro.org> Signed-off-by: Alex Bennée --- semihosting/arm-compat-semi.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index d12288fc80..e741674238 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -504,16 +504,25 @@ void do_common_semihosting(CPUState *cs) GET_ARG(1); GET_ARG(2); len = asprintf(&s, "/tmp/qemu-%x%02x", getpid(), (int)arg1 & 0xff); + if (len < 0) { + common_semi_set_ret(cs, -1); + break; + } + + /* Allow for trailing NUL */ + len++; /* Make sure there's enough space in the buffer */ - if (len < 0 || len >= arg2) { + if (len > arg2) { + free(s); common_semi_set_ret(cs, -1); break; } p = lock_user(VERIFY_WRITE, arg0, len, 0); if (!p) { + free(s); goto do_fault; } - memcpy(p, s, len + 1); + memcpy(p, s, len); unlock_user(p, arg0, len); free(s); common_semi_set_ret(cs, 0); From patchwork Mon Jul 25 14:05:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593282 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2717619mab; Mon, 25 Jul 2022 07:18:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vr6a5M6uhy+VbRsKe8AhI9nZqJfVSlrqJoQpn6P5S8/eQDeAmjXRvZUjwx1oyO4X/sQaPm X-Received: by 2002:ac8:5794:0:b0:31f:34a8:8315 with SMTP id v20-20020ac85794000000b0031f34a88315mr6105124qta.360.1658758689551; Mon, 25 Jul 2022 07:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758689; cv=none; d=google.com; s=arc-20160816; b=XrWcrATCZ6dErXZMjm7tQNPp7pY01jy3MfrINLT+Ljvh9knsGcceCQwfJMpLf+yjDQ VJSaWDTcz+5OouPRrXnRhFHXup8WNipeMfFwzE1W9CRsA1IDmT0MzZwjoFaDaXs88mok yzzVW9WOiP4yMUQ7zhRsUBR0ivZFyDDUHCDKvHBHXggxEWcy2Z02x5Lsx1kNp8/Z3SPE ULZTrj/z/Hil2Db0p6Sobl4PvsHdSuC5lza3YV7U+DDd6HEgoMvhn1UdPpp1/SZoFXRU MBVfibOwp2BGQzrpxTBU/abH4LkG51dwkEN7c3BSDdt4p5D6RFGcjZXwcq3jS+mhBNhK Po8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ihqfEvf8e/Rp4WltOhylJI2GJRKNwsRtW1sLAed2GPk=; b=y8x4UsjdvTZ4m7cd4OnDSOe5eUguqOJbMgww+DqzuglYSuzMJhkjeNORIQyUxz/CVF heDrJCyhKCLZzpUp5XK5B2ZDBZs+GIRTkmsyhvYEL3Suu0h43VNS2eihfPu6HbQVlWXv S4OOI+jaoq8EIr/5d0TLgSWz2/eqmNr2vsDzz9zhsH7jMKyk+j8NjqidpWUOfxyt1Cct yitwzNXGMGPz+9NZvMGykk6bbaRp/hobrJ7dtaYdcyJSL1cDgN02kyq1btyWH3is/M9/ PNcn+s37totbth40cUfzlyIEdp468QSUTXbBUSLP8M+AT9GeqmW5Iv25E+7AOPJiG+Lw ccOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KhO+eDQR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u22-20020a05620a455600b006b250f958b5si9015481qkp.464.2022.07.25.07.18.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:18:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KhO+eDQR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyuP-0006re-3d for patch@linaro.org; Mon, 25 Jul 2022 10:18:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiM-000126-RV for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:43 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiK-0000Gg-8P for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:42 -0400 Received: by mail-wr1-x429.google.com with SMTP id h8so16116332wrw.1 for ; Mon, 25 Jul 2022 07:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ihqfEvf8e/Rp4WltOhylJI2GJRKNwsRtW1sLAed2GPk=; b=KhO+eDQRv/tNj6WCHJcUbvR2+qTjPD9vigWGI1LGmWjjhWcc101ygfnHK+zdYt0vuu 2NEU9J1JtH/PcapKuQSwnUHqUonxOADRdLAA1z4+EWwrv5yLd6JR7GI4gJJ/7D7AtnVC ZmiRUAM3u8RTjxIs2O51qn19tDBiQiW3H/IShqMr90N85ayuyYPhzvfD7cm4t2VWBRIo 5j/De+xAmI0/qU5EAmD1UpNZ1wqKjhcJTLEUu4Nn9NVYnc8MAz74iFmSJMv3pP5N3IP6 4JKxkrNudLCZmKQE2kYuNHapFrOlmpGkl4/n2USWsUsHIBWc3fbconX3ekIOAzgvTrDp 4rtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ihqfEvf8e/Rp4WltOhylJI2GJRKNwsRtW1sLAed2GPk=; b=KXwngdAe8gZb19R0GLo1EJ5KN8PiDbacIZMNRxeyf5vraVTagdptNszI4ayfA6BvbO E8MydH6vBnjGc8Ar9xbas2mK9brR4iVj41m9D3CdC7sWR/mkLPLp4S3qBYQNA4yZgsKM lx8hvGrAH3DHUmguRG9NuKwwu8iXmx2ABtLma1Y7pxxE/4NSJrb/S+/9Y2C5nwb+abF/ tBDAyucqKYv3mkgyRQFQlpVcjifJXn77n8+SFZv8gzRKXdZ3CBo7oOS8NWTvulMm0PxH rNpredwi6WvDfk7P3RWZYyZrDKM6y4GZy7x2c4CG9Dx0nvM9wMuX4jn8UpTwCdpq8zrg FVIw== X-Gm-Message-State: AJIora+6JMSA4ZEyq/E/573th1W/DHDr25Pb7p6pzhIt7a49gPacc6Mv CFK84tpBwz1oSUZ44Is8VIt3Tw== X-Received: by 2002:a05:6000:1863:b0:21e:8588:b0c1 with SMTP id d3-20020a056000186300b0021e8588b0c1mr3933962wri.363.1658757939498; Mon, 25 Jul 2022 07:05:39 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id c5-20020a056000104500b0021e82cf35efsm4715729wrx.107.2022.07.25.07.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 717141FFC2; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Ilya Leoshkevich , David Hildenbrand , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Eric Blake , Markus Armbruster Subject: [PATCH v1 10/13] qapi: Add exit-failure PanicAction Date: Mon, 25 Jul 2022 15:05:17 +0100 Message-Id: <20220725140520.515340-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Ilya Leoshkevich Currently QEMU exits with code 0 on both panic an shutdown. For tests it is useful to return 1 on panic, so that it counts as a test failure. Introduce a new exit-failure PanicAction that makes main() return EXIT_FAILURE. Tests can use -action panic=exit-failure option to activate this behavior. Signed-off-by: Ilya Leoshkevich Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Message-Id: <20220722233614.7254-2-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- qapi/run-state.json | 4 +++- include/sysemu/sysemu.h | 2 +- softmmu/main.c | 6 ++++-- softmmu/runstate.c | 17 +++++++++++++---- qemu-options.hx | 2 +- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/qapi/run-state.json b/qapi/run-state.json index 6e2162d7b3..d42c370c4f 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -364,10 +364,12 @@ # # @shutdown: Shutdown the VM and exit, according to the shutdown action # +# @exit-failure: Shutdown the VM and exit with nonzero status +# # Since: 6.0 ## { 'enum': 'PanicAction', - 'data': [ 'pause', 'shutdown', 'none' ] } + 'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] } ## # @watchdog-set-action: diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 812f66a31a..31aa45160b 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -103,7 +103,7 @@ void qemu_boot_set(const char *boot_order, Error **errp); bool defaults_enabled(void); void qemu_init(int argc, char **argv, char **envp); -void qemu_main_loop(void); +int qemu_main_loop(void); void qemu_cleanup(void); extern QemuOptsList qemu_legacy_drive_opts; diff --git a/softmmu/main.c b/softmmu/main.c index c00432ff09..1b675a8c03 100644 --- a/softmmu/main.c +++ b/softmmu/main.c @@ -32,11 +32,13 @@ int qemu_main(int argc, char **argv, char **envp) { + int status; + qemu_init(argc, argv, envp); - qemu_main_loop(); + status = qemu_main_loop(); qemu_cleanup(); - return 0; + return status; } #ifndef CONFIG_COCOA diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 168e1b78a0..1e68680b9d 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -482,7 +482,8 @@ void qemu_system_guest_panicked(GuestPanicInformation *info) qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, !!info, info); vm_stop(RUN_STATE_GUEST_PANICKED); - } else if (panic_action == PANIC_ACTION_SHUTDOWN) { + } else if (panic_action == PANIC_ACTION_SHUTDOWN || + panic_action == PANIC_ACTION_EXIT_FAILURE) { qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF, !!info, info); vm_stop(RUN_STATE_GUEST_PANICKED); @@ -662,7 +663,7 @@ void qemu_system_debug_request(void) qemu_notify_event(); } -static bool main_loop_should_exit(void) +static bool main_loop_should_exit(int *status) { RunState r; ShutdownCause request; @@ -680,6 +681,10 @@ static bool main_loop_should_exit(void) if (shutdown_action == SHUTDOWN_ACTION_PAUSE) { vm_stop(RUN_STATE_SHUTDOWN); } else { + if (request == SHUTDOWN_CAUSE_GUEST_PANIC && + panic_action == PANIC_ACTION_EXIT_FAILURE) { + *status = EXIT_FAILURE; + } return true; } } @@ -715,12 +720,14 @@ static bool main_loop_should_exit(void) return false; } -void qemu_main_loop(void) +int qemu_main_loop(void) { + int status = EXIT_SUCCESS; #ifdef CONFIG_PROFILER int64_t ti; #endif - while (!main_loop_should_exit()) { + + while (!main_loop_should_exit(&status)) { #ifdef CONFIG_PROFILER ti = profile_getclock(); #endif @@ -729,6 +736,8 @@ void qemu_main_loop(void) dev_time += profile_getclock() - ti; #endif } + + return status; } void qemu_add_exit_notifier(Notifier *notify) diff --git a/qemu-options.hx b/qemu-options.hx index 79e00916a1..8e17c5064a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4239,7 +4239,7 @@ DEF("action", HAS_ARG, QEMU_OPTION_action, " action when guest reboots [default=reset]\n" "-action shutdown=poweroff|pause\n" " action when guest shuts down [default=poweroff]\n" - "-action panic=pause|shutdown|none\n" + "-action panic=pause|shutdown|exit-failure|none\n" " action when guest panics [default=shutdown]\n" "-action watchdog=reset|shutdown|poweroff|inject-nmi|pause|debug|none\n" " action when watchdog fires [default=reset]\n", From patchwork Mon Jul 25 14:05:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593280 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2715975mab; Mon, 25 Jul 2022 07:16:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1so5ORVKRi9GFP8623BezWzTUmZpU5i+MDvs5D8CYLFaGxxHrAeR0gzrzRplgLluevukwWZ X-Received: by 2002:a05:6102:5585:b0:357:7b42:2113 with SMTP id dc5-20020a056102558500b003577b422113mr3655254vsb.34.1658758576354; Mon, 25 Jul 2022 07:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758576; cv=none; d=google.com; s=arc-20160816; b=SRIWyv4mrlLFqoiOphS2fBh2y3Ex8eVlAWImbljS5FSKWni3bfGWnqToeqWK89tHcv cBApGBR/jJvKswvHC0R4UpGbUuOWGAJx/GilqCKF/q0aaTmN6ZKJ+kvVLnuCc7kF3Nxi OGyfhmd/XMzruFyLv3tH1at8X7GKZ9c39jtXpFIK/SYQwTCy/3JXzBWqTcm3+IV06Fpa ileWoN35Stb9rEt/xAEigOEN2UePoXXNsbhe1kadTvSt1GDw0UBOvAWDC+kMMXVml5/a Q1wsSCau7O5OGKYsoJh275zpZamXF7b1d0Nm0GakRHQAtge8YSpg/vuJC0a8O/fvgIJd Tj4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=EGKWzbJpxSE7HiTZyXMtfn9M+E4PoKaBdw7zu5bexRW7DAhs3iZHNVJHbzPjcaLPqd UV22knF5i5hvdmSgyXG53NifK+qxTu/eGzLVDgtR/sILaNLmR8bGZOlL/QMVPcdbNRqV Y4m/YjXhr2tqiSv3rYBUiJgbe0sVs0ft5PkY3VcTUtykeUmneyq6hAhw11ZkwZITKmRG qKYY/8ou34u8Vvd4hkx4dyKmnRm77+ClbW/f3YPKziCdxcEV6Nb+ei0WtK5Ao9zRZbps rfJ6c5L1/6yfLPjh34szYJhhBkqS9UgHKslCcWyWAejv1MRtfKSPigLzFMqBTW3nXQOe efCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C1yuYhU5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bn9-20020a056130080900b003849c888f97si349587uab.113.2022.07.25.07.16.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C1yuYhU5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFysZ-00045L-PD for patch@linaro.org; Mon, 25 Jul 2022 10:16:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiJ-00010W-Ol for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:41 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:44997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiI-0000HC-4n for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:39 -0400 Received: by mail-wr1-x42a.google.com with SMTP id l15so12068188wro.11 for ; Mon, 25 Jul 2022 07:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=C1yuYhU5QO5UZVFdO3t6O30s8OBCLP1/aEPMBFOMsn6Y1qzoP+ytnBlPetAs+cTVFk OHti8eKnVkTUdqcpt151Q0d9pDpUw8TosckUFAKnBZ4Z3qCE5XzbF+Yrzo6w0MS+niDo eQdnjlppCuCPbRBxK6CV3PmTU2ks5dlkCLyfya88SOxC62mK1/Am3efPpOWVEtqVA9qC GFKF2eRvfVm0KsLD5Ch+v6AyzdXFEc+6xNuwdZF8QpR03/rCpUxcQcXETy9ox7jAUmsn f1Iv/Hjc/93Uu5WxNw+gpC89VgjotZHDlEdoqZ52cJgzUkDmZJt0dpJwd53p04yaoZEU +e2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=2kI9v/e9ZFul8fURxa7CdwcKFhV+1MyGATw2HfR8OpPR13J6RjRAthZtkFIxiWlbyQ z1hI7yUgpJynFylRYHmJUDAaTnEt4u5mTsDioj2bv9zlBRyMKrXv/vYkeHmzYWMS9nqv J6vpK7yelMMz/7WhDknJ2qxEWDMsM0jbK3B9K9i6tyaW8TIb43DO+a1/du4Uxok6U6EH UuC6UIh7V0lifmrjRyWqagq9mvl/+NB03PMoHkA+A0sV0g0ECKV8egBKHr/tlJQSbstF tfb9hjvTvpbrpEsp50bUdDlXkmhhjYwj3vAh+9xdoCOFrSsgly+QdqsdbVpwsoEmniWH jIkg== X-Gm-Message-State: AJIora+Q/vrg5eCL7gVsyPB5HuQjRYBZNq4lboaHhxc05xMchhJ1gOke Q4LRtt5ajNtVzMQVfFKKff7+KA== X-Received: by 2002:a05:6000:178f:b0:21e:98ee:f1e6 with SMTP id e15-20020a056000178f00b0021e98eef1e6mr324527wrg.405.1658757936685; Mon, 25 Jul 2022 07:05:36 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id bg42-20020a05600c3caa00b003a31b79dc0esm40292263wmb.1.2022.07.25.07.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8B9761FFC3; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , David Hildenbrand , Cornelia Huck , Thomas Huth , qemu-s390x@nongnu.org (open list:S390 TCG CPUs) Subject: [PATCH v1 11/13] tests/tcg/s390x: Test unaligned accesses to lowcore Date: Mon, 25 Jul 2022 15:05:18 +0100 Message-Id: <20220725140520.515340-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Ilya Leoshkevich Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Message-Id: <20220722233614.7254-3-iii@linux.ibm.com> Signed-off-by: Alex Bennée Acked-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 9 +++++++++ tests/tcg/s390x/unaligned-lowcore.S | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/tcg/s390x/Makefile.softmmu-target create mode 100644 tests/tcg/s390x/unaligned-lowcore.S diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.softmmu-target new file mode 100644 index 0000000000..a34fa68473 --- /dev/null +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -0,0 +1,9 @@ +S390X_SRC=$(SRC_PATH)/tests/tcg/s390x +VPATH+=$(S390X_SRC) +QEMU_OPTS=-action panic=exit-failure -kernel + +%: %.S + $(CC) -march=z13 -m64 -nostartfiles -static -Wl,-Ttext=0 \ + -Wl,--build-id=none $< -o $@ + +TESTS += unaligned-lowcore diff --git a/tests/tcg/s390x/unaligned-lowcore.S b/tests/tcg/s390x/unaligned-lowcore.S new file mode 100644 index 0000000000..246b517f11 --- /dev/null +++ b/tests/tcg/s390x/unaligned-lowcore.S @@ -0,0 +1,19 @@ + .org 0x1D0 /* program new PSW */ + .quad 0x2000000000000, 0 /* disabled wait */ + .org 0x200 /* lowcore padding */ + + .globl _start +_start: + lctlg %c0,%c0,_c0 + vst %v0,_unaligned + lpswe quiesce_psw + + .align 8 +quiesce_psw: + .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ +_c0: + .quad 0x10060000 /* lowcore protection, AFP, VX */ + + .byte 0 +_unaligned: + .octa 0 From patchwork Mon Jul 25 14:05:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593284 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2721033mab; Mon, 25 Jul 2022 07:22:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u7/Hn5CGCMuFj/4Y/fJ2D9BtJBnGJeO7U9GU8Jzfn8PBoLQcDHBYNcZX2s4DIYRq5N2JY6 X-Received: by 2002:a05:620a:2454:b0:6b6:ed0:aade with SMTP id h20-20020a05620a245400b006b60ed0aademr9416151qkn.54.1658758942147; Mon, 25 Jul 2022 07:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758942; cv=none; d=google.com; s=arc-20160816; b=qyr3+CKizz1PvUpMy7LIMdoB45etoALmnt3OL7mS5IvrVAAR84F1S9R/sB+ya61DEm pzos9gcG92+zUeRUaIdgcDa/PCLT992z1eQOwoil7ad0VR37c49/jx8b5RrweDXbYlo5 iAa2vhfckhHfDnwpPxmgyTzRHodNXNsWzFfPR0lAjTd018D7p5RgM+pVM4LEQBt+WpaX SAtqF11lWqegNqxK6I/OBQ1pWILBa/THbrmtKc58XfvfTf5JzjzLmnTDy+FxWRKKRSHx yhHzxgDnmStc7iM7sPb8lLsciqQWcCCRpL/Nztwk/8BwX3x/zhQIp4p8RWgFdyxKTCdQ GR9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B3jT/+HPPsIEXc/KjYHBbDuZ3dYXOI8VpfNKzZc6+cU=; b=DMZTH1er4lyfLSYkIt6hGWEqRkXpBXvzWRKSspE3ZqOR6D15COKernVCDmJ175ZpOT VawCS2gp8/hh/iq6cqn9fs0A3cqK52TinRHIgpSQn5eMa6VujI/Sm142TgSK8lvh2a6X dNF4F3x6ygLhBAk71lSjFRzrfmqnC6+NJVSEu/CEEPjAa4zIq0+J9uaY4AnIyqoSkKCp 6n6bKguwZoTWYoTMMcNMzJ5xh89cZa0sShIueqVOyfdN0Md+sek8ajqyfBKfC1U224zW oqy/XA/GOv6ab7xUJTLiPePfNwv6QSEtBN78RTUlB3ezteA6Rlo8EMoYwgDXIMfjyhNO YwMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F5R7JsTW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bj23-20020a05620a191700b006b5d03e9d76si8659860qkb.558.2022.07.25.07.22.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:22:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F5R7JsTW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyyT-0003VE-PI for patch@linaro.org; Mon, 25 Jul 2022 10:22:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiO-00016W-Hh for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:44 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiM-0000J8-VJ for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:44 -0400 Received: by mail-wm1-x335.google.com with SMTP id ay11-20020a05600c1e0b00b003a3013da120so9461088wmb.5 for ; Mon, 25 Jul 2022 07:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B3jT/+HPPsIEXc/KjYHBbDuZ3dYXOI8VpfNKzZc6+cU=; b=F5R7JsTWCfgXv3Lf78HYG3mpIyMweWmppnXyvoueB0cPAWs/8+BzgIfRkTAZfBcfLM 7zQPiUeyONVPCVvzB4O5sOnjXO7lsSdz4ttfQWPO2THBNS4VjlVHxjWG5BDLAz/Er968 Lamz46heag7ey/fTQHXrVS78CMws6LmzYMgCSqHjLPfeJZt46rLCMtzoTUkU9FNwca/2 u+i5GTaUGAe8Ef1/jaytJczu3x17si0v1ZcmIebL8DMyLXkAf3i58qlXfxkmSLvKuRZ9 85EmHOTETfdEYNz7EtsZnu1Ok3yFpDSrqgLLR6ISB0kn6iwrWY7YPcZugpCI5drwrXvu ZdvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B3jT/+HPPsIEXc/KjYHBbDuZ3dYXOI8VpfNKzZc6+cU=; b=Tw2SlVSitetWPf1crWXBNxGu/8W5rh0Qsyldaf8Y0SpDD7yppdPdbUd4HCFmFsNR19 hORxisHzNUKQWtWPjfWe+IYqR0vIXPPNBwmAdxe/VpFf65wgqUvgC8WkV2gFt4rtPPpJ hV0EJiJzluxPH60XRfgLwoGD6WG0zhjO10jtP8l1Xe3y4smvrg8ROgeY9k5TeVfDeUy1 8ohCsyagaC2hWwtGDWNl0/Ua+72T8GZTHVB5UQTX8TkBdpp4yKOrod93PBb3z3g325kT 9TeZSIVeWaX5sYS9w8pUtd4d2Qn0DKzQqPGEyQktmFmKgHf5D1jeUfzGpqxGrwv5rYzf nbIA== X-Gm-Message-State: AJIora/V7Y7elcDs209soCuC/pAw8OYbCmDe4KVIXvLbYgyCb5idNTEi HpD7+6+Gw3nu0wjKkEZNGJjgdg== X-Received: by 2002:a1c:2981:0:b0:3a2:ffe9:945c with SMTP id p123-20020a1c2981000000b003a2ffe9945cmr21066933wmp.38.1658757941610; Mon, 25 Jul 2022 07:05:41 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id d6-20020a5d6446000000b0021db2dcd0aasm14340627wrw.108.2022.07.25.07.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 971BB1FFC4; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Subject: [PATCH v1 12/13] docs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE Date: Mon, 25 Jul 2022 15:05:19 +0100 Message-Id: <20220725140520.515340-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Since 30b5707c26 (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) we don't need the additional two parameters. Fix the documentation. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220712103131.2006653-1-alex.bennee@linaro.org> --- docs/devel/qom.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index e5fe3597cd..0cf9a714f0 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -292,8 +292,7 @@ in the header file: .. code-block:: c :caption: Declaring a simple type - OBJECT_DECLARE_SIMPLE_TYPE(MyDevice, my_device, - MY_DEVICE, DEVICE) + OBJECT_DECLARE_SIMPLE_TYPE(MyDevice, MY_DEVICE) This is equivalent to the following: From patchwork Mon Jul 25 14:05:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593283 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2719259mab; Mon, 25 Jul 2022 07:20:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u6FsUkjmVE2AXIAc0OFalcoldsR7fqGi0Sm+MDN76D03l9oXlLfa88aTtYPkq6eekYYc9K X-Received: by 2002:a0c:b2d0:0:b0:473:2c19:f1ee with SMTP id d16-20020a0cb2d0000000b004732c19f1eemr10402882qvf.130.1658758812691; Mon, 25 Jul 2022 07:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758812; cv=none; d=google.com; s=arc-20160816; b=OKTfVBjFLlD24W5MbHL+CxMvaIjOZ0DPm2Ajf1Fsnbp3gcRF7Y+61gywpopVlZJ/YO LbdNOUR4Mw0CqXdCFqMDVXHLXuZ2OQrW/LHgSw9jRTdoOgYFSl26maCon6jmUhC8oWby 7hDLBEx0+8gHPhCqyWyQmJLjWWBMzuZxZ5yvyRmmeUmP04zse31CJDeo0uKMdb4qNQVG s+93A9UVD6AjZuSHkk/BS2cVZy15xXoEUrkk5I7jqVliWXGPZIQR89g6lnu0ObDZdDDg noqyJSagGprL1OWlb4AEaGtl0qNA9W+MIpelfqFIg79HSfvCVrwLICE169igYsh3JptS EY7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yQHi3qi6aG35eG8P049O7wbJjnFPGC8qjPo4fmEPSBw=; b=eGVFlwezMpFtNp2qo3Gpdue9qpZK8WAGkKL8wRR8wKbRQJhuG3PtUhxPjGtVJ2nWP6 rhxadfNOtnF37jDnkqUdPEbjI7QeGm+JXJbFyIAgZ7B9sI1E65kpg+iIbup1GHxMuZBD iVoSI5/CF3PoT/UbC5GjRnZ4R60lGIBlyk0U/yZAN4QMmkQ5epQah/hPdPEVgIOZ8XBs 50hZZratcIYNKwD6JZ0uoH4zXK9UrdZfn1RRbqbr4XIpajDVbqfdUeYaaBwau3t1stVv iYPdQjfK1gwNkfQklSoODDIYtfsVUNwo9TttpAp/KkvHcRWv+Ast+Jf9MOukMJJqNtkb qGlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lh7VA0t0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w29-20020a05620a0e9d00b006b5b62cc9f3si6632517qkm.105.2022.07.25.07.20.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lh7VA0t0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFywO-00020b-9d for patch@linaro.org; Mon, 25 Jul 2022 10:20:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiL-000124-PA for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:43 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:39433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiJ-0000HS-TZ for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:41 -0400 Received: by mail-wr1-x42d.google.com with SMTP id d8so16056038wrp.6 for ; Mon, 25 Jul 2022 07:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yQHi3qi6aG35eG8P049O7wbJjnFPGC8qjPo4fmEPSBw=; b=lh7VA0t080BZXYIl28Jh85hl/sV7R1qNkaSKrhx9l0X6ZFal2zlS0xPQJTMLIPGOKW tkNYwzd8IyEjnTBaQt2JQdDgZgo0uZR/oqWd3AJxTveGUlPnyIoXZdRj6ZFy+EHqd6xI rouyCNvQYP6OVxP5WYlrtKkobGqq/UOaOfDqWmSrZ8DHFbXqBW3k7erzcvr5sGA2mk+A K3iDgqVu4mRHRqQswzbBZQOVmWQp21HfXSwn3hYYaJKWMXmX0/5Nj1WYp1n9RFkdyPqz sSda42lgswN8HQZd4qXQB2xWaAeyKvqkBB9XdMqeLjgIJt49Wlvj8u6c7M3zGFgp07cR kQMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yQHi3qi6aG35eG8P049O7wbJjnFPGC8qjPo4fmEPSBw=; b=6CLdeqryYaWaIMxvip09SvgAjy6Xb7OKZyspiCPfvVvl2PFmFdNOHnB80O7aMUhI37 2oWeyORR9SW9ISQ5h5zSBWg62ENn/8Gm5bAcWpLdbyzZkOWRcaYW8EH8Uv0VKyXaozpj F6kXcuRIflX+coan3lTDezw78100E394JhYYLJ/LseymwVY2PfSbcaQN80WD99h2X/VH suhGW89fLEOXt8LeBikjIVicX8CGYFgRWZVpcqEApDnmSVsBHDTvqirP2XEGxcw5lO+h ovSgXB4j/3ewidAZ8bPW/J3IVNQ6HYDUZ/arPQMYRcLlVmXTIR9QSZjwJapdr/YjEbT1 jpCg== X-Gm-Message-State: AJIora+0Gl8tK8C+zbUYCUIypWI4X5O1Y6mVqRNm7/iNKetx/vDJtkD5 kYe4ieBY5GhbW16ovHpFBqN4Hg== X-Received: by 2002:a5d:5451:0:b0:21d:2295:6a05 with SMTP id w17-20020a5d5451000000b0021d22956a05mr7731918wrv.302.1658757938444; Mon, 25 Jul 2022 07:05:38 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id c25-20020a7bc859000000b003a0375c4f73sm14366662wml.44.2022.07.25.07.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AD87E1FFC5; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= Subject: [PATCH v1 13/13] qemu-options: bring the kernel and image options together Date: Mon, 25 Jul 2022 15:05:20 +0100 Message-Id: <20220725140520.515340-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" How to control the booting of QEMU is often a source of confusion for users. Bring the options that control this together in the manual pages and add some verbiage to describe when each option is appropriate. This attempts to codify some of the knowledge expressed in: https://stackoverflow.com/questions/58420670/qemu-bios-vs-kernel-vs-device-loader-file/58434837#58434837 Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Cédric Le Goater Message-Id: <20220707151037.397324-1-alex.bennee@linaro.org> --- qemu-options.hx | 96 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 18 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 8e17c5064a..3f23a42fa8 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1585,13 +1585,6 @@ SRST Use file as SecureDigital card image. ERST -DEF("pflash", HAS_ARG, QEMU_OPTION_pflash, - "-pflash file use 'file' as a parallel flash image\n", QEMU_ARCH_ALL) -SRST -``-pflash file`` - Use file as a parallel flash image. -ERST - DEF("snapshot", 0, QEMU_OPTION_snapshot, "-snapshot write to temporary files instead of disk image files\n", QEMU_ARCH_ALL) @@ -3684,12 +3677,67 @@ DEFHEADING() #endif -DEFHEADING(Linux/Multiboot boot specific:) +DEFHEADING(Boot Image or Kernel specific:) +SRST +There are broadly 4 ways you can boot a system with QEMU. + + - specify a firmware and let it control finding a kernel + - specify a firmware and pass a hint to the kernel to boot + - direct kernel image boot + - manually load files into the guest's address space + +The third method is useful for quickly testing kernels but as there is +no firmware to pass configuration information to the kernel the +hardware must either be probeable, the kernel built for the exact +configuration or passed some configuration data (e.g. a DTB blob) +which tells the kernel what drivers it needs. This exact details are +often hardware specific. + +The final method is the most generic way of loading images into the +guest address space and used mostly for ``bare metal`` type +development where the reset vectors of the processor are taken into +account. + +ERST + SRST -When using these options, you can use a given Linux or Multiboot kernel -without installing it in the disk image. It can be useful for easier -testing of various kernels. +For x86 machines and some other architectures ``-bios`` will generally +do the right thing with whatever it is given. For other machines the +more strict ``-pflash`` option needs an image that is sized for the +flash device for the given machine type. + +Please see the :ref:`system-targets-ref` section of the manual for +more detailed documentation. + +ERST + +DEF("bios", HAS_ARG, QEMU_OPTION_bios, \ + "-bios file set the filename for the BIOS\n", QEMU_ARCH_ALL) +SRST +``-bios file`` + Set the filename for the BIOS. +ERST + +DEF("pflash", HAS_ARG, QEMU_OPTION_pflash, + "-pflash file use 'file' as a parallel flash image\n", QEMU_ARCH_ALL) +SRST +``-pflash file`` + Use file as a parallel flash image. +ERST + +SRST + +The kernel options were designed to work with Linux kernels although +other things (like hypervisors) can be packaged up as a kernel +executable image. The exact format of a executable image is usually +architecture specific. + +The way in which the kernel is started (what address it is loaded at, +what if any information is passed to it via CPU registers, the state +of the hardware when it is started, and so on) is also architecture +specific. Typically it follows the specification laid down by the +Linux kernel for how kernels for that architecture must be started. ERST @@ -3729,6 +3777,25 @@ SRST kernel on boot. ERST +SRST + +Finally you can also manually load images directly into the address +space of the guest. This is most useful for developers who already +know the layout of their guest and take care to ensure something sane +will happen when the reset vector executes. + +The generic loader can be invoked by using the loader device: + +``-device loader,addr=,data=,data-len=[,data-be=][,cpu-num=]`` + +there is also the guest loader which operates in a similar way but +tweaks the DTB so a hypervisor loaded via ``-kernel`` can find where +the guest image is: + +``-device guest-loader,addr=[,kernel=,[bootargs=]][,initrd=]`` + +ERST + DEFHEADING() DEFHEADING(Debug/Expert options:) @@ -4179,13 +4246,6 @@ SRST To list all the data directories, use ``-L help``. ERST -DEF("bios", HAS_ARG, QEMU_OPTION_bios, \ - "-bios file set the filename for the BIOS\n", QEMU_ARCH_ALL) -SRST -``-bios file`` - Set the filename for the BIOS. -ERST - DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \ "-enable-kvm enable KVM full virtualization support\n", QEMU_ARCH_ARM | QEMU_ARCH_I386 | QEMU_ARCH_MIPS | QEMU_ARCH_PPC |