From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681933; cv=none; d=zohomail.com; s=zohoarc; b=FmTDMTuQw29YP0XeBOt/SiM31+PT3lfhZnJcAXrgT5w5Nic2yk4dXW32X3Wl6juHLqxLgiEvDou4fCb2zpU07PkB56Mx29iJHjfpaT8/CD8MGd+X/rA5nuv85H6/NclQkrhhrUd6Fpl96FHo5XsNjagP83fnI5/VM5m3ZGW9phw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681933; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yFrqHRj+4Z4QeOb4gTibh0+O8iFD1dFK/WKj4LG+z60=; b=bH2u9A+mCa/G25sVqAN8iV048N5oKyVij/USWMrKg02rgC7MbEXR2I90imfflJTYOYgBrD3IYF3pk6Qnx+qg/BmT6Tw87UjQz99XtEYcALZ/CrocYa/UsvDJIL/cLZj/1qJKxh4tgskxh95JUTDUVxw7zEzvJnVlp6QsIu5+FBw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1691681933388955.2914806664775; Thu, 10 Aug 2023 08:38:53 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IE/PI7T15DIQ9zA9USYvbdr+3dxi2MFyt7lVgihmZq+20Zt22PyIOZwi98cAU+t3KocGdC+pQ== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Daniel=20P=2E=20Berrang=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681935624100008 From: Daniel P. Berrang=C3=A9 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=3D'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=3D1 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=3D1' env variable against their gitlab fork CI settings. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20230804111054.281802-2-berrange@redhat.com> Signed-off-by: Alex Benn=C3=A9e --- 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=3D1" env variable to disable it. diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.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=3D$(expr $(nproc) + 1) script: + - export CCACHE_BASEDIR=3D"$(pwd)" + - export CCACHE_DIR=3D"$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE=3D"500M" + - export PATH=3D"$CCACHE_WRAPPERSDIR:$PATH" - mkdir build - cd build + - ccache --zero-stats - ../configure --enable-werror --disable-docs --enable-fdt=3Dsystem ${TARGETS:+--target-list=3D"$TARGETS"} $CONFIGURE_ARGS || @@ -20,6 +30,7 @@ then make -j"$JOBS" $MAKE_CHECK_ARGS ; fi + - ccache --show-stats =20 # 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=3D"$(pwd)" + - export CCACHE_DIR=3D"$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE=3D"500M" + - export PATH=3D"$CCACHE_WRAPPERSDIR:$PATH" - mkdir build - cd build + - ccache --zero-stats - ../configure --enable-werror --disable-docs --enable-fdt=3Dsystem --disable-user $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS --target-list-exclude=3D"arm-softmmu cris-softmmu @@ -18,6 +28,7 @@ version=3D"$(git describe --match v[0-9]* 2>/dev/null || git rev-par= se --short HEAD)"; mv -v qemu-setup*.exe qemu-setup-${version}.exe; fi + - ccache --show-stats =20 # 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=3D"$(pwd)" + - export CCACHE_DIR=3D"$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE=3D"500M" + - export PATH=3D"$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=3D"$(pwd)" + - export CCACHE_DIR=3D"$CCACHE_BASEDIR/ccache" + - export CCACHE_MAXSIZE=3D"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 =3D 'yes' # Preserve the current working directory - $env:MSYS =3D 'winsymlinks:native' # Enable native Windows symlink + - $env:CCACHE_BASEDIR =3D "$env:CI_PROJECT_DIR" + - $env:CCACHE_DIR =3D "$env:CCACHE_BASEDIR/ccache" + - $env:CCACHE_MAXSIZE =3D "500M" + - $env:CCACHE_DEPEND =3D 1 # cache misses are too expensive with preproc= essor mode + - $env:CC =3D "ccache gcc" - mkdir build - cd build + - ..\msys64\usr\bin\bash -lc "ccache --zero-stats" - ..\msys64\usr\bin\bash -lc "../configure --enable-fdt=3Dsystem $CONFIG= URE_ARGS" - ..\msys64\usr\bin\bash -lc "make" - ..\msys64\usr\bin\bash -lc "make check MTESTARGS=3D'$TEST_ARGS' || { c= at meson-logs/testlog.txt; exit 1; } ;" + - ..\msys64\usr\bin\bash -lc "ccache --show-stats" - Write-Output "Finished build at $(Get-Date -Format u)" =20 msys2-64bit: diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/d= ocker/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=3Dnoninteractive 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 =20 =20 ENV TOOLCHAIN_INSTALL /opt ENV TOOLCHAIN_RELEASE 16.0.0 ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unkn= own-linux-musl" ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolc= hain-for-hexagon/v${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL" ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu= /bin --=20 2.39.2 From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681854; cv=none; d=zohomail.com; s=zohoarc; b=CXXNZtyXXP4Ok+s/m1ufDiP/GSV0cAZge3EtFeLSLQ5xRbl5k+ypHcy/rX819iZdrqSQ0Rg0l1l7+RNDUkcyNcV/Q4o8QMcGy1SmkzIVoXJDtWubCg0sQQPGzHlVHIStEdnlo7+H20XbJ1/NsUGqmRuRjBB2t/8wvokHplVnl0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681854; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KrI0uKRluPvPH9UgmpgsTWgL+pnARwaqZASSAgNcoKA=; b=mfDoxabaq8Z7ib28Is26sqTCwh+U1cOChibiRYanjxGK9yjAFI/Y+b6seKNHsSr5fcTVpGLcO3xb3uDB44ojuJh2LPvsDFnN9exsvf2NuPp/92H5m4DYUh9F4q3l4lfu/nQiApLHbi8L5+CZKyUK8O7jEooe5nhhRJr4m3v7CY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169168185453798.13871048924216; Thu, 10 Aug 2023 08:37:34 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IFjGgpE1k6qPujba0Sx2Ijvuwy0cc5cDF7uYfChRPfTf7vxWEY32sM/7ga8BCw9Sg/3vt7/IA== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681855239100001 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=C3=A9e 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=3D1 \ $(if $(NOUSER),, \ --build-arg USER=3D$(USER) \ - --build-arg UID=3D$(UID)) \ - -t qemu/$* - < $<, \ - "BUILD", $1) + --build-arg UID=3D$(UID)) \ + -t qemu/$* - < $< $(if $V,,> /dev/null),\ + "BUILD", $*) =20 # Special rule for debootstraped binfmt linux-user images docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker --=20 2.39.2 From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681919; cv=none; d=zohomail.com; s=zohoarc; b=Xcx+EHrvRHPrnfDiL9rHgn7R/noDPwVP+jv1Mu8BgLSBHy/fAL+7cI2lkIteM8rRdk1gHCsqkl699pYpooEIo5jgAh5klMryiAzPQB9lbdnq8XPgHj3WJVqy2qH+C8aZcFHYA/oCx8kHbvLexopA6oag+pWkASG6iJNr6YtCwLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681919; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zmxc9TJQtQlM8I+f5bFmXe4lR5ba4YtE7Jx4G0eSh04=; b=iZJt+9Uxq52nz/G+ivqLXEn2ZTi+RosaoGlsqhCGrIAUtvo6IqGlyS+PWa8XFCerfJl0JUmANjz067Nmwl7Zn6r6UmSh7dOo/AzMitCwGxp51C/DVKjI426+d5uuY69wbcBlxWCm3guU9g8ONt7SgloP1tkXnXYI4zZXtoT5iQg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1691681919066629.2859637529994; Thu, 10 Aug 2023 08:38:39 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IFp3SkCcDewiY+23eMVUel+KrzuVgulQSEjwf/nFisRzKhi8GtaNdGfmQVGGvmxeFtvkyEU1Q== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681919421100007 This avoids ugly multi-line wrapping for the test on non V=3D1 builds. Signed-off-by: Alex Benn=C3=A9e --- 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=3Dfcvt pcalign-a64 fcvt: LDFLAGS+=3D-lm =20 run-fcvt: fcvt - $(call run-test,$<,$(QEMU) $<, "$< on $(TARGET_NAME)") + $(call run-test,$<,$(QEMU) $<) $(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref) =20 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=3Duntimely-packet= .out$(COMMA)id=3Doutput $(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") --=20 2.39.2 From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681913; cv=none; d=zohomail.com; s=zohoarc; b=Q3uj4pboshBOzJIk7VYdEOi2pJ2FARKcwXiikm6YJjXjA258UsLzU1kY2bAzIiqUDmOriWrms8AoQK+bY5+iLJ94D8yFXGhzuECEFJClabCbvmxC01khxlVAjbfsMm2aPHvGWDYMiEBaRXSC934DuBcOGexnWFFn+gJwDURAvF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681913; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HWAw3yoUeeJNMPe6CX9phpQMFB1kiw2oQRZp+zWhjgY=; b=kmzcUyZgGzPlzo4ugvLo9Mm4dK9BLgjSRP/Sj5KDTgETo4hib1x0StEdRIAj622QuOBmZBKcNw5K7Gm8vWED/j0b6ZY9cHYEvxPbkQ39qL3cxKp4khABF6FOVcAeCRwZQahA28YDp6aHro+eb363FLpJ441XWwGFTFG30b2JSoI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1691681913049424.67166738340575; Thu, 10 Aug 2023 08:38:33 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IHueolCgXazhlVIkoOpMzWUQ7zFTdTkOYuE+5PjuCBhFrQU3iyw7qt9HEBQA/I9mrC6arsPRQ== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681914087100007 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=C3=A9e 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-gdb= stub.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 =3D 0 - - -def report(cond, msg): - "Report success/fail of test" - if cond: - print ("PASS: %s" % (msg)) - else: - print ("FAIL: %s" % (msg)) - global failcount - failcount +=3D 1 - - -def check_step(): - "Step an instruction, check it moved." - start_pc =3D gdb.parse_and_eval('$pc') - gdb.execute("si") - end_pc =3D gdb.parse_and_eval('$pc') - - return not (start_pc =3D=3D end_pc) - - -def check_break(sym_name): - "Setup breakpoint, continue and check we stopped." - sym, ok =3D gdb.lookup_symbol(sym_name) - bp =3D gdb.Breakpoint(sym_name) - - gdb.execute("c") - - # hopefully we came back - end_pc =3D gdb.parse_and_eval('$pc') - print ("%s =3D=3D %s %d" % (end_pc, sym.value(), bp.hit_count)) - bp.delete() - - # can we test we hit bp? - return end_pc =3D=3D 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 =3D gdb.lookup_symbol(sym_name) - gdb.execute("hbreak %s" % (sym_name)) - gdb.execute("c") - - # hopefully we came back - end_pc =3D gdb.parse_and_eval('$pc') - print ("%s =3D=3D %s" % (end_pc, sym.value())) - - if end_pc =3D=3D 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 =3D gdb.lookup_symbol(sym_name) - wp_addr =3D gdb.parse_and_eval(sym_name).address - self.wp_str =3D '*(%(type)s)(&%(address)s)' % dict( - type =3D wp_addr.type, address =3D sym_name) - - return(self.wp_str) - - def __init__(self, sym_name, type): - wp_str =3D self.get_wpstr(sym_name) - super(WatchPoint, self).__init__(wp_str, gdb.BP_WATCHPOINT, type) - - def stop(self): - end_pc =3D gdb.parse_and_eval('$pc') - print ("HIT WP @ %s" % (end_pc)) - return True - - -def do_one_watch(sym, wtype, text): - - wp =3D WatchPoint(sym, wtype) - gdb.execute("c") - report_str =3D "%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 =3D gdb.lookup_symbol(sym_name) - - def stop(self): - end_pc =3D gdb.parse_and_eval('$pc') - print ("CB: %s =3D=3D %s" % (end_pc, self.sym.value())) - if end_pc =3D=3D 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 =3D 0 - for i in range(3): - if check_step(): - step_ok +=3D 1 - - report(step_ok =3D=3D 3, "single step in boot code") - - print ("Checking HW breakpoint works") - break_ok =3D 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 =3D CatchBreakpoint("run_init_process") - cpb2 =3D CatchBreakpoint("try_to_run_init_process") - - print ("Checking Normal breakpoint works") - break_ok =3D 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 +=3D 1 - import code - code.InteractiveConsole(locals=3Dglobals()).interact() - raise - -# Finally kill the inferior and exit gdb with a count of failures -gdb.execute("kill") -exit(failcount) --=20 2.39.2 From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681910; cv=none; d=zohomail.com; s=zohoarc; b=lNMO6JW0MHZ+V1UeSakQVOBaEIhkbDb2WZmYXzCDt9bwRv4fYjSdis5R2HNfDYZDEvhI2TaFjfBvqJTASnl33zypEO4bUkttERm/MRhjfE8/pHM9+JZhGmhWNvkHpN5SBMq0yTLmaY0HXOhOzURuqPvyZejwXKxUpLg10/UqLd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681910; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bvCczPcI4msPxOyG0ECCXLj/z9hworOartFnCQjpVDQ=; b=hl1SUzacpdMSYd3pVgqhP23OdotA/Py4mUGAvCfA+OWRo/yabZb2iQ8ATsHl9mcT3JCBo0Z4uFjJPSsR4YMWNH8u+DeYy7IeEPr+qn/NOETrLWt48vaa71MWvfFqBXVCaGei44GE1zD02J/vaG/ezZd2q9xD4MraN+v8mkGnFsc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1691681910970183.70261460816755; Thu, 10 Aug 2023 08:38:30 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IE1Jm/c/w9x5yt54To+qnmsaV9xn6MsvrNsguaMPDJjLoR+YwKqRW2pmZvbmNYrqbTDnQk8Yg== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681912039100002 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=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 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 +=3D " %s" % (args.gdb_args) # run quietly and ignore .gdbinit gdb_cmd +=3D " -q -n -batch" + # disable pagination + gdb_cmd +=3D " -ex 'set pagination off'" # disable prompts in case of crash gdb_cmd +=3D " -ex 'set confirm off'" # connect to remote diff --git a/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py b/tests/tcg/aarch6= 4/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) =20 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/gdbs= tub/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) =20 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/gd= bstub/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) =20 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/gdbs= tub/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) =20 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) =20 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/tc= g/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) =20 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) =20 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/s390= x/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) =20 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) =20 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: --=20 2.39.2 From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681968; cv=none; d=zohomail.com; s=zohoarc; b=nTqGYqWmwSo0WNL95w2VIkrBHzO8BZHBHvdEJdu6OgsAXMEdEYgRMJEMVBfdm+ODTfTmSADJq3BOE2D7Ih0lG7ibW5bPfj7LGNNWAHdbUUpcmn14cuTi8lIgjhK2QMojT+IEVB/KhR/Qf+CAF7y/Vo6LcgYjjoYzoRhrE5VBYeI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681968; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pWHkl2jpAyxPACNnTV5P1s0rijLChl436ygUcdDaXic=; b=YLxQ0E0uUqOBBm0IMQG4F0FboZZQaAUHV8mpjOE5LiyrK6HPjcnvQOC8yWW/+6D8fp4Zs3V9oZ2k+41MBW0TUJdglg4beuuveeIfR8Ye/sSyyhDAyWT6l8FKy0DPXuxMHRgSliU8fNveMk8q1Mdl2jjoj6HfeapSFP6rJAFccjU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1691681968403126.70966665789524; Thu, 10 Aug 2023 08:39:28 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IHL54S1rQpcljLV5yVWT8wYrIxnkO8ICdS4coZbqboZFYHgMc/4zAZiuvhkNhFPsarm3vEr3g== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681970264100007 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=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 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): =20 # Launch QEMU with binary if "system" in args.qemu: - cmd =3D "%s %s %s -gdb unix:path=3D%s,server=3Don" % (args.qemu, - args.qargs, - args.binary, - socket_name) + cmd =3D f'{args.qemu} {args.qargs} {args.binary}' \ + f' -S -gdb unix:path=3D{socket_name},server=3Don' else: - cmd =3D "%s %s -g %s %s" % (args.qemu, args.qargs, socket_name, - args.binary) + cmd =3D f'{args.qemu} {args.qargs} -g {socket_name} {args.binary}' =20 log(output, "QEMU CMD: %s" % (cmd)) inferior =3D subprocess.Popen(shlex.split(cmd)) --=20 2.39.2 From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681966; cv=none; d=zohomail.com; s=zohoarc; b=cc/dQiZUQmq2mVvBTLDSWigMwASBW/iQQwwXZtJ1viCsfLMaR6XNAdtR13x+Hue59U/au2LrejhZElDlhi7m+/h0t4Vm5R2HzxmIcqaVW6VI57pZV4dVznWwkhb/1q2jgeGjmqNmlzx+VBM9k8SQA4ccL8gRK/dCMDQHT49CFNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681966; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=h+hzkLqMShk2eSDpt7ofnm8iQ+BmAGdQ23pVnCkXYCc=; b=AtGQGJCmmFBTF2InSubw+oCbkMM2g6nNVdqo46bl3JguvxzhImX/3oNuHTqgSQJD/KK3taHAXZ07qhfvPuzUsUtLx6dRm2/fE3FZW7mCoLRgA8DiNu2vA+R+f2FX3penUOtly6xwUcNaSSrICz+zdZDQclsikFmeMhBg3ZqTJYw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1691681966007524.6472409907384; Thu, 10 Aug 2023 08:39:26 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IFEg2o3IM7QDmNxkgmskaXfAN/Z2Ug/n7eOHumvqAFZjT1yRHJZn6u6sqnuFgQqHWEAoZCEXQ== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681967652100003 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=C3=A9e Message-Id: <456ed3318421dd7946bdfb5ceda7e05332da368c.1690910333.git.quic_m= athbern@quicinc.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 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 !=3D 0x03) { - warn_report("gdbstub: client sent packet while target running\= n"); + trace_gdbstub_err_unexpected_runpkt(ch); + } else { + gdbserver_state.allow_stop_reply =3D true; } - gdbserver_state.allow_stop_reply =3D 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 c= ount: 0x%02x" gdbstub_err_invalid_rle(void) "got invalid RLE sequence" gdbstub_err_checksum_invalid(uint8_t ch) "got invalid command checksum dig= it: 0x%02x" gdbstub_err_checksum_incorrect(uint8_t expected, uint8_t got) "got command= packet with incorrect checksum, expected=3D0x%02x, received=3D0x%02x" +gdbstub_err_unexpected_runpkt(uint8_t ch) "unexpected packet (%c) while ta= rget running" =20 # softmmu.c gdbstub_hit_watchpoint(const char *type, int cpu_gdb_index, uint64_t vaddr= ) "Watchpoint hit, type=3D\"%s\" cpu=3D%d, vaddr=3D0x%" PRIx64 "" --=20 2.39.2 From nobody Thu Nov 28 12:58:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1691681869; cv=none; d=zohomail.com; s=zohoarc; b=HyzRw9L01n76QDzGHaKv7PKzeQF+qVrPATKAwo3jE4rh+GfuVsLuXDlsF4DlsSfqrUh+PNlkgurdYpg9YEFWvwCWB7JWJDiOYEZzRb1FpzxrSWf2OrqVSNGNMGUXUa6ongbl4mjsKE3ss0kpfex5oJ8dFAkoJDzWIyifZYJHjE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691681869; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iHM26J4ebdoiYZJz3zhEjNseIBWtdhkWcsKebtX2pWo=; b=mJTiOcZBdIvT8JffRO/1hvzf2JDF8pakjrIpS2Pp+fETNKo/0LPfvkANv5uUA8IKSj0rYYkEV4lU8kls15ZSODsh/52ffe7ZvgU/R3uWwZpq33L8ohlfSC+u6SuJhZvKDBZKBQRm8kfa6TJ2TwmVY0buC1BjnjlScihay6tOAyI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1691681869299123.60358871280937; Thu, 10 Aug 2023 08:37:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iZ-0005QP-MI; Thu, 10 Aug 2023 11:36:55 -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 1qU7iX-0005OZ-Ak for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:53 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iR-0003FG-9a for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:53 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fe1d462762so9490745e9.0 for ; Thu, 10 Aug 2023 08:36:46 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k18-20020a056000005200b00317d2be2e59sm2513473wrx.73.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 A2D1E1FFC3; Thu, 10 Aug 2023 16:36:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681806; x=1692286606; 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=iHM26J4ebdoiYZJz3zhEjNseIBWtdhkWcsKebtX2pWo=; b=eQO22FLdiPhn3e0movl88+RJll7ghzw5rpTk7QKrBL1XIehBZSmgDzbS0djyOdwFsU ieUbA47LEcCuW4d7tg5UUZgyMqWGPCGxGyuBEQ/mQjZtN+rxe25GzZuD3QwlZaKVo3gL C03AzwsWUesYegBVlJ8tGQUzN6E0WPCs5YzMYi6EFFH98QbVm/DL+puyrvnlk6d9vx4l 7ZJQt7Kix5B4hLkraEapVKVRS37e0odFJHM2whwL6vHGGX1Czbfu6TqTeIilkDAYTmS/ ZxlA1lndqSJeAS129mCyGMcYteTz//dHOGd0Dr1EqTsQMAL4baRZxFJJE8mRn4yJ6woe W4AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681806; x=1692286606; 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=iHM26J4ebdoiYZJz3zhEjNseIBWtdhkWcsKebtX2pWo=; b=Hcl/rbT6Q59vJ+bCJwhJk2eo5fDvH1Kzryq44XV25uzdyo1AK53izFgR7MNIJYscwH gZOTBXRzyuIFSfbviWfFSwo2W7lP4oxFY5wQRNDwKkkUrstFMvm59uAwYLsFAZ1oiPp+ LO/0yhIf1X9YLuLpwLWv357j7qCT6kGMIP3GG3IIwn8o/+BovzLTMtj6bY0HbpPkEyUq 38njCXm7yTYZdUKiczmhmc0Bte6rWCd+ynbZ03CUqtpwCAncfRHTY93/u93M9K3yO29V 8hMXE+6yV35oN9+A86mCb1RB0A6vMLm89Y0Zb2TomlNkRJsVsLnRsFb+Daj53LSwFOna ADfA== X-Gm-Message-State: AOJu0YzRQ5wMFblPi13khuZFO9/g8k5lLEA+ECLIMrSH5ucifAXtEGZw fWzjv4v2eP+lG95dGoCOE3M36g== X-Google-Smtp-Source: AGHT+IEWA75NxPGLC9g2qsbdXr3KkBpGt0Axzmi59pPqGpaeuqiw4Xc4KfNtxOdsJP0vTVRNcJyemg== X-Received: by 2002:adf:e8d0:0:b0:314:2e95:1ec9 with SMTP id k16-20020adfe8d0000000b003142e951ec9mr2909419wrn.10.1691681805851; Thu, 10 Aug 2023 08:36:45 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , gdb-patches@sourceware.org Subject: [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars Date: Thu, 10 Aug 2023 16:36:40 +0100 Message-Id: <20230810153640.1879717-9-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1691681870893100003 When starting a remote connection GDB sends an '+': /* Ack any packet which the remote side has already sent. */ remote_serial_write ("+", 1); which gets flagged as a garbage character in the gdbstub state machine. As gdb does send it out lets be permissive about the handling so we can better see real issues. Signed-off-by: Alex Benn=C3=A9e Cc: gdb-patches@sourceware.org Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- gdbstub/gdbstub.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 20b6fe03fb..5f28d5cf57 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -2074,6 +2074,11 @@ void gdb_read_byte(uint8_t ch) gdbserver_state.line_buf_index =3D 0; gdbserver_state.line_sum =3D 0; gdbserver_state.state =3D RS_GETLINE; + } else if (ch =3D=3D '+') { + /* + * do nothing, gdb may preemptively send out ACKs on + * initial connection + */ } else { trace_gdbstub_err_garbage(ch); } --=20 2.39.2