From patchwork Thu Aug 10 15:36:33 2023 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: 712362 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp722452rwb; Thu, 10 Aug 2023 08:38:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHH4w4O4Lxy0I/2ZbteLYxynHck8Y+xxv1KUC7MT41e+aa40SERCAnZFxYwDyCDkZyXJRcf X-Received: by 2002:ac8:4e88:0:b0:403:b219:89ed with SMTP id 8-20020ac84e88000000b00403b21989edmr4012314qtp.30.1691681932809; Thu, 10 Aug 2023 08:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681932; cv=none; d=google.com; s=arc-20160816; b=AdYlD8ikvpxQY1EH27PjnpYDB7Z36R0UlJDEACFmMbf7OE2icdAhaTus0421Rfu+ZO 4EUxYSWwNZc3onS5NrKnI2p1WF4bzhis+7w+DEvj8d39Nl9jRr3Rz0YGAwv5W0j0NgDs Bp350qjtlpcwqMrvw1fzGz0yrPRdJxfm/imrHPSlLanBEFs6BFVjrYYmMlb68Q89KJrD gQp0hFE4qzrXDVx6sjDlJNYQUSu+SksHclSTpC5sACf2urFoy52yjzzUORUq0zrP3N9Z ucSz+u3TrKC0HtHBudgZeq+aWMeN+LyRiJ5JcRNgI8SdbZOtNqYWsf331KgRZnfxciVb n93g== 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=yFrqHRj+4Z4QeOb4gTibh0+O8iFD1dFK/WKj4LG+z60=; fh=q05CtLiX84ydTzSA+xoWoOnUL8blQtXSso2vMLh8xZk=; b=RCKOMABDUu/CREbIefz/fb+4gVGrjypbtF183766KBux8l4TYEdSggVyGTDEOkZfyL +JgJEA6FLn9UtydwS0hVlRGQS/xPwqduMSvyr2VXz0kWWwLFTs6ERFp8M6Ihmca5e+2X WkDWSyIRxdpLSfT4zfZtxe8MvC3r0iI9cU5s/Lj74UnOTmGgQD1w0dPZEz4zP4PUCEgx GOH4D7iZqY01TAvV0LJhY/X5FC/BlD7xsCotSpHUjmxl7T30LeuARPY7VvipK2i83KNw y2nfwURIyqMrkxmupGdWmrT56G6Ukj3WKyrQZ39eXs1HXv3w5aqZnc6BacsfdhIPf+jI IQxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l+Z1Oqa9; 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 n4-20020ac85b44000000b00403e8a6a4cfsi1084312qtw.333.2023.08.10.08.38.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:38:52 -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=l+Z1Oqa9; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iT-0005JY-R5; Thu, 10 Aug 2023 11:36:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iR-0005Gv-SP for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:47 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iN-0003DF-MD for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:47 -0400 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b9bee2d320so16312511fa.1 for ; Thu, 10 Aug 2023 08:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681802; x=1692286602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yFrqHRj+4Z4QeOb4gTibh0+O8iFD1dFK/WKj4LG+z60=; b=l+Z1Oqa9avORaOhDK4kJhZjAFsl+LCRNIpuJ4/qeOK+0q4PF22NWO2pe+pKoEgeiis aBlDVo0neSbu96k402fEUSnW3JOX4eQRcoScsJOwp7QQjbw6IH33kqshGd2tSTSWzbfV K6GJiHo3EXC84ZdvDQZ18uAHjJUBK9+/lu1NVW12moqREbQvwOsG/dsGGjGz4Gvcsc89 1s+12P2lhOhwj02egZ5PjNEqjil1l0tGyUbOs5MFKFFT5ElEhjH3iS7kefXnu7oxwVpL C6qMuQqij2nxdwm22y2hc2pPZZfXBZa2GXHbC9/UXuH1/ztj+3JKmzUkgHNMSyueNXsQ mYGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681802; x=1692286602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yFrqHRj+4Z4QeOb4gTibh0+O8iFD1dFK/WKj4LG+z60=; b=NjoD+GEyCKEevYy+Dp4xU6Xm6X6BKQ50+hZQqPUpVPhVS7Ne5U0CX6K2GzzxkmasOt R/OVApymzrtkAKu/FREHHk34bWbVMqPc3FOis6NljlY751oayikqYPPBIzxES9jvBkN7 lB+QHMlYNt4dAUGaNbS578o/XecSK/Le4u5MuffITiSi2YFZr51WKquQYnM+1c725z6l sfJ0wXKvsHZpSWYBYe3KLDVXAURJLUCgQfDPVXzPgOieAD2OLImN3GZt5B3Sf0vPMDD4 xsR7GRoN06UWs9soO8h6U4iBeQmW+TJ4oUyhZdJXfAhUZOH0khzVtauOliIhEHKLsTvM WNsA== X-Gm-Message-State: AOJu0YyxRYsdP4Kd9dm4q5OVS31ExZc9QwnWD3MNCqe1gdH6jIriUuYt 0ds0MA9X4Fu4oL8wLnCvuRxqZsXi6AS07o+xvVg= X-Received: by 2002:a2e:8ed9:0:b0:2b9:ad7d:a144 with SMTP id e25-20020a2e8ed9000000b002b9ad7da144mr2355267ljl.11.1691681801570; Thu, 10 Aug 2023 08:36:41 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k3-20020a056000004300b003177074f830sm2550327wrx.59.2023.08.10.08.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D2AD71FFBC; Thu, 10 Aug 2023 16:36:40 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= Subject: [PATCH 1/8] gitlab: enable ccache for many build jobs Date: Thu, 10 Aug 2023 16:36:33 +0100 Message-Id: <20230810153640.1879717-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x229.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 autolearn=unavailable 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-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé The `ccache` tool can be very effective at reducing compilation times when re-running pipelines with only minor changes each time. For example a fresh 'build-system-fedora' job will typically take 20 minutes on the gitlab.com shared runners. With ccache this is reduced to as little as 6 minutes. Normally meson would auto-detect existance of ccache in $PATH and use it automatically, but the way we wrap meson from configure breaks this, as we're passing in an config file with explicitly set compiler paths. Thus we need to add $CCACHE_WRAPPERSPATH to the front of $PATH. For unknown reasons if doing this in msys though, gcc becomes unable to invoke 'cc1' when run from meson. For msys we thus set CC='ccache gcc' before invoking 'configure' instead. A second problem with msys is that cache misses are incredibly expensive, so enabling ccache massively slows down the build when the cache isn't well populated. This is suspected to be a result of the cost of spawning processes under the msys architecture. To deal with this we set CCACHE_DEPEND=1 which enables ccache's 'depend_only' strategy. This avoids extra spawning of the pre-processor during cache misses, with the downside that is it less likely ccache will find a cache hit after semantically benign compiler flag changes. This is the lesser of two evils, as otherwise we can't use ccache at all under msys and remain inside the job time limit. If people are finding ccache to hurt their pipelines, it can be disabled by setting the 'CCACHE_DISABLE=1' env variable against their gitlab fork CI settings. Signed-off-by: Daniel P. Berrangé Message-Id: <20230804111054.281802-2-berrange@redhat.com> Signed-off-by: Alex Bennée --- docs/devel/ci-jobs.rst.inc | 7 +++++ .gitlab-ci.d/buildtest-template.yml | 11 ++++++++ .gitlab-ci.d/crossbuild-template.yml | 26 +++++++++++++++++++ .gitlab-ci.d/windows.yml | 13 ++++++++-- .../dockerfiles/debian-hexagon-cross.docker | 9 ++++++- 5 files changed, 63 insertions(+), 3 deletions(-) diff --git a/docs/devel/ci-jobs.rst.inc b/docs/devel/ci-jobs.rst.inc index 3f6802d51e..4c39cdb2d9 100644 --- a/docs/devel/ci-jobs.rst.inc +++ b/docs/devel/ci-jobs.rst.inc @@ -188,3 +188,10 @@ If you've got access to a CentOS Stream 8 x86_64 host that can be used as a gitlab-CI runner, you can set this variable to enable the tests that require this kind of host. The runner should be tagged with both "centos_stream_8" and "x86_64". + +CCACHE_DISABLE +~~~~~~~~~~~~~~ +The jobs are configured to use "ccache" by default since this typically +reduces compilation time, at the cost of increased storage. If the +use of "ccache" is suspected to be hurting the overall job execution +time, setting the "CCACHE_DISABLE=1" env variable to disable it. diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index f3e39b7eb1..4fbfeb6667 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -2,11 +2,21 @@ extends: .base_job_template stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG + cache: + paths: + - ccache + key: "$CI_JOB_NAME" + when: always before_script: - JOBS=$(expr $(nproc) + 1) script: + - export CCACHE_BASEDIR="$(pwd)" + - export CCACHE_DIR="$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE="500M" + - export PATH="$CCACHE_WRAPPERSDIR:$PATH" - mkdir build - cd build + - ccache --zero-stats - ../configure --enable-werror --disable-docs --enable-fdt=system ${TARGETS:+--target-list="$TARGETS"} $CONFIGURE_ARGS || @@ -20,6 +30,7 @@ then make -j"$JOBS" $MAKE_CHECK_ARGS ; fi + - ccache --show-stats # We jump some hoops in common_test_job_template to avoid # rebuilding all the object files we skip in the artifacts diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml index d97611053b..3e5f4d9cd8 100644 --- a/.gitlab-ci.d/crossbuild-template.yml +++ b/.gitlab-ci.d/crossbuild-template.yml @@ -2,10 +2,20 @@ extends: .base_job_template stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG + cache: + paths: + - ccache + key: "$CI_JOB_NAME" + when: always timeout: 80m script: + - export CCACHE_BASEDIR="$(pwd)" + - export CCACHE_DIR="$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE="500M" + - export PATH="$CCACHE_WRAPPERSDIR:$PATH" - mkdir build - cd build + - ccache --zero-stats - ../configure --enable-werror --disable-docs --enable-fdt=system --disable-user $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS --target-list-exclude="arm-softmmu cris-softmmu @@ -18,6 +28,7 @@ version="$(git describe --match v[0-9]* 2>/dev/null || git rev-parse --short HEAD)"; mv -v qemu-setup*.exe qemu-setup-${version}.exe; fi + - ccache --show-stats # Job to cross-build specific accelerators. # @@ -29,7 +40,15 @@ stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG timeout: 30m + cache: + paths: + - ccache/ + key: "$CI_JOB_NAME" script: + - export CCACHE_BASEDIR="$(pwd)" + - export CCACHE_DIR="$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE="500M" + - export PATH="$CCACHE_WRAPPERSDIR:$PATH" - mkdir build - cd build - ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS @@ -40,7 +59,14 @@ extends: .base_job_template stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG + cache: + paths: + - ccache/ + key: "$CI_JOB_NAME" script: + - export CCACHE_BASEDIR="$(pwd)" + - export CCACHE_DIR="$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE="500M" - mkdir build - cd build - ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index cd7622a761..12a987cd71 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -5,13 +5,14 @@ - windows - windows-1809 cache: - key: "${CI_JOB_NAME}-cache" + key: "$CI_JOB_NAME" paths: - msys64/var/cache + - ccache when: always needs: [] stage: build - timeout: 80m + timeout: 100m variables: # This feature doesn't (currently) work with PowerShell, it stops # the echo'ing of commands being run and doesn't show any timing @@ -72,6 +73,7 @@ bison diffutils flex git grep make sed $MINGW_TARGET-capstone + $MINGW_TARGET-ccache $MINGW_TARGET-curl $MINGW_TARGET-cyrus-sasl $MINGW_TARGET-dtc @@ -101,11 +103,18 @@ - Write-Output "Running build at $(Get-Date -Format u)" - $env:CHERE_INVOKING = 'yes' # Preserve the current working directory - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink + - $env:CCACHE_BASEDIR = "$env:CI_PROJECT_DIR" + - $env:CCACHE_DIR = "$env:CCACHE_BASEDIR/ccache" + - $env:CCACHE_MAXSIZE = "500M" + - $env:CCACHE_DEPEND = 1 # cache misses are too expensive with preprocessor mode + - $env:CC = "ccache gcc" - mkdir build - cd build + - ..\msys64\usr\bin\bash -lc "ccache --zero-stats" - ..\msys64\usr\bin\bash -lc "../configure --enable-fdt=system $CONFIGURE_ARGS" - ..\msys64\usr\bin\bash -lc "make" - ..\msys64\usr\bin\bash -lc "make check MTESTARGS='$TEST_ARGS' || { cat meson-logs/testlog.txt; exit 1; } ;" + - ..\msys64\usr\bin\bash -lc "ccache --show-stats" - Write-Output "Finished build at $(Get-Date -Format u)" msys2-64bit: diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker index c2cfb6a5d0..578269766c 100644 --- a/tests/docker/dockerfiles/debian-hexagon-cross.docker +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -15,6 +15,7 @@ RUN apt-get update && \ # Install common build utilities apt-get install -y --no-install-recommends \ curl \ + ccache \ xz-utils \ ca-certificates \ bison \ @@ -24,13 +25,19 @@ RUN apt-get update && \ python3-venv && \ # Install QEMU build deps for use in CI DEBIAN_FRONTEND=noninteractive eatmydata \ - apt build-dep -yy --arch-only qemu + apt build-dep -yy --arch-only qemu && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc ENV TOOLCHAIN_INSTALL /opt ENV TOOLCHAIN_RELEASE 16.0.0 ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl" ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/v${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL" ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin From patchwork Thu Aug 10 15:36:34 2023 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: 712357 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp721648rwb; Thu, 10 Aug 2023 08:37:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF1AUNt8BGXftiChOExQEBNZ36NLCR65Vg2+HoonYmi4fnEprsE00XDKe2Vang1uBpg5K20 X-Received: by 2002:a05:622a:100d:b0:406:8bc2:6ba8 with SMTP id d13-20020a05622a100d00b004068bc26ba8mr4048205qte.2.1691681853887; Thu, 10 Aug 2023 08:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681853; cv=none; d=google.com; s=arc-20160816; b=TfZWUBf2W3dEMQToth9yPeg+vyOfpPFqwh8QFemKHwmBS4B9Bo0zYQcgKEbfhPGOUN /OXMLEHUcYIELYQeafETWqC+8XX1fmkMwhnq/9BVzmxukUXArj0KdVpQExA0w/omzDxD r9o1/u0vx+GYCmLXTF7p488Xi3R3InCXHG6j4FPI9uWbgTMMZiEL+HJJbfl1fQ4PTVMo AVuUPHdNLQC8kUvZUImbplxt6uAco3JYy0cAXZvQC3yx60ZpOO1QXGibgpZ/tXXXYSwR 03r2I9RkvyKq6C3xjLV5K1w6dkZze4Yk56QLeHSXfuGfCpNMBQRtUhxU7Irxccbw9jnE YswQ== 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=KrI0uKRluPvPH9UgmpgsTWgL+pnARwaqZASSAgNcoKA=; fh=qB6qsUxbxKbTZmjsWUc4Ke7azY87y2Vvvlw9q2TjVaE=; b=gCkIVzcNTT4OrZCqd8YFySpm1dGba6tfrm6LimEkgh7vMPcX3oMzW99LrEUsGlAkFf zoiXCiwmUGMhIwFaDKBINp+lS+CpAS0vsbCcUijOJg+4ZDcRsoGQ6cl1HPV9UtuLuwBb 8I0XXq3+fQQM2sCZx+/vjzzHCNbXaZiCl9zNKBrRRVNp9lSb6tpn13K56Ot+x+BnYA5w B3TGdvG1kZekK61+kc+vqNEHDYoDn8a56kBFg/hmEYfP3EVvTj+b2HdUcSr1lebpDyh2 6SJDqdLwBhoBC6DvAzNynzCWq4FRWLXk1KkdJ1KUofWj0qemhQ8DtyZRfaLDh6tfGOtX Dkag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q2gEd4vm; 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 6-20020ac85746000000b003ff1fe3856dsi1095894qtx.138.2023.08.10.08.37.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:37: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=Q2gEd4vm; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iS-0005II-QT; Thu, 10 Aug 2023 11:36:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iQ-0005EJ-RD for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:46 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iN-0003DQ-N7 for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:46 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-317f1c480eeso985693f8f.2 for ; Thu, 10 Aug 2023 08:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681802; x=1692286602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KrI0uKRluPvPH9UgmpgsTWgL+pnARwaqZASSAgNcoKA=; b=Q2gEd4vmUE7OAkpqggQle9I1UxlYKkvMhmEftWJC1/HNp3a95Zyw4SvNXU3G25xUIZ AaqEbfhhOg2awpbpiVmVdkFy21/NGj23VL/Mu6L9xvflA6SfKCXQ4FFtBmtxeLsWYgPf CvwMcds7E6rAuC8k/AByq48ir46GoqfGQnj6bZsrDThwMq2TD3BPyZN98wiykD97K3YM MO7XXkK2EJ+KqDBwiIETSRYGF+t6GRkV22NuQZP2hctPvoTi/gDqnyvIWQLPZzQAwGxm F4zkAAbOJlb2S45wNdJlnVt4U0U+4/b14y5BPCntHhv9HW6qd9bZcpxN2/xgfYDvueSU Yi6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681802; x=1692286602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KrI0uKRluPvPH9UgmpgsTWgL+pnARwaqZASSAgNcoKA=; b=C1R/a1bFRYpdI5IeW7DGGCEaMBDEw8a+bRfY/AJ0vUyNsy8yZ9k89qEq71sjTUpxGs fUntevmmNW4Lpz6Lzwgj6apQ6boCEACONsLBSIvwbOU4Kd1LoMHrPHe5q/pz+5Ui85bD Vaqt/By3Eq1TOyN1kOh7lAewwbOPeRXMAOVRS9QqOoMH18enspwO0p/mrhSsJc4dLn+B KEmLFD+slL04Q11E5HRV0oTD2AxNc6EepH8Di4mappWrgu/3eTJXxZUvn3DdA3b2BxLP hhUoMvu7SVJVXWMeAVYsOegMtKl/q0yjWp3tnB2W70MJB30Eoo8NDFeSsQku7No7bJfj n8Rg== X-Gm-Message-State: AOJu0Yy6xUbnaLkwkgfyKkgcfJ+qsgODK2FSZ6Ph/cPfbEiYBl/9UNKX fQWCmXmVcxzkyp3c8nkyEM37dQ== X-Received: by 2002:a5d:4090:0:b0:317:cff4:7357 with SMTP id o16-20020a5d4090000000b00317cff47357mr2294141wrp.20.1691681801988; Thu, 10 Aug 2023 08:36:41 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v9-20020a5d6b09000000b0031759e6b43fsm2564444wrw.39.2023.08.10.08.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EA76E1FFBD; Thu, 10 Aug 2023 16:36:40 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta Subject: [PATCH 2/8] tests/docker: cleanup non-verbose output Date: Thu, 10 Aug 2023 16:36:34 +0100 Message-Id: <20230810153640.1879717-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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 autolearn=unavailable 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-bounces+patch=linaro.org@nongnu.org Even with --quiet docker will spam the sha256 to the console. Avoid this by redirecting stdout. While we are at it fix the name we echo which was broken during 0b1a649047 (tests/docker: use direct RUNC call to build containers). Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- tests/docker/Makefile.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 142e8605ee..dfabafab92 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -46,9 +46,9 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker --build-arg BUILDKIT_INLINE_CACHE=1 \ $(if $(NOUSER),, \ --build-arg USER=$(USER) \ - --build-arg UID=$(UID)) \ - -t qemu/$* - < $<, \ - "BUILD", $1) + --build-arg UID=$(UID)) \ + -t qemu/$* - < $< $(if $V,,> /dev/null),\ + "BUILD", $*) # Special rule for debootstraped binfmt linux-user images docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker From patchwork Thu Aug 10 15:36:35 2023 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: 712360 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp722286rwb; Thu, 10 Aug 2023 08:38:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEDSOy7eDQBrrkjyTfBE5/ZADy/D9SPqoIQg939fPSzqnXcjTtZfPuDIUwOJayaJoB2zW7 X-Received: by 2002:a05:6102:14f:b0:444:c49c:a95d with SMTP id a15-20020a056102014f00b00444c49ca95dmr2186068vsr.7.1691681917226; Thu, 10 Aug 2023 08:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681917; cv=none; d=google.com; s=arc-20160816; b=Br5ZCHtXjh6V7jO0IMx1Tk08fGiFyB7TMaR8HAjImz34P4R3UFAmu0Dvuew52UoG71 BKKvb4Spwzf2EQxJbAsorjEczzVJWMmnPtPRB2XT6Ovt4MTSgMH+0JwI/UlcDJ2d00iU jIr48jqcVjisXpOg8Nq1+McPTpfB3nFa9Q6FyqtlIIcfLqY4Xth4nKcDNcshsStDvPB3 wPoQ136DErB4Urzl3kyA8NoDIvMIkz+hHpUx0sfxmsAUiGSBbNGskVW/VG0o/nG09IJ1 h0b6ekaq4ahhO2Zxa+j/eCJkTwyY8JY5BgkT867KHtDcceG6/ALY+r5iSyJ/bUkJt2Of iTEg== 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=zmxc9TJQtQlM8I+f5bFmXe4lR5ba4YtE7Jx4G0eSh04=; fh=qB6qsUxbxKbTZmjsWUc4Ke7azY87y2Vvvlw9q2TjVaE=; b=wmpUHHa+dTFNHtJm7wdHqolnerScsrMRe+YFM/ROCrkZ7QF/lAK+FD4bHlEFto1xlr KA9egbmikxtAwPx6EBBrZREuQ2RQQxkLxuRN7Kdk9UFqA+gIpOW4/ukFfKIpLqjqStGK bExyJ1jM+XG5OR5L0DagWcvWXJqSg9+NCrFmEO3RzVm3hqKcDuYUk9cRPGuFCPNBh6K9 2EMz92fQFMJBS1xP/neW1ZcSJn786BX4QcWhaGlbfqe4cFHO1YASfzlHELnJEUk31WxQ /V9cXMbobJ7tjB+eCw93uFWEMYZrz4smEdLBC8s3ZzrK7YWdnilbrTPplAUTzmmG1LbJ skzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KTm/eMyY"; 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 h6-20020a05620a284600b007672b4ff13fsi1011976qkp.604.2023.08.10.08.38.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:38:37 -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="KTm/eMyY"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iW-0005Mf-0H; Thu, 10 Aug 2023 11:36:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iT-0005Ix-AJ for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:49 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iO-0003Dc-9t for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:49 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fe1e1142caso9558845e9.0 for ; Thu, 10 Aug 2023 08:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681802; x=1692286602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zmxc9TJQtQlM8I+f5bFmXe4lR5ba4YtE7Jx4G0eSh04=; b=KTm/eMyYMcfCStyXPMlT3wIrKdqn2tDLrbSelspxoYaR86IqMb6OvwmbeofPPGIIxI JqYfLGycRwO8HCknAa+wMouAmESw3hu6U48jODFIIM/kOUIcxcVUyS835h1vz7OhaHQP AeLsjXA6FPjRKJsigaW96QX0NUXbhdtewilm1y/PzHzKrDS1uBnD9q8WfNxxknJeTLaD city+j2sTQWEQGHPhrq8kFUfLqvZCpaEzWLdzL6umgU3rXDlX7I7TtyJ8GXIKixrUW5b bkv+suj3rc2GjhPBIXU2iaSQJlkp7E9PNrGSVC0LD7/za1GdCpT4swuN3AR6dJav3Ekv mYgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681802; x=1692286602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zmxc9TJQtQlM8I+f5bFmXe4lR5ba4YtE7Jx4G0eSh04=; b=O/q5D8pGfkGjOTP0jm2J3/5WFv5C2UT6TFWDgPAW6rWtMsj/CRw0+zbdJ5MLcPiR34 0OhHPwrdFvLR/7Z8TclMaXLDuZbZj/RdvFw2DYySkeFi9SF/cs5S4JzKJC30Z/dFv8yE 3qc3ptgZ8dlu0Lz4LrBgizA/xpeoIVzeukxlGUfmba4rMFvQ/baEibFb8A1UKZozfGjB ED567fQlQeE7FTtdvP35tYCMn36yrfzlEs6QdJ/gloS78O4OkBWchEUEhMAUP2h9Ytma aTPkNJrdXR9THR9DZUEUuCni1diiNlyHsb+qz194Xk9tiuj1rZwZeVoQGa5EtSqvJMsM Pyyg== X-Gm-Message-State: AOJu0Yx9mtSj1KNJoXGhYTOK65KNlt2azP9MP4ZH3x4DRLMwbMMou1RD qlzEcPCsDKIYG5oopNJzBqIMVg== X-Received: by 2002:a7b:c7cc:0:b0:3fb:b3aa:1c8a with SMTP id z12-20020a7bc7cc000000b003fbb3aa1c8amr2286118wmk.16.1691681802192; Thu, 10 Aug 2023 08:36:42 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y10-20020a1c4b0a000000b003fe2f3a89d4sm2510343wma.7.2023.08.10.08.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 121F01FFBE; Thu, 10 Aug 2023 16:36:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta Subject: [PATCH 3/8] tests/tcg: remove quoting for info output Date: Thu, 10 Aug 2023 16:36:35 +0100 Message-Id: <20230810153640.1879717-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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 autolearn=unavailable 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-bounces+patch=linaro.org@nongnu.org This avoids ugly multi-line wrapping for the test on non V=1 builds. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target | 2 +- tests/tcg/multiarch/system/Makefile.softmmu-target | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 617f821613..75347ebe70 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -14,7 +14,7 @@ AARCH64_TESTS=fcvt pcalign-a64 fcvt: LDFLAGS+=-lm run-fcvt: fcvt - $(call run-test,$<,$(QEMU) $<, "$< on $(TARGET_NAME)") + $(call run-test,$<,$(QEMU) $<) $(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref) config-cc.mak: Makefile diff --git a/tests/tcg/multiarch/system/Makefile.softmmu-target b/tests/tcg/multiarch/system/Makefile.softmmu-target index 7ba9053375..a051d689d7 100644 --- a/tests/tcg/multiarch/system/Makefile.softmmu-target +++ b/tests/tcg/multiarch/system/Makefile.softmmu-target @@ -37,10 +37,10 @@ run-gdbstub-untimely-packet: hello --qemu $(QEMU) \ --bin $< --qargs \ "-monitor none -display none -chardev file$(COMMA)path=untimely-packet.out$(COMMA)id=output $(QEMU_OPTS)", \ - "softmmu gdbstub untimely packets") + softmmu gdbstub untimely packets) $(call quiet-command, \ (! grep -Fq 'Packet instead of Ack, ignoring it' untimely-packet.gdb.err), \ - "GREP", "file untimely-packet.gdb.err") + "GREP", file untimely-packet.gdb.err) else run-gdbstub-%: $(call skip-test, "gdbstub test $*", "no guest arch support") From patchwork Thu Aug 10 15:36:36 2023 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: 712359 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp722247rwb; Thu, 10 Aug 2023 08:38:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqlA97bvWKvB3QefkUXApra/7cfxPNgFSzFgboiYO3ItuHnDvL8+U53scOkrubp9sDVgsA X-Received: by 2002:a05:622a:252:b0:405:4eec:6365 with SMTP id c18-20020a05622a025200b004054eec6365mr3661390qtx.53.1691681912701; Thu, 10 Aug 2023 08:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681912; cv=none; d=google.com; s=arc-20160816; b=pZHJ3c+iJJDSZiG/Fa3LyZb2noWSfKchiH9eEgWjrINyREfdOUdfKcSqDddawfFF4B ASJshKcXUyiCKD3mEH2hAzHnhrZOO8j+9VLBRDv+BqOtnkoX12A6Mwzn/XqX/VfmQ3UO KFSZUjYWpTghXO3UosWUyEyFjdyHsfdMCdr7s51K5iIjmCGTHQERNfLN5kRvdv/BXumC ufCnbBkJmDK+wrGHC8Hy0JIFmsd7O8tDcBW8nM1hu8PejBE4kq9Jj2bR5BkAU2Lgm373 5WFoTs3Fg3p8EBEEo3hmH8Vf4y56N22JTy5LlZiwrhgM1zFOUxRJD5FrmaeuJigdOih0 ABRQ== 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=HWAw3yoUeeJNMPe6CX9phpQMFB1kiw2oQRZp+zWhjgY=; fh=qB6qsUxbxKbTZmjsWUc4Ke7azY87y2Vvvlw9q2TjVaE=; b=xKRYSspDorPe2acZNcH2CxIJVQVrfyPWCVGxyU2cL1V9toZvp6VmWy1W3VVSMORzLi Io31+Cgy0ob+IkThKNIUuq+0B3M02L6lfzeHvyHyPpX8JzBM+BxrcseqJU1VeT+amgwf keVMPHt5jAz+oGV/KlYPDrP+XDsAwlk7By7xJc21yRttII4eAnQlqmtJxN7ICIP6btfM WgxoZhnO5A0+chl70V6i0gPBSfl8LQUh7DcqQl1BmnKSdRt2fzL3IeDlUWfBFsJHSLOV yEXqu5KGQE4Uy8HCpJavP1EK9lyqKNkgQthYH+odhZGEH1vbr+x7UwA05Uh0JpIJDnX3 lmTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kj9H6RSl; 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 h13-20020ac85e0d000000b00409e2477114si1094990qtx.626.2023.08.10.08.38.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:38:32 -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=kj9H6RSl; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iW-0005Mm-34; Thu, 10 Aug 2023 11:36:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iU-0005Ka-Gu for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:50 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iO-0003E9-ND for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:50 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-317744867a6so980483f8f.1 for ; Thu, 10 Aug 2023 08:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681803; x=1692286603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HWAw3yoUeeJNMPe6CX9phpQMFB1kiw2oQRZp+zWhjgY=; b=kj9H6RSlF0FsIb7pJq9fiUuHput6wwM+Ft1OIvvAEAcKGpntIVkjyvSQGPk4RKfZ+z cj4/YqPeE4pGRiixZdnhp5q1e79XU1Wr8icdOv45UnNNl+Ed8yp1s0/6zOjqpaqj15Ca PT+BBaImiTYkpCTtk3WlC9GmiAqcOW7Esf+UG35Pab2uNb9BpBZUEelpo704jaH8A4GJ sOamGuzAe6fp5ub1qkyV2tRiOTU3j+O8jQRvQF8Jj/4QKQ6adCjkA/mqDw9AbvaF4G0+ 8LdBlm9cIPRnCP3ks9t1KJ9C++iPLA6LIesybGZDWZvATqYda1w05apWP51JAFApWAfr 6N6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681803; x=1692286603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HWAw3yoUeeJNMPe6CX9phpQMFB1kiw2oQRZp+zWhjgY=; b=B5DESBXFFADm4TZ6xvj5Kjs3JEDiYvXeVsyE1dOggeAQYPqYGfEhy02IloIBX9PVNW 3syR5gSq9oQUekZXXE9kScAx3LwuqgH1qXQhFBlCbZ2WfKMThNP3EgAu1bB5hj17KWhf 1WZiU+SraGHqMODDI0R9ztEVPWXGX429FJcPMbvd+WbNNEp6UUSDV6cHgHgCQkrPy8HM LsRCLdpqIjFFx5vGmjQCpzDBDzP9mYN7b8MTymVAR5JKnQkwvHxVGnIoYv8I/EF9PQTp G/n8ArlZdWF7cmEhFH43cF9xfX2szW9L10LOZljIZ0N1UzVzqN53KdyyWf0tbc96qKOa U7LA== X-Gm-Message-State: AOJu0YzARXIBrT3MAF4VQzgszB4RqYCIN6iEoV2euUEnTEs+wLYgyR3A FJI0Pfb+8hSueWMnz1+CFJxLS9sXDAQ1zHZlvQU= X-Received: by 2002:adf:dd8c:0:b0:30f:c5b1:23ef with SMTP id x12-20020adfdd8c000000b0030fc5b123efmr2346041wrl.41.1691681803389; Thu, 10 Aug 2023 08:36:43 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j4-20020adfe504000000b003177f57e79esm2497685wrm.88.2023.08.10.08.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2AACE1FFBF; Thu, 10 Aug 2023 16:36:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta Subject: [PATCH 4/8] tests: remove test-gdbstub.py Date: Thu, 10 Aug 2023 16:36:36 +0100 Message-Id: <20230810153640.1879717-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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 autolearn=unavailable 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-bounces+patch=linaro.org@nongnu.org This isn't directly called by our CI and because it doesn't run via our run-test.py script does things slightly differently. Lets remove it as we have plenty of working in-tree tests now for various aspects of gdbstub. Signed-off-by: Alex Bennée Acked-by: Richard Henderson --- tests/guest-debug/test-gdbstub.py | 177 ------------------------------ 1 file changed, 177 deletions(-) delete mode 100644 tests/guest-debug/test-gdbstub.py diff --git a/tests/guest-debug/test-gdbstub.py b/tests/guest-debug/test-gdbstub.py deleted file mode 100644 index 98a5df4d42..0000000000 --- a/tests/guest-debug/test-gdbstub.py +++ /dev/null @@ -1,177 +0,0 @@ -# -# This script needs to be run on startup -# qemu -kernel ${KERNEL} -s -S -# and then: -# gdb ${KERNEL}.vmlinux -x ${QEMU_SRC}/tests/guest-debug/test-gdbstub.py - -import gdb - -failcount = 0 - - -def report(cond, msg): - "Report success/fail of test" - if cond: - print ("PASS: %s" % (msg)) - else: - print ("FAIL: %s" % (msg)) - global failcount - failcount += 1 - - -def check_step(): - "Step an instruction, check it moved." - start_pc = gdb.parse_and_eval('$pc') - gdb.execute("si") - end_pc = gdb.parse_and_eval('$pc') - - return not (start_pc == end_pc) - - -def check_break(sym_name): - "Setup breakpoint, continue and check we stopped." - sym, ok = gdb.lookup_symbol(sym_name) - bp = gdb.Breakpoint(sym_name) - - gdb.execute("c") - - # hopefully we came back - end_pc = gdb.parse_and_eval('$pc') - print ("%s == %s %d" % (end_pc, sym.value(), bp.hit_count)) - bp.delete() - - # can we test we hit bp? - return end_pc == sym.value() - - -# We need to do hbreak manually as the python interface doesn't export it -def check_hbreak(sym_name): - "Setup hardware breakpoint, continue and check we stopped." - sym, ok = gdb.lookup_symbol(sym_name) - gdb.execute("hbreak %s" % (sym_name)) - gdb.execute("c") - - # hopefully we came back - end_pc = gdb.parse_and_eval('$pc') - print ("%s == %s" % (end_pc, sym.value())) - - if end_pc == sym.value(): - gdb.execute("d 1") - return True - else: - return False - - -class WatchPoint(gdb.Breakpoint): - - def get_wpstr(self, sym_name): - "Setup sym and wp_str for given symbol." - self.sym, ok = gdb.lookup_symbol(sym_name) - wp_addr = gdb.parse_and_eval(sym_name).address - self.wp_str = '*(%(type)s)(&%(address)s)' % dict( - type = wp_addr.type, address = sym_name) - - return(self.wp_str) - - def __init__(self, sym_name, type): - wp_str = self.get_wpstr(sym_name) - super(WatchPoint, self).__init__(wp_str, gdb.BP_WATCHPOINT, type) - - def stop(self): - end_pc = gdb.parse_and_eval('$pc') - print ("HIT WP @ %s" % (end_pc)) - return True - - -def do_one_watch(sym, wtype, text): - - wp = WatchPoint(sym, wtype) - gdb.execute("c") - report_str = "%s for %s (%s)" % (text, sym, wp.sym.value()) - - if wp.hit_count > 0: - report(True, report_str) - wp.delete() - else: - report(False, report_str) - - -def check_watches(sym_name): - "Watch a symbol for any access." - - # Should hit for any read - do_one_watch(sym_name, gdb.WP_ACCESS, "awatch") - - # Again should hit for reads - do_one_watch(sym_name, gdb.WP_READ, "rwatch") - - # Finally when it is written - do_one_watch(sym_name, gdb.WP_WRITE, "watch") - - -class CatchBreakpoint(gdb.Breakpoint): - def __init__(self, sym_name): - super(CatchBreakpoint, self).__init__(sym_name) - self.sym, ok = gdb.lookup_symbol(sym_name) - - def stop(self): - end_pc = gdb.parse_and_eval('$pc') - print ("CB: %s == %s" % (end_pc, self.sym.value())) - if end_pc == self.sym.value(): - report(False, "Hit final catchpoint") - - -def run_test(): - "Run through the tests one by one" - - print ("Checking we can step the first few instructions") - step_ok = 0 - for i in range(3): - if check_step(): - step_ok += 1 - - report(step_ok == 3, "single step in boot code") - - print ("Checking HW breakpoint works") - break_ok = check_hbreak("kernel_init") - report(break_ok, "hbreak @ kernel_init") - - # Can't set this up until we are in the kernel proper - # if we make it to run_init_process we've over-run and - # one of the tests failed - print ("Setup catch-all for run_init_process") - cbp = CatchBreakpoint("run_init_process") - cpb2 = CatchBreakpoint("try_to_run_init_process") - - print ("Checking Normal breakpoint works") - break_ok = check_break("wait_for_completion") - report(break_ok, "break @ wait_for_completion") - - print ("Checking watchpoint works") - check_watches("system_state") - -# -# This runs as the script it sourced (via -x) -# - -try: - print ("Connecting to remote") - gdb.execute("target remote localhost:1234") - - # These are not very useful in scripts - gdb.execute("set pagination off") - gdb.execute("set confirm off") - - # Run the actual tests - run_test() - -except: - print ("GDB Exception: %s" % (sys.exc_info()[0])) - failcount += 1 - import code - code.InteractiveConsole(locals=globals()).interact() - raise - -# Finally kill the inferior and exit gdb with a count of failures -gdb.execute("kill") -exit(failcount) From patchwork Thu Aug 10 15:36:37 2023 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: 712358 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp722216rwb; Thu, 10 Aug 2023 08:38:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZ4TwY/UpEfsKVLKT1dZsG1BMwVseyY7DLXJDOMKjU6ds6VFYDbhGVohdCWiGYiZO4mWaG X-Received: by 2002:a54:480c:0:b0:3a7:73e0:d18f with SMTP id j12-20020a54480c000000b003a773e0d18fmr2925673oij.14.1691681910548; Thu, 10 Aug 2023 08:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681910; cv=none; d=google.com; s=arc-20160816; b=jCm9jDTjXxuur5XTdDpkA1HN2mrdrUE4WM+JqpdP8SCRcRE95JoUCv0lAe1wwUDgP3 z6Gd2G1L6uYMtC3WEHar3bjn9KnTx6L61fxbykMJYnQSA7X0jeQNMtOUV+ifBor9eNnm xV0jPGxdnmesgj8ljgBD2qZe4awvz9DbH1wsu0edsLUdAH13YB8VC/Ac0rgkZgEJi7o9 IPcri1b55q1px3VstU8ORJt11kRLCKgu8KpWthndVMdZsjYQA3i17jFaAzdw8F1trKVu tRcOb/wnduOlIe/67O6fE8mX4/iGmE65X/nrIrxzK4hu7pbfS65z+l3wn4e4TYYCrv6O RxnQ== 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=bvCczPcI4msPxOyG0ECCXLj/z9hworOartFnCQjpVDQ=; fh=qB6qsUxbxKbTZmjsWUc4Ke7azY87y2Vvvlw9q2TjVaE=; b=wTQtTCmGGD/qqQT6v+yi/7zhJiDu9BEgyyd7Cr7dvxg06tvsmQPBspohlZ9avdKGKt qS41kXxe2YGg6OOVDMZUmQaSCDpdComw/DO5CRbUKBPvxsOKRLsPNcWHwXBoHeUv4k1u g4qG8V7SzXtDkrODemMy8nHRp0EbpmJtKI6OOi5cYITYdeKrFTKXG/tfz8Q4IefggVxh G51wQNjTY0B4kqMaKy+8ZeLAJIbs6R/OSNxFqxDIp1uvvSMLc+vrblYTtgkSoBkKEebA QA4java4ZC5JZB8adkDNVtyw535MXHDxo+RWz7c/LQWTgIJDMWE7umvXgHJTVgVmxqwb kLWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ru2LAzvv; 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 o4-20020a0ce404000000b0063d4907b612si334474qvl.296.2023.08.10.08.38.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:38:30 -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=ru2LAzvv; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iX-0005P2-Un; Thu, 10 Aug 2023 11:36:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iV-0005ML-QT for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iP-0003EN-H0 for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fe4a89e8c4so9269495e9.3 for ; Thu, 10 Aug 2023 08:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681804; x=1692286604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bvCczPcI4msPxOyG0ECCXLj/z9hworOartFnCQjpVDQ=; b=ru2LAzvvkDckKtekoOAdPyW2bafMUqsnyUTbr3p90n/EnzzHkCF1f7UpCesmuSpGx9 3/5DzHFfdfNs2g18cIJsumVpNAbtPNfneTfnFdTCt2rB0bTcbciRjM2Rx/XjBF30pO/V WRIPJiT7vrP4ebIR3ux0EHyqB7jWn8j8tHh9Z62x8subTEUdefT3+tTTDApe9UtG4d+Z TWoIEdQWHwKCpnVE38LyeNTNTIZfEIPr9ZHiZa+AVAzVPVAFdeaHn3fUupd9fRKNnLg/ 3ZCfoaO0hKDF76m0Fe8AW9/OzI2/rj5JebgPwUU3AI8PE8cIBsbfPJ7qnU/36/X+Dfzn CG9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681804; x=1692286604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bvCczPcI4msPxOyG0ECCXLj/z9hworOartFnCQjpVDQ=; b=FT7wBa/l+3GDYdoX05WIyHTR8M1TwmpPpK16XVUyu11oT65PqEWbGBzVZntX3bb6l5 SDhpNhfxr/bwzJYwWbUyFLKrBtytAKUjQNl7Cjq+M3P3twfDZ3JGBhllk6xqvfTC1IoN Rq+4VE7DlLlsVSwxT6DYZFNdQr+bDcjwXv1NxGR3EY8gRR6NYSH7vrcwSB+oFtRkjXFF 6Ij2kChLsEoLUV5+h6Opz0usAODXLAVCRT0x/s7yRhUOsuVaLGQw7+YbjKbS7aXsmI7n 2eaSlLbZvwckTk9h4j3Duu+i29co9/5GBTrNNu89rs/iqjBzczwPs81oZpPG+IsLz+DT B/VQ== X-Gm-Message-State: AOJu0YwLlcUCT8mn7RX4lsEFwehUOFyXBLkymzshT/fmr3Ga7Md/FAwx 2YvO4gtdvFreEBUHpIT79R/3MlGy8wn9kuR8XUI= X-Received: by 2002:a7b:c7c7:0:b0:3fe:df1:5b95 with SMTP id z7-20020a7bc7c7000000b003fe0df15b95mr2299952wmk.19.1691681803707; Thu, 10 Aug 2023 08:36:43 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n9-20020a1c7209000000b003fe577eb8cbsm5363586wmc.44.2023.08.10.08.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 580551FFC0; Thu, 10 Aug 2023 16:36:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta Subject: [PATCH 5/8] tests/tcg: clean-up gdb confirm/pagination settings Date: Thu, 10 Aug 2023 16:36:37 +0100 Message-Id: <20230810153640.1879717-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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 autolearn=unavailable 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-bounces+patch=linaro.org@nongnu.org We can do this all in the run-test.py script so remove the extraneous bits from the individual tests which got copied from the original non-CI gdb tests. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/guest-debug/run-test.py | 2 ++ tests/tcg/aarch64/gdbstub/test-sve-ioctl.py | 3 --- tests/tcg/aarch64/gdbstub/test-sve.py | 3 --- tests/tcg/multiarch/gdbstub/memory.py | 3 --- tests/tcg/multiarch/gdbstub/sha1.py | 4 ---- tests/tcg/multiarch/gdbstub/test-proc-mappings.py | 4 ---- tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py | 4 ---- tests/tcg/multiarch/gdbstub/test-thread-breakpoint.py | 4 ---- tests/tcg/s390x/gdbstub/test-signals-s390x.py | 4 ---- tests/tcg/s390x/gdbstub/test-svc.py | 4 ---- 10 files changed, 2 insertions(+), 33 deletions(-) diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index de6106a5e5..c0d0075e2e 100755 --- a/tests/guest-debug/run-test.py +++ b/tests/guest-debug/run-test.py @@ -86,6 +86,8 @@ def log(output, msg): gdb_cmd += " %s" % (args.gdb_args) # run quietly and ignore .gdbinit gdb_cmd += " -q -n -batch" + # disable pagination + gdb_cmd += " -ex 'set pagination off'" # disable prompts in case of crash gdb_cmd += " -ex 'set confirm off'" # connect to remote diff --git a/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py b/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py index b9ef169c1a..ee8d467e59 100644 --- a/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py +++ b/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py @@ -76,9 +76,6 @@ def run_test(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - # Run the actual tests run_test() except: diff --git a/tests/tcg/aarch64/gdbstub/test-sve.py b/tests/tcg/aarch64/gdbstub/test-sve.py index ef57c7412c..afd8ece98d 100644 --- a/tests/tcg/aarch64/gdbstub/test-sve.py +++ b/tests/tcg/aarch64/gdbstub/test-sve.py @@ -66,9 +66,6 @@ def run_test(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - # Run the actual tests run_test() except: diff --git a/tests/tcg/multiarch/gdbstub/memory.py b/tests/tcg/multiarch/gdbstub/memory.py index 67864ad902..dd25e72281 100644 --- a/tests/tcg/multiarch/gdbstub/memory.py +++ b/tests/tcg/multiarch/gdbstub/memory.py @@ -115,9 +115,6 @@ def run_test(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - # Run the actual tests run_test() except (gdb.error): diff --git a/tests/tcg/multiarch/gdbstub/sha1.py b/tests/tcg/multiarch/gdbstub/sha1.py index 423b720e6d..416728415f 100644 --- a/tests/tcg/multiarch/gdbstub/sha1.py +++ b/tests/tcg/multiarch/gdbstub/sha1.py @@ -73,10 +73,6 @@ def run_test(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - gdb.execute("set confirm off") - # Run the actual tests run_test() except (gdb.error): diff --git a/tests/tcg/multiarch/gdbstub/test-proc-mappings.py b/tests/tcg/multiarch/gdbstub/test-proc-mappings.py index 5e3e5a2fb7..04ec61d219 100644 --- a/tests/tcg/multiarch/gdbstub/test-proc-mappings.py +++ b/tests/tcg/multiarch/gdbstub/test-proc-mappings.py @@ -51,10 +51,6 @@ def main(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - gdb.execute("set confirm off") - # Run the actual tests run_test() except gdb.error: diff --git a/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py b/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py index d91e8fdf19..926fa962b7 100644 --- a/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py +++ b/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py @@ -42,10 +42,6 @@ def run_test(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - gdb.execute("set confirm off") - # Run the actual tests run_test() except (gdb.error): diff --git a/tests/tcg/multiarch/gdbstub/test-thread-breakpoint.py b/tests/tcg/multiarch/gdbstub/test-thread-breakpoint.py index 798d508bc7..e57d2a8db8 100644 --- a/tests/tcg/multiarch/gdbstub/test-thread-breakpoint.py +++ b/tests/tcg/multiarch/gdbstub/test-thread-breakpoint.py @@ -45,10 +45,6 @@ def run_test(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - gdb.execute("set confirm off") - # Run the actual tests run_test() except (gdb.error): diff --git a/tests/tcg/s390x/gdbstub/test-signals-s390x.py b/tests/tcg/s390x/gdbstub/test-signals-s390x.py index 80a284b475..ca2bbc0b03 100644 --- a/tests/tcg/s390x/gdbstub/test-signals-s390x.py +++ b/tests/tcg/s390x/gdbstub/test-signals-s390x.py @@ -61,10 +61,6 @@ def run_test(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - gdb.execute("set confirm off") - # Run the actual tests run_test() except (gdb.error): diff --git a/tests/tcg/s390x/gdbstub/test-svc.py b/tests/tcg/s390x/gdbstub/test-svc.py index 18fad3f163..804705fede 100644 --- a/tests/tcg/s390x/gdbstub/test-svc.py +++ b/tests/tcg/s390x/gdbstub/test-svc.py @@ -49,10 +49,6 @@ def main(): exit(0) try: - # These are not very useful in scripts - gdb.execute("set pagination off") - gdb.execute("set confirm off") - # Run the actual tests run_test() except gdb.error: From patchwork Thu Aug 10 15:36:38 2023 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: 712364 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp722789rwb; Thu, 10 Aug 2023 08:39:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiH+Qq5i3MS7zHCkdqbFDdyNj+3lEc5zB90AEOLTkkh5zS79iL/NJNwB3kUSKFJpTuF3Jb X-Received: by 2002:ac8:5c13:0:b0:407:c2e2:2a06 with SMTP id i19-20020ac85c13000000b00407c2e22a06mr2767693qti.8.1691681967962; Thu, 10 Aug 2023 08:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681967; cv=none; d=google.com; s=arc-20160816; b=Eh9YnlhoHmDb6QrIyBqPwv4P+vSEFXMtvaSgF17nD6ihvclejuZDvXWCuj6rLUzQFp lkqTyE1suNZyHxveNaNDTD6fdZitX34lVaO75+wCPed3LdmGzp9PjbqvkH29h73hIYSK BcPfdduIWs6EDM1Xxdk0IOBMKWfVUTvLCgQC4Q4EJahLJY7NFfcVIqu7ChG42sOR4IDb kIpgUp7zbjo0UBVhp7onQNSz9DAezSurC3V0pQABLTl1WuqqpHxW3kzC6xyka2pvwfvK kfyLQz5XMIGNPaOVR0yZM9ChdiBsDhvUssPOup+/ctOEtCSM0eUtu7s5Wom+zqbz5SBC EzvQ== 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=pWHkl2jpAyxPACNnTV5P1s0rijLChl436ygUcdDaXic=; fh=qB6qsUxbxKbTZmjsWUc4Ke7azY87y2Vvvlw9q2TjVaE=; b=JeG/rVWr6munMsU2tDQvB1Nk++rIjuVo998c5ovw62m6/hV33MDrUtod+920DbxTqr IFPdMl+46jG7/7SrMrJVYlEm7whtleDcKjXovI05AnZ6pY8u4SsjhOKwGQ28crIvlOc9 Qp7HV04XYJKc4s9631DP5/OlpcMxnE3Em2q6yIo3+iBf8kHcdXkD/SrB9AnTDkwuMS8E 1tTMsUdZcRUsuuLBR8wRJbLWqKB4J/j5n2U8rIJKubYfu2Di9ZeBJkMBMxAeySB9Kk5X uxDVdLyjQatvxbuTMR00ylCx1nMtl3z1qQjAPUj33qEK+77jGU2UEidwrni2UIqskyVF p//w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h3nj/RX/"; 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 l6-20020a05622a174600b00403f05af810si1109012qtk.64.2023.08.10.08.39.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:39:27 -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="h3nj/RX/"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iY-0005PM-ER; Thu, 10 Aug 2023 11:36:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iV-0005MT-S0 for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iQ-0003Em-9U for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b9ba3d6157so16122561fa.3 for ; Thu, 10 Aug 2023 08:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681804; x=1692286604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pWHkl2jpAyxPACNnTV5P1s0rijLChl436ygUcdDaXic=; b=h3nj/RX/PEBMGORRsUbFI+KHNK8wIaqFIm9SzLx3IjDxRl0jb+QuZhpiW3teTbcfg6 E3PDpgaFrplq5WN2SUvJF6yvqcGP5fJ1dOh3LxM5VMG/SNRT4c/bKr2pPH7bLmbTwfVV MYwk+w19KETrxyA6AM55Gjd6bltBVB1bNz4JeCcnRx68GeNwANgl7WrEAgoVb0WrzPKl 5zv9fkpVQuNjZB8VLhymMm+Gs21b94erzYQ+XkN6XU78H+RbEFAZ3d8Z7RLgZawXVpaF KENHZDcCDwdJwFXag+RXdA5gu9v3lmCT34Jx4q790KQu5G25Yz3SyYv7nimdRTLR4AhD DHDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681804; x=1692286604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pWHkl2jpAyxPACNnTV5P1s0rijLChl436ygUcdDaXic=; b=E+VSDc8Wfk9wYEOL5OFFtXwBsN7PJZoRX8p8SGBOnUZgjNnSW70t/6s7ONc59rNz7C 3QuvD89HiQfU3ODlWtb6p0fMZS8BJDlNnks1UdH6Kriwh9Bx4ksbfsV8l+pwlBILBj+V t1QxBMAyOTVdArrKwiuCXvaWFqXxVvByr/6SB1ly0UAVScZhh51b2B8o4y2OUILN+ytJ QSSb3qICdRCEmfhMB1PR4LqTVvgsB/CT6hDK/XQBZ/DsstXFo577mzdoH5e+xav0LWRb vwPlOIjNwVV0meeOY40KTRsqElDR1+S2G9x6taxhHrG+sZgBj66Lz2fKKnWDlqNouKEK gJzA== X-Gm-Message-State: AOJu0YyJB09IBhTWXVNRizt68KgUc1ERcm5ECcxXNh8i64dN9fA4zeub 6ZDChapZBg4KnZT+6oCSnT+6ug== X-Received: by 2002:a2e:9190:0:b0:2b9:ac48:d7fb with SMTP id f16-20020a2e9190000000b002b9ac48d7fbmr2385872ljg.41.1691681804724; Thu, 10 Aug 2023 08:36:44 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z15-20020a05600c114f00b003fe2bea77ccsm2504470wmz.5.2023.08.10.08.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F52C1FFC1; Thu, 10 Aug 2023 16:36:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta Subject: [PATCH 6/8] tests/tcg: ensure system-mode gdb tests start stopped Date: Thu, 10 Aug 2023 16:36:38 +0100 Message-Id: <20230810153640.1879717-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22a.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 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-bounces+patch=linaro.org@nongnu.org Without -S we run into potential races with tests starting before the gdbstub attaches. We don't need to worry about user-mode as enabling the gdbstub implies we wait for the initial connection. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/guest-debug/run-test.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index c0d0075e2e..b13b27d4b1 100755 --- a/tests/guest-debug/run-test.py +++ b/tests/guest-debug/run-test.py @@ -69,13 +69,10 @@ def log(output, msg): # Launch QEMU with binary if "system" in args.qemu: - cmd = "%s %s %s -gdb unix:path=%s,server=on" % (args.qemu, - args.qargs, - args.binary, - socket_name) + cmd = f'{args.qemu} {args.qargs} {args.binary}' \ + f' -S -gdb unix:path={socket_name},server=on' else: - cmd = "%s %s -g %s %s" % (args.qemu, args.qargs, socket_name, - args.binary) + cmd = f'{args.qemu} {args.qargs} -g {socket_name} {args.binary}' log(output, "QEMU CMD: %s" % (cmd)) inferior = subprocess.Popen(shlex.split(cmd)) From patchwork Thu Aug 10 15:36:39 2023 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: 712363 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp722761rwb; Thu, 10 Aug 2023 08:39:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMMSMtFoSctJky29rfmDoJtgilMZ+HGrYKhvQuSRL8Af1YAa8vLHcuYjD7h3yviYbPUxqD X-Received: by 2002:ac8:7fc3:0:b0:403:be2b:590b with SMTP id b3-20020ac87fc3000000b00403be2b590bmr4054446qtk.44.1691681965201; Thu, 10 Aug 2023 08:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681965; cv=none; d=google.com; s=arc-20160816; b=Ztje+Ph5nXUVFEi/TWaI4CPrgIbqc4usMCx+ipoHX9kPxQJIgfIO6ZKzOUAFt4V6zG 737OQ8iD8SZ0xznyfI6+cohinx7NJt4xkrEmsmlq2KfF+iGoKT+8a4Q9+M7K2xPzM0jt rYRkvIhSMfhXyCovtQ0jRywOd/dGU+js8pm5+R+JNoEeaT4cQ1sWvmm3ng/nkXFPcNfB pZgO1Dty0bGXwA4+Dx49kf9E5kqqFJt/JYTkFJ5JgubAgBudJAILHXYV9/3PK+qaQ+Ts NYf3wrghOd4RPC/tIkz0aV46Ingo4zZEjGEyQsNErvqmbc6rFpc8BJPaNWPcefMhFFY5 1sdg== 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=h+hzkLqMShk2eSDpt7ofnm8iQ+BmAGdQ23pVnCkXYCc=; fh=ntkffk6tmj+HOeZnsOkpCowcrWcabOB4dx8WTTykGf8=; b=fy1ZVqmHVxO51LacdPgFsEfUI4eUT/XIndwBg/hpI0za7GFrmqEQrsq1M3Q/ccN62D yI9pT/M0QasfAgpO4itIUDVAX85eNW3G2qgkQbuxJuz5o3h3+2Oip+x41YhPbdVCAJLa AIr+eIUk5u8oC42hqBFOtKEybk72vi6EPFNxjNNoqMbmFwHZ+C1wEYf0JQeuJHMeGm69 vpaBjQuANxzgTpKsybypT5sqEy84vcLHTDdnCqPb3rh9wmUbB/5PnEwkmBXjsxTldb2a L5eGg5/kUML8uKR+81IgICWkS2M71h8mG2mI1OjVXPdbu/Af/4YUYvc8IFwRrJhzp+VP wToQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qSPdGP5e; 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-20020a05622a119000b00403ee822493si1082127qtk.407.2023.08.10.08.39.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:39:25 -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=qSPdGP5e; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iY-0005Pm-ML; Thu, 10 Aug 2023 11:36:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iV-0005Mg-Uj for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iQ-0003Ey-BI for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fe4ad22eb0so9289025e9.3 for ; Thu, 10 Aug 2023 08:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681805; x=1692286605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h+hzkLqMShk2eSDpt7ofnm8iQ+BmAGdQ23pVnCkXYCc=; b=qSPdGP5emdtMSmZHodKdvztcmt7T2Wkdf08tKPUMS/9gAsiyfPFv+Ci/GKNhXrZnT9 7RGEA6bBHUMUog0P+/yiJV+tax/4X5wj6ToeaKaCIE5BXAOutBMDqp2tNwISMd/keoKo oumOpPBpU6Ow1A7iHYosTIZ7Z4Bs2ajdKeH8CIGDP07pGYKZaJp2OQpbpt60pYiQq2WC Ch8qoESAQZJibYd3a80bJUfWdy1RWnr4sOzDYBDUsEXEgrFB+/od2/n6XM6sPOKR1MJi 5+ZjSPBanf1SdlGkqtHhwOymo8+q0FzlyhHNNYKCIjUtpMA1zoP3leECjU9jPdbwgr9q S/iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681805; x=1692286605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h+hzkLqMShk2eSDpt7ofnm8iQ+BmAGdQ23pVnCkXYCc=; b=FOcnKpAVywQSR5/9kdvrWgeHnmJn5Ym5+4F8oNtliS3Q/U7FVmDT9N93dOKmtKqtoL VsI1wWqBtDUaCIiwCeZgP+fNQ0LNJ6oEyu1ekpOwFADXk0l1xqUU9mhI0udzaHV2XZAD Ngqt/2Tl8m95zuDQARzUskEMFQNBsGDj0PexiYYzZvDZipxdofLHYDgCRWnVy8Pth9H6 ORQmKT/W3MxPj00RnLJBP33vaVli5xPkrHVWHH1LbxehPZEE0ec5VahYrYqeZ5r1xWXl CJMmo+KxRYYa3Yz+CMwAgqFWH2TATrJBz3ho9f+HrMs2wlU7d9KEokHUEz+XOiwcNL9u FtlA== X-Gm-Message-State: AOJu0YwntERWfzkt9ZF6p8z73x31Ogf2rnoO6yf8C3TSTvZZpoY16+Fz YRo/MHtSTE4MvAoMYEqLgnqytg== X-Received: by 2002:a5d:504a:0:b0:317:74ce:3e27 with SMTP id h10-20020a5d504a000000b0031774ce3e27mr2676389wrt.67.1691681804925; Thu, 10 Aug 2023 08:36:44 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z4-20020a5d4d04000000b00314398e4dd4sm2503902wrt.54.2023.08.10.08.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8AA4E1FFC2; Thu, 10 Aug 2023 16:36:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Matheus Tavares Bernardino Subject: [PATCH 7/8] gdbstub: more fixes for client Ctrl-C handling Date: Thu, 10 Aug 2023 16:36:39 +0100 Message-Id: <20230810153640.1879717-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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 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-bounces+patch=linaro.org@nongnu.org The original fix caused problems with spurious characters on other system emulation. So: - instead of spamming output make the warning a trace point - ensure we only allow a stop reply if it was 0x3 Suggested-by: Matheus Tavares Bernardino Signed-off-by: Alex Bennée Message-Id: <456ed3318421dd7946bdfb5ceda7e05332da368c.1690910333.git.quic_mathbern@quicinc.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Tested-by: Richard Henderson --- gdbstub/gdbstub.c | 5 +++-- gdbstub/trace-events | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index e74ecc78cc..20b6fe03fb 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -2059,9 +2059,10 @@ void gdb_read_byte(uint8_t ch) * here, but it does expect a stop reply. */ if (ch != 0x03) { - warn_report("gdbstub: client sent packet while target running\n"); + trace_gdbstub_err_unexpected_runpkt(ch); + } else { + gdbserver_state.allow_stop_reply = true; } - gdbserver_state.allow_stop_reply = true; vm_stop(RUN_STATE_PAUSED); } else #endif diff --git a/gdbstub/trace-events b/gdbstub/trace-events index 0c18a4d70a..b383bf8d29 100644 --- a/gdbstub/trace-events +++ b/gdbstub/trace-events @@ -26,6 +26,7 @@ gdbstub_err_invalid_repeat(uint8_t ch) "got invalid RLE count: 0x%02x" gdbstub_err_invalid_rle(void) "got invalid RLE sequence" gdbstub_err_checksum_invalid(uint8_t ch) "got invalid command checksum digit: 0x%02x" gdbstub_err_checksum_incorrect(uint8_t expected, uint8_t got) "got command packet with incorrect checksum, expected=0x%02x, received=0x%02x" +gdbstub_err_unexpected_runpkt(uint8_t ch) "unexpected packet (%c) while target running" # softmmu.c gdbstub_hit_watchpoint(const char *type, int cpu_gdb_index, uint64_t vaddr) "Watchpoint hit, type=\"%s\" cpu=%d, vaddr=0x%" PRIx64 ""