qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH  v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float)
@ 2021-02-11 12:27 Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 01/15] travis.yml: Move gprof/gcov test across to gitlab Alex Bennée
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, Alex Bennée, richard.henderson, f4bug, cota,
	aurelien

Hi,

This is a pre-PR series for testing and gdbstub updates. On the
testing side we are almost entirely switched to gitlab for tests (only
the non-x86 builds still run). Hopefully we can transition these to
gitlab runners soon. Elsewhere shipable is turned off leaving our
testing menagerie as:

  - Cirrus (BSD's, Windows, MacOS)
  - GitLab (everything else)

although of course patchew continues to do sanity checking on
incoming patches to the list. On the gdbstub side we have some
clean-ups from Peter to remove special handling for floats. The only
unreviewed patch at the moment is:

 - tests/tcg: fix silent skipping of softmmu gdb tests

I should be preparing the PR on Monday morning when a glorious half
term will limit my distractions ;-)

Alex Bennée (2):
  .shippable: remove the last bits
  tests/tcg: fix silent skipping of softmmu gdb tests

Daniel P. Berrangé (1):
  tests/docker: remove travis container

Peter Maydell (6):
  MAINTAINERS: Add gdbstub.h to the "GDB stub" section
  target/sh4: Drop use of gdb_get_float32() and ldfl_p()
  target/m68k: Drop use of gdb_get_float64() and ldfq_p()
  target/ppc: Drop use of gdb_get_float64() and ldfq_p()
  gdbstub: Remove unused gdb_get_float32() and gdb_get_float64()
  bswap.h: Remove unused float-access functions

Philippe Mathieu-Daudé (2):
  travis.yml: Move gprof/gcov test across to gitlab
  travis-ci: Disable C++ optional objects on AArch64 container

Thomas Huth (4):
  travis.yml: Move the -fsanitize=undefined test to the gitlab-CI
  travis.yml: Move the --enable-modules test to the gitlab-CI
  travis.yml: (Re-)move the --enable-debug jobs
  travis.yml: Move the -fsanitize=thread testing to the gitlab-CI

 docs/devel/loads-stores.rst                   |  14 +--
 docs/devel/testing.rst                        |  14 ---
 include/exec/cpu-all.h                        |   8 --
 include/exec/gdbstub.h                        |  20 ----
 include/qemu/bswap.h                          |  60 ----------
 target/m68k/helper.c                          |   5 +-
 target/ppc/gdbstub.c                          |   8 +-
 target/sh4/gdbstub.c                          |   8 +-
 target/ppc/translate_init.c.inc               |   4 +-
 .gitlab-ci.yml                                |  40 ++++++-
 .shippable.yml                                |  23 ----
 .travis.yml                                   | 113 +-----------------
 MAINTAINERS                                   |   5 +-
 scripts/{travis => ci}/coverage-summary.sh    |   2 +-
 tests/docker/Makefile.include                 |  11 +-
 tests/docker/dockerfiles/travis.docker        |  17 ---
 tests/docker/dockerfiles/ubuntu2004.docker    |   2 +
 tests/docker/travis                           |  22 ----
 tests/docker/travis.py                        |  47 --------
 .../multiarch/system/Makefile.softmmu-target  |   6 +-
 20 files changed, 66 insertions(+), 363 deletions(-)
 delete mode 100644 .shippable.yml
 rename scripts/{travis => ci}/coverage-summary.sh (92%)
 delete mode 100644 tests/docker/dockerfiles/travis.docker
 delete mode 100755 tests/docker/travis
 delete mode 100755 tests/docker/travis.py

-- 
2.20.1



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH  v1 01/15] travis.yml: Move gprof/gcov test across to gitlab
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 02/15] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI Alex Bennée
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Thomas Huth, berrange, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Wainer dos Santos Moschetta,
	Alex Bennée, cota, aurelien

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Similarly to commit 8cdb2cef3f1, move the gprof/gcov test to GitLab.

The coverage-summary.sh script is not Travis-CI specific, make it
generic.

[thuth: Add gcovr and bsdmainutils which are required for the
        coverage-summary.sh script to the ubuntu docker file,
        and use 'check' as test target]

Message-Id: <20201108204535.2319870-10-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210211045455.456371-2-thuth@redhat.com>
---
 .gitlab-ci.yml                             | 12 ++++++++++++
 .travis.yml                                | 15 ---------------
 MAINTAINERS                                |  2 +-
 scripts/{travis => ci}/coverage-summary.sh |  2 +-
 tests/docker/dockerfiles/ubuntu2004.docker |  2 ++
 5 files changed, 16 insertions(+), 17 deletions(-)
 rename scripts/{travis => ci}/coverage-summary.sh (92%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 28a83afb91..222858b553 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -467,6 +467,18 @@ check-deprecated:
     MAKE_CHECK_ARGS: check-tcg
   allow_failure: true
 
+# gprof/gcov are GCC features
+gprof-gcov:
+  <<: *native_build_job_definition
+  variables:
+    IMAGE: ubuntu2004
+    CONFIGURE_ARGS: --enable-gprof --enable-gcov
+    MAKE_CHECK_ARGS: check
+    TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
+  timeout: 70m
+  after_script:
+    - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
+
 build-oss-fuzz:
   <<: *native_build_job_definition
   variables:
diff --git a/.travis.yml b/.travis.yml
index 5f1dea873e..05fa1ca905 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -52,7 +52,6 @@ addons:
       - ninja-build
       - sparse
       - uuid-dev
-      - gcovr
       # Tests dependencies
       - genisoimage
 
@@ -166,20 +165,6 @@ jobs:
       compiler: clang
 
 
-    # gprof/gcov are GCC features
-    - name: "GCC gprof/gcov"
-      dist: bionic
-      addons:
-        apt:
-          packages:
-            - ninja-build
-      env:
-        - CONFIG="--enable-gprof --enable-gcov --disable-libssh
-                  --target-list=${MAIN_SOFTMMU_TARGETS}"
-      after_success:
-        - ${SRC_DIR}/scripts/travis/coverage-summary.sh
-
-
     # Using newer GCC with sanitizers
     - name: "GCC9 with sanitizers (softmmu)"
       dist: bionic
diff --git a/MAINTAINERS b/MAINTAINERS
index e6f1eca30f..cc8767d4b4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3233,7 +3233,7 @@ R: Philippe Mathieu-Daudé <philmd@redhat.com>
 S: Maintained
 F: .github/lockdown.yml
 F: .travis.yml
-F: scripts/travis/
+F: scripts/ci/
 F: .shippable.yml
 F: tests/docker/
 F: tests/vm/
diff --git a/scripts/travis/coverage-summary.sh b/scripts/ci/coverage-summary.sh
similarity index 92%
rename from scripts/travis/coverage-summary.sh
rename to scripts/ci/coverage-summary.sh
index d7086cf9ca..8d9fb4de40 100755
--- a/scripts/travis/coverage-summary.sh
+++ b/scripts/ci/coverage-summary.sh
@@ -3,7 +3,7 @@
 # Author: Alex Bennée <alex.bennee@linaro.org>
 #
 # Summerise the state of code coverage with gcovr and tweak the output
-# to be more sane on Travis hosts. As we expect to be executed on a
+# to be more sane on CI runner. As we expect to be executed on a
 # throw away CI instance we do spam temp files all over the shop. You
 # most likely don't want to execute this script but just call gcovr
 # directly. See also "make coverage-report"
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 8519584d2b..9750016e51 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -1,8 +1,10 @@
 FROM ubuntu:20.04
 ENV PACKAGES flex bison \
+    bsdmainutils \
     ccache \
     clang-10\
     gcc \
+    gcovr \
     genisoimage \
     gettext \
     git \
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 02/15] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 01/15] travis.yml: Move gprof/gcov test across to gitlab Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 03/15] travis.yml: Move the --enable-modules " Alex Bennée
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Thomas Huth, berrange, Alex Bennée, richard.henderson,
	f4bug, Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	cota, aurelien

From: Thomas Huth <thuth@redhat.com>

Add it to the existing Clang job and also add a job that covers the
linux-user code with this compiler flag. To make sure that the detected
problems are not simply ignored, let's also use "-fno-sanitize-recover=..."
now instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210211045455.456371-3-thuth@redhat.com>
---
 .gitlab-ci.yml | 16 +++++++++++++---
 .travis.yml    | 27 ---------------------------
 2 files changed, 13 insertions(+), 30 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 222858b553..5f3d42221a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -432,14 +432,24 @@ build-some-softmmu-plugins:
     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
     MAKE_CHECK_ARGS: check-tcg
 
-build-clang:
+clang-system:
   <<: *native_build_job_definition
   variables:
     IMAGE: fedora
     CONFIGURE_ARGS: --cc=clang --cxx=clang++
+      --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
     TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
-      ppc-softmmu s390x-softmmu arm-linux-user
-    MAKE_CHECK_ARGS: check
+      ppc-softmmu s390x-softmmu
+    MAKE_CHECK_ARGS: check-qtest check-tcg
+
+clang-user:
+  <<: *native_build_job_definition
+  variables:
+    IMAGE: debian-all-test-cross
+    CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
+      --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
+      --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
+    MAKE_CHECK_ARGS: check-unit check-tcg
 
 # These targets are on the way out
 build-deprecated:
diff --git a/.travis.yml b/.travis.yml
index 05fa1ca905..533a60c130 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -138,33 +138,6 @@ jobs:
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
 
 
-    # Test with Clang for compile portability (Travis uses clang-5.0)
-    - name: "Clang (user)"
-      env:
-        - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
-      compiler: clang
-
-
-    - name: "Clang (main-softmmu)"
-      env:
-        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
-                  --host-cc=clang --cxx=clang++"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
-      compiler: clang
-      before_script:
-        - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
-        - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log meson-logs/meson-log.txt && exit 1; }
-
-
-    - name: "Clang (other-softmmu)"
-      env:
-        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
-                  --host-cc=clang --cxx=clang++"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
-      compiler: clang
-
-
     # Using newer GCC with sanitizers
     - name: "GCC9 with sanitizers (softmmu)"
       dist: bionic
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 03/15] travis.yml: Move the --enable-modules test to the gitlab-CI
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 01/15] travis.yml: Move gprof/gcov test across to gitlab Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 02/15] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 04/15] travis.yml: (Re-)move the --enable-debug jobs Alex Bennée
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Thomas Huth, berrange, Alex Bennée, richard.henderson,
	f4bug, Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	cota, aurelien

From: Thomas Huth <thuth@redhat.com>

Simply add the flag to an existing job, no need for yet another
job here.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210211045455.456371-4-thuth@redhat.com>
---
 .gitlab-ci.yml | 1 +
 .travis.yml    | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5f3d42221a..da2fad1249 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -222,6 +222,7 @@ build-system-centos:
   variables:
     IMAGE: centos8
     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
+                    --enable-modules
     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
     MAKE_CHECK_ARGS: check-build
diff --git a/.travis.yml b/.travis.yml
index 533a60c130..7744ec3a2f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -131,12 +131,6 @@ jobs:
         - CONFIG="--enable-debug-tcg --disable-system"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
 
-    # Module builds are mostly of interest to major distros
-    - name: "GCC modules (main-softmmu)"
-      env:
-        - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
-
 
     # Using newer GCC with sanitizers
     - name: "GCC9 with sanitizers (softmmu)"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH  v1 04/15] travis.yml: (Re-)move the --enable-debug jobs
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (2 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 03/15] travis.yml: Move the --enable-modules " Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 05/15] travis.yml: Move the -fsanitize=thread testing to the gitlab-CI Alex Bennée
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Thomas Huth, berrange, Alex Bennée, richard.henderson,
	f4bug, Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	cota, aurelien

From: Thomas Huth <thuth@redhat.com>

We already have similar jobs in the gitlab-CI ("build-some-softmmu" and
"build-user-plugins"), so let's switch one of them to use --enable-debug
instead of --enable-debug-tcg, then we can simply drop these jobs from
the Travis-CI.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210211045455.456371-5-thuth@redhat.com>
---
 .gitlab-ci.yml |  2 +-
 .travis.yml    | 12 ------------
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index da2fad1249..e878cc0847 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -403,7 +403,7 @@ build-some-softmmu:
   <<: *native_build_job_definition
   variables:
     IMAGE: debian-all-test-cross
-    CONFIGURE_ARGS: --disable-tools --enable-debug-tcg
+    CONFIGURE_ARGS: --disable-tools --enable-debug
     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
     MAKE_CHECK_ARGS: check-tcg
 
diff --git a/.travis.yml b/.travis.yml
index 7744ec3a2f..f0e2b1059c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -118,18 +118,6 @@ after_script:
 
 jobs:
   include:
-    # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower
-    - name: "GCC debug (main-softmmu)"
-      env:
-        - CONFIG="--enable-debug --target-list=${MAIN_SOFTMMU_TARGETS}"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
-
-
-    # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions
-    - name: "GCC debug (user)"
-      env:
-        - CONFIG="--enable-debug-tcg --disable-system"
-        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
 
 
     # Using newer GCC with sanitizers
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 05/15] travis.yml: Move the -fsanitize=thread testing to the gitlab-CI
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (3 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 04/15] travis.yml: (Re-)move the --enable-debug jobs Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 06/15] .shippable: remove the last bits Alex Bennée
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Thomas Huth, berrange, Alex Bennée, richard.henderson,
	f4bug, Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	cota, aurelien

From: Thomas Huth <thuth@redhat.com>

Use clang-10, so we can also use the --enable-tsan configure
option instead of only passing the flag via --extra-cflags.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210211045455.456371-6-thuth@redhat.com>
---
 .gitlab-ci.yml |  9 +++++++++
 .travis.yml    | 51 --------------------------------------------------
 2 files changed, 9 insertions(+), 51 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e878cc0847..7adb9a4cef 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -452,6 +452,15 @@ clang-user:
       --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
     MAKE_CHECK_ARGS: check-unit check-tcg
 
+tsan-build:
+  <<: *native_build_job_definition
+  variables:
+    IMAGE: ubuntu2004
+    CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10 --disable-docs
+                    --enable-fdt=system --enable-slirp=system
+    TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
+    MAKE_CHECK_ARGS: bench V=1
+
 # These targets are on the way out
 build-deprecated:
   <<: *native_build_job_definition
diff --git a/.travis.yml b/.travis.yml
index f0e2b1059c..0a4f38b9d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -119,57 +119,6 @@ after_script:
 jobs:
   include:
 
-
-    # Using newer GCC with sanitizers
-    - name: "GCC9 with sanitizers (softmmu)"
-      dist: bionic
-      addons:
-        apt:
-          update: true
-          sources:
-            # PPAs for newer toolchains
-            - ubuntu-toolchain-r-test
-          packages:
-            # Extra toolchains
-            - gcc-9
-            - g++-9
-            # Build dependencies
-            - libaio-dev
-            - libattr1-dev
-            - libbrlapi-dev
-            - libcap-ng-dev
-            - libgnutls28-dev
-            - libgtk-3-dev
-            - libiscsi-dev
-            - liblttng-ust-dev
-            - libnfs-dev
-            - libncurses5-dev
-            - libnss3-dev
-            - libpixman-1-dev
-            - libpng-dev
-            - librados-dev
-            - libsdl2-dev
-            - libsdl2-image-dev
-            - libseccomp-dev
-            - libspice-protocol-dev
-            - libspice-server-dev
-            - liburcu-dev
-            - libusb-1.0-0-dev
-            - libvte-2.91-dev
-            - ninja-build
-            - sparse
-            - uuid-dev
-      language: generic
-      compiler: none
-      env:
-        - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
-        - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-linux-user"
-        - TEST_CMD=""
-      before_script:
-        - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
-        - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread" || { cat config.log meson-logs/meson-log.txt && exit 1; }
-
-
     - name: "[aarch64] GCC check-tcg"
       arch: arm64
       dist: focal
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH  v1 06/15] .shippable: remove the last bits
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (4 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 05/15] travis.yml: Move the -fsanitize=thread testing to the gitlab-CI Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 07/15] travis-ci: Disable C++ optional objects on AArch64 container Alex Bennée
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, Alex Bennée, richard.henderson, f4bug,
	Philippe Mathieu-Daudé,
	cota, aurelien

Shippable is about to sunset in May 2021 [1] and we had already moved
a chunk of the crossbuilds to GitLab. We already cross build
mips-softmmu targets since:

  6bcb5fc0f7 ("gitlab-ci: Add cross-compiling build tests")

and x86 is very well covered.

[1]: https://blog.shippable.com/the-next-step-in-the-evolution-of-shippable-jfrog-pipelines

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210210154106.20825-1-alex.bennee@linaro.org>

---
v2
  - update MAINTAINERS
---
 .shippable.yml | 23 -----------------------
 MAINTAINERS    |  2 --
 2 files changed, 25 deletions(-)
 delete mode 100644 .shippable.yml

diff --git a/.shippable.yml b/.shippable.yml
deleted file mode 100644
index 97bfa2a0f3..0000000000
--- a/.shippable.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: c
-git:
-   submodules: false
-env:
-  global:
-    - LC_ALL=C
-  matrix:
-    - IMAGE=debian-amd64
-      TARGET_LIST=x86_64-softmmu,x86_64-linux-user
-    - IMAGE=debian-mips-cross
-      TARGET_LIST=mips-softmmu
-build:
-  pre_ci_boot:
-    image_name: registry.gitlab.com/qemu-project/qemu/qemu/${IMAGE}
-    image_tag: latest
-    pull: true
-    options: "-e HOME=/root"
-  ci:
-    - unset CC
-    - mkdir build
-    - cd build
-    - ../configure --disable-docs ${QEMU_CONFIGURE_OPTS} --target-list=${TARGET_LIST}
-    - make -j$(($(getconf _NPROCESSORS_ONLN) + 1))
diff --git a/MAINTAINERS b/MAINTAINERS
index cc8767d4b4..0b0b5ddc05 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3234,12 +3234,10 @@ S: Maintained
 F: .github/lockdown.yml
 F: .travis.yml
 F: scripts/ci/
-F: .shippable.yml
 F: tests/docker/
 F: tests/vm/
 F: scripts/archive-source.sh
 W: https://travis-ci.org/qemu/qemu
-W: https://app.shippable.com/github/qemu/qemu
 W: http://patchew.org/QEMU/
 
 FreeBSD Hosted Continuous Integration
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 07/15] travis-ci: Disable C++ optional objects on AArch64 container
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (5 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 06/15] .shippable: remove the last bits Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 08/15] tests/docker: remove travis container Alex Bennée
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, Alex Bennée, richard.henderson, f4bug,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	cota, aurelien

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Travis-CI seems to have enforced memory limit on containers,
and the 'GCC check-tcg' job started to fail on AArch64 [*]:

  [2041/3679] Compiling C++ object libcommon.fa.p/disas_nanomips.cpp.o
  FAILED: libcommon.fa.p/disas_nanomips.cpp.o
  {standard input}: Assembler messages:
  {standard input}:577781: Warning: end of file not at end of a line; newline inserted
  {standard input}:577882: Error: unknown pseudo-op: `.lvl35769'
  {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
  c++: fatal error: Killed signal terminated program cc1plus
  compilation terminated.

Until we have a replacement for this job on Gitlab-CI, disable
compilation of C++ files by forcing the c++ compiler to /bin/false
so Meson build system can not detect it:

  $ ../configure --cxx=/bin/false

  Compilation
                       C compiler: cc
                  Host C compiler: cc
                     C++ compiler: NO

[*] https://travis-ci.org/github/qemu/qemu/jobs/757819402#L3754

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20210207121239.2288530-1-f4bug@amsat.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 0a4f38b9d8..fc27fd6330 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -150,7 +150,7 @@ jobs:
           - genisoimage
       env:
         - TEST_CMD="make check check-tcg V=1"
-        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
+        - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS} --cxx=/bin/false"
         - UNRELIABLE=true
 
     - name: "[ppc64] GCC check-tcg"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH  v1 08/15] tests/docker: remove travis container
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (6 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 07/15] travis-ci: Disable C++ optional objects on AArch64 container Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 09/15] MAINTAINERS: Add gdbstub.h to the "GDB stub" section Alex Bennée
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Wainer dos Santos Moschetta,
	Alex Bennée, cota, aurelien

From: Daniel P. Berrangé <berrange@redhat.com>

The travis container that we have no longer matches what travis
currently uses. As all x86 jobs are being moved to GitLab CI too,
there is no compelling reason to update the travis container. It
is simpler to just remove it.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210209135011.1224992-2-berrange@redhat.com>
---
 docs/devel/testing.rst                 | 14 --------
 tests/docker/Makefile.include          | 11 ++----
 tests/docker/dockerfiles/travis.docker | 17 ----------
 tests/docker/travis                    | 22 ------------
 tests/docker/travis.py                 | 47 --------------------------
 5 files changed, 2 insertions(+), 109 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/travis.docker
 delete mode 100755 tests/docker/travis
 delete mode 100755 tests/docker/travis.py

diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 209f9d8172..00ce16de48 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -357,20 +357,6 @@ source and build it.
 
 The full list of tests is printed in the ``make docker`` help.
 
-Tools
------
-
-There are executables that are created to run in a specific Docker environment.
-This makes it easy to write scripts that have heavy or special dependencies,
-but are still very easy to use.
-
-Currently the only tool is ``travis``, which mimics the Travis-CI tests in a
-container. It runs in the ``travis`` image:
-
-.. code::
-
-  make docker-travis@travis
-
 Debugging a Docker test failure
 -------------------------------
 
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 93b29ad823..7cab761bf5 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -21,8 +21,6 @@ DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),registry.gitlab.com/qemu-project
 DOCKER_TESTS := $(notdir $(shell \
 	find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f))
 
-DOCKER_TOOLS := travis
-
 ENGINE := auto
 
 DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
@@ -126,7 +124,7 @@ ifneq ($(HOST_ARCH),x86_64)
 DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross
 DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross
 DOCKER_PARTIAL_IMAGES += debian-s390x-cross
-DOCKER_PARTIAL_IMAGES += fedora travis
+DOCKER_PARTIAL_IMAGES += fedora
 endif
 
 docker-image-debian-alpha-cross: docker-image-debian10
@@ -147,8 +145,6 @@ docker-image-debian-s390x-cross: docker-image-debian10
 docker-image-debian-sh4-cross: docker-image-debian10
 docker-image-debian-sparc64-cross: docker-image-debian10
 
-docker-image-travis: NOUSER=1
-
 # Specialist build images, sometimes very limited tools
 docker-image-debian-tricore-cross: docker-image-debian10
 docker-image-debian-all-test-cross: docker-image-debian10
@@ -174,7 +170,7 @@ DOCKER_PARTIAL_IMAGES += fedora-i386-cross fedora-cris-cross
 
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES)), \
-	$(foreach t,$(DOCKER_TESTS) $(DOCKER_TOOLS), \
+	$(foreach t,$(DOCKER_TESTS), \
 		$(eval .PHONY: docker-$t@$i) \
 		$(eval docker-$t@$i: docker-image-$i docker-run-$t@$i) \
 	) \
@@ -212,9 +208,6 @@ endif
 	@echo 'Available tests:'
 	@echo '    $(DOCKER_TESTS)'
 	@echo
-	@echo 'Available tools:'
-	@echo '    $(DOCKER_TOOLS)'
-	@echo
 	@echo 'Special variables:'
 	@echo '    TARGET_LIST=a,b,c    Override target list in builds.'
 	@echo '    EXTRA_CONFIGURE_OPTS="..."'
diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker
deleted file mode 100644
index cd1435a7e9..0000000000
--- a/tests/docker/dockerfiles/travis.docker
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Travis Image - this is broadly the same image that we run our CI
-# tests on.
-#
-FROM travisci/ci-sardonyx:packer-1552557266-f909ac5
-ENV DEBIAN_FRONTEND noninteractive
-ENV LANG en_US.UTF-8
-ENV LC_ALL en_US.UTF-8
-RUN sed -i "s/# deb-src/deb-src/" /etc/apt/sources.list
-RUN apt-get update
-RUN apt-get -y build-dep qemu
-RUN apt-get -y install device-tree-compiler python3 python3-yaml dh-autoreconf gdb strace lsof net-tools gcovr ninja-build
-# Travis tools require PhantomJS / Neo4j / Maven accessible
-# in their PATH (QEMU build won't access them).
-ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-ENV FEATURES clang pyyaml docs
-USER travis
diff --git a/tests/docker/travis b/tests/docker/travis
deleted file mode 100755
index 47c03677d6..0000000000
--- a/tests/docker/travis
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash -e
-#
-# Mimic a travis testing matrix
-#
-# Copyright (c) 2016 Red Hat Inc.
-#
-# Authors:
-#  Fam Zheng <famz@redhat.com>
-#
-# This work is licensed under the terms of the GNU GPL, version 2
-# or (at your option) any later version. See the COPYING file in
-# the top-level directory.
-
-. common.rc
-
-requires pyyaml
-cmdfile=/tmp/travis_cmd_list.sh
-$QEMU_SRC/tests/docker/travis.py $QEMU_SRC/.travis.yml > $cmdfile
-chmod +x $cmdfile
-cd "$QEMU_SRC"
-unset BUILD_DIR SRC_DIR
-$cmdfile
diff --git a/tests/docker/travis.py b/tests/docker/travis.py
deleted file mode 100755
index 37307ac366..0000000000
--- a/tests/docker/travis.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python3
-#
-# Travis YAML config parser
-#
-# Copyright (c) 2016 Red Hat Inc.
-#
-# Authors:
-#  Fam Zheng <famz@redhat.com>
-#
-# This work is licensed under the terms of the GNU GPL, version 2
-# or (at your option) any later version. See the COPYING file in
-# the top-level directory.
-
-import sys
-import yaml
-import itertools
-
-def load_yaml(fname):
-    return yaml.safe_load(open(fname, "r").read())
-
-def conf_iter(conf):
-    # If "compiler" is omitted from the included env then Travis picks the
-    # first entry of the global compiler list.
-    default_compiler = conf["compiler"][0]
-    def env_to_list(env):
-        return env if isinstance(env, list) else [env]
-    for entry in conf["matrix"]["include"]:
-        yield {"env": env_to_list(entry["env"]),
-               "compiler": entry.get("compiler", default_compiler)}
-
-def main():
-    if len(sys.argv) < 2:
-        sys.stderr.write("Usage: %s <travis-file>\n" % sys.argv[0])
-        return 1
-    conf = load_yaml(sys.argv[1])
-    print("\n".join((": ${%s}" % var for var in conf["env"]["global"])))
-    for config in conf_iter(conf):
-        print("(")
-        print("\n".join(config["env"]))
-        print("alias cc=" + config["compiler"])
-        print("\n".join(conf["before_script"]))
-        print("\n".join(conf["script"]))
-        print(")")
-    return 0
-
-if __name__ == "__main__":
-    sys.exit(main())
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 09/15] MAINTAINERS: Add gdbstub.h to the "GDB stub" section
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (7 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 08/15] tests/docker: remove travis container Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p() Alex Bennée
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, aurelien

From: Peter Maydell <peter.maydell@linaro.org>

The F: patterns in the "GDB stub" section forgot gdbstub.h; add it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210208113729.25170-1-peter.maydell@linaro.org>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 0b0b5ddc05..a2b92f973a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2338,6 +2338,7 @@ M: Alex Bennée <alex.bennee@linaro.org>
 R: Philippe Mathieu-Daudé <philmd@redhat.com>
 S: Maintained
 F: gdbstub*
+F: include/exec/gdbstub.h
 F: gdb-xml/
 F: tests/tcg/multiarch/gdbstub/
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p()
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (8 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 09/15] MAINTAINERS: Add gdbstub.h to the "GDB stub" section Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p() Alex Bennée
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Yoshinori Sato,
	Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, aurelien

From: Peter Maydell <peter.maydell@linaro.org>

We used to make a distinction between 'float64'/'float32' types and
the 'uint64_t'/'uint32_t' types, requiring special conversion
operations to go between them.  We've now dropped this distinction as
unnecessary, and the 'float*' types remain primarily for
documentation purposes when used in places like the function
prototypes of TCG helper functions.

This means that there's no need for a special gdb_get_float32()
function to write a float32 value to the GDB protocol buffer; we can
just use gdb_get_reg32().

Similarly, for reading a value out of the GDB buffer into a float32
we can use ldl_p() and need not use ldfl_p().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210208113428.7181-2-peter.maydell@linaro.org>
---
 target/sh4/gdbstub.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/sh4/gdbstub.c b/target/sh4/gdbstub.c
index 34ad3ca050..3488f68e32 100644
--- a/target/sh4/gdbstub.c
+++ b/target/sh4/gdbstub.c
@@ -58,9 +58,9 @@ int superh_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
         return gdb_get_regl(mem_buf, env->fpscr);
     case 25 ... 40:
         if (env->fpscr & FPSCR_FR) {
-            return gdb_get_float32(mem_buf, env->fregs[n - 9]);
+            return gdb_get_reg32(mem_buf, env->fregs[n - 9]);
         }
-        return gdb_get_float32(mem_buf, env->fregs[n - 25]);
+        return gdb_get_reg32(mem_buf, env->fregs[n - 25]);
     case 41:
         return gdb_get_regl(mem_buf, env->ssr);
     case 42:
@@ -119,9 +119,9 @@ int superh_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
         break;
     case 25 ... 40:
         if (env->fpscr & FPSCR_FR) {
-            env->fregs[n - 9] = ldfl_p(mem_buf);
+            env->fregs[n - 9] = ldl_p(mem_buf);
         } else {
-            env->fregs[n - 25] = ldfl_p(mem_buf);
+            env->fregs[n - 25] = ldl_p(mem_buf);
         }
         break;
     case 41:
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p()
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (9 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p() Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 12/15] target/ppc: " Alex Bennée
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Laurent Vivier, Alex Bennée, cota,
	aurelien

From: Peter Maydell <peter.maydell@linaro.org>

We used to make a distinction between 'float64'/'float32' types and
the 'uint64_t'/'uint32_t' types, requiring special conversion
operations to go between them.  We've now dropped this distinction as
unnecessary, and the 'float*' types remain primarily for
documentation purposes when used in places like the function
prototypes of TCG helper functions.

This means that there's no need for a special gdb_get_float64()
function to write a float64 value to the GDB protocol buffer; we can
just use gdb_get_reg64().

Similarly, for reading a value out of the GDB buffer into a float64
we can use ldq_p() and need not use ldfq_p().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210208113428.7181-3-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 target/m68k/helper.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/target/m68k/helper.c b/target/m68k/helper.c
index 3ff5765795..09f0391d50 100644
--- a/target/m68k/helper.c
+++ b/target/m68k/helper.c
@@ -72,8 +72,7 @@ static int cf_fpu_gdb_get_reg(CPUM68KState *env, GByteArray *mem_buf, int n)
 {
     if (n < 8) {
         float_status s;
-        return gdb_get_float64(mem_buf,
-                               floatx80_to_float64(env->fregs[n].d, &s));
+        return gdb_get_reg64(mem_buf, floatx80_to_float64(env->fregs[n].d, &s));
     }
     switch (n) {
     case 8: /* fpcontrol */
@@ -90,7 +89,7 @@ static int cf_fpu_gdb_set_reg(CPUM68KState *env, uint8_t *mem_buf, int n)
 {
     if (n < 8) {
         float_status s;
-        env->fregs[n].d = float64_to_floatx80(ldfq_p(mem_buf), &s);
+        env->fregs[n].d = float64_to_floatx80(ldq_p(mem_buf), &s);
         return 8;
     }
     switch (n) {
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 12/15] target/ppc: Drop use of gdb_get_float64() and ldfq_p()
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (10 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p() Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 13/15] gdbstub: Remove unused gdb_get_float32() and gdb_get_float64() Alex Bennée
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Greg Kurz, Alex Bennée, cota,
	open list:PowerPC TCG CPUs, aurelien, David Gibson

From: Peter Maydell <peter.maydell@linaro.org>

We used to make a distinction between 'float64'/'float32' types and
the 'uint64_t'/'uint32_t' types, requiring special conversion
operations to go between them.  We've now dropped this distinction as
unnecessary, and the 'float*' types remain primarily for
documentation purposes when used in places like the function
prototypes of TCG helper functions.

This means that there's no need for a special gdb_get_float64()
function to write a float64 value to the GDB protocol buffer; we can
just use gdb_get_reg64().

Similarly, for reading a value out of the GDB buffer into a float64
we can use ldq_p() and need not use ldfq_p().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210208113428.7181-4-peter.maydell@linaro.org>
---
 target/ppc/gdbstub.c            | 8 ++++----
 target/ppc/translate_init.c.inc | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c
index 01459dd31d..c28319fb97 100644
--- a/target/ppc/gdbstub.c
+++ b/target/ppc/gdbstub.c
@@ -130,7 +130,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray *buf, int n)
         gdb_get_regl(buf, env->gpr[n]);
     } else if (n < 64) {
         /* fprs */
-        gdb_get_float64(buf, *cpu_fpr_ptr(env, n - 32));
+        gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32));
     } else {
         switch (n) {
         case 64:
@@ -184,7 +184,7 @@ int ppc_cpu_gdb_read_register_apple(CPUState *cs, GByteArray *buf, int n)
         gdb_get_reg64(buf, env->gpr[n]);
     } else if (n < 64) {
         /* fprs */
-        gdb_get_float64(buf, *cpu_fpr_ptr(env, n - 32));
+        gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32));
     } else if (n < 96) {
         /* Altivec */
         gdb_get_reg64(buf, n - 64);
@@ -241,7 +241,7 @@ int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
         env->gpr[n] = ldtul_p(mem_buf);
     } else if (n < 64) {
         /* fprs */
-        *cpu_fpr_ptr(env, n - 32) = ldfq_p(mem_buf);
+        *cpu_fpr_ptr(env, n - 32) = ldq_p(mem_buf);
     } else {
         switch (n) {
         case 64:
@@ -291,7 +291,7 @@ int ppc_cpu_gdb_write_register_apple(CPUState *cs, uint8_t *mem_buf, int n)
         env->gpr[n] = ldq_p(mem_buf);
     } else if (n < 64) {
         /* fprs */
-        *cpu_fpr_ptr(env, n - 32) = ldfq_p(mem_buf);
+        *cpu_fpr_ptr(env, n - 32) = ldq_p(mem_buf);
     } else {
         switch (n) {
         case 64 + 32:
diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc
index 3ec45cbc19..e7324e85cd 100644
--- a/target/ppc/translate_init.c.inc
+++ b/target/ppc/translate_init.c.inc
@@ -9923,7 +9923,7 @@ static int gdb_get_float_reg(CPUPPCState *env, GByteArray *buf, int n)
 {
     uint8_t *mem_buf;
     if (n < 32) {
-        gdb_get_float64(buf, *cpu_fpr_ptr(env, n));
+        gdb_get_reg64(buf, *cpu_fpr_ptr(env, n));
         mem_buf = gdb_get_reg_ptr(buf, 8);
         ppc_maybe_bswap_register(env, mem_buf, 8);
         return 8;
@@ -9941,7 +9941,7 @@ static int gdb_set_float_reg(CPUPPCState *env, uint8_t *mem_buf, int n)
 {
     if (n < 32) {
         ppc_maybe_bswap_register(env, mem_buf, 8);
-        *cpu_fpr_ptr(env, n) = ldfq_p(mem_buf);
+        *cpu_fpr_ptr(env, n) = ldq_p(mem_buf);
         return 8;
     }
     if (n == 32) {
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 13/15] gdbstub: Remove unused gdb_get_float32() and gdb_get_float64()
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (11 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 12/15] target/ppc: " Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 14/15] bswap.h: Remove unused float-access functions Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 15/15] tests/tcg: fix silent skipping of softmmu gdb tests Alex Bennée
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, aurelien

From: Peter Maydell <peter.maydell@linaro.org>

The functions gdb_get_float32() and gdb_get_float64() are now unused;
remove them.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210208113428.7181-5-peter.maydell@linaro.org>
---
 include/exec/gdbstub.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index ff0b7bc45e..a024a0350d 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -135,26 +135,6 @@ static inline int gdb_get_reg128(GByteArray *buf, uint64_t val_hi,
     return 16;
 }
 
-static inline int gdb_get_float32(GByteArray *array, float32 val)
-{
-    uint8_t buf[sizeof(CPU_FloatU)];
-
-    stfl_p(buf, val);
-    g_byte_array_append(array, buf, sizeof(buf));
-
-    return sizeof(buf);
-}
-
-static inline int gdb_get_float64(GByteArray *array, float64 val)
-{
-    uint8_t buf[sizeof(CPU_DoubleU)];
-
-    stfq_p(buf, val);
-    g_byte_array_append(array, buf, sizeof(buf));
-
-    return sizeof(buf);
-}
-
 static inline int gdb_get_zeroes(GByteArray *array, size_t len)
 {
     guint oldlen = array->len;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH  v1 14/15] bswap.h: Remove unused float-access functions
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (12 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 13/15] gdbstub: Remove unused gdb_get_float32() and gdb_get_float64() Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  2021-02-11 12:27 ` [PATCH v1 15/15] tests/tcg: fix silent skipping of softmmu gdb tests Alex Bennée
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, Paolo Bonzini,
	aurelien

From: Peter Maydell <peter.maydell@linaro.org>

The float-access functions stfl_*, stfq*, ldfl* and ldfq* are now
unused; remove them.  (Accesses to float64 and float32 types can be
made with the ldl/stl/ldq/stq functions, as float64 and float32 are
guaranteed to be typedefs for normal integer types.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210208113428.7181-6-peter.maydell@linaro.org>
---
 docs/devel/loads-stores.rst | 14 ++++-----
 include/exec/cpu-all.h      |  8 -----
 include/qemu/bswap.h        | 60 -------------------------------------
 3 files changed, 5 insertions(+), 77 deletions(-)

diff --git a/docs/devel/loads-stores.rst b/docs/devel/loads-stores.rst
index ee43f5dfee..568274baec 100644
--- a/docs/devel/loads-stores.rst
+++ b/docs/devel/loads-stores.rst
@@ -24,16 +24,12 @@ potentially unaligned pointer values.
 
 Function names follow the pattern:
 
-load: ``ld{type}{sign}{size}_{endian}_p(ptr)``
+load: ``ld{sign}{size}_{endian}_p(ptr)``
 
-store: ``st{type}{size}_{endian}_p(ptr, val)``
-
-``type``
- - (empty) : integer access
- - ``f`` : float access
+store: ``st{size}_{endian}_p(ptr, val)``
 
 ``sign``
- - (empty) : for 32 or 64 bit sizes (including floats and doubles)
+ - (empty) : for 32 or 64 bit sizes
  - ``u`` : unsigned
  - ``s`` : signed
 
@@ -67,8 +63,8 @@ of size ``sz`` bytes.
 
 
 Regexes for git grep
- - ``\<ldf\?[us]\?[bwlq]\(_[hbl]e\)\?_p\>``
- - ``\<stf\?[bwlq]\(_[hbl]e\)\?_p\>``
+ - ``\<ld[us]\?[bwlq]\(_[hbl]e\)\?_p\>``
+ - ``\<st[bwlq]\(_[hbl]e\)\?_p\>``
  - ``\<ldn_\([hbl]e\)?_p\>``
  - ``\<stn_\([hbl]e\)?_p\>``
 
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index cfb1d79331..babf0a8959 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -125,13 +125,9 @@ static inline void tswap64s(uint64_t *s)
 #define ldsw_p(p) ldsw_be_p(p)
 #define ldl_p(p) ldl_be_p(p)
 #define ldq_p(p) ldq_be_p(p)
-#define ldfl_p(p) ldfl_be_p(p)
-#define ldfq_p(p) ldfq_be_p(p)
 #define stw_p(p, v) stw_be_p(p, v)
 #define stl_p(p, v) stl_be_p(p, v)
 #define stq_p(p, v) stq_be_p(p, v)
-#define stfl_p(p, v) stfl_be_p(p, v)
-#define stfq_p(p, v) stfq_be_p(p, v)
 #define ldn_p(p, sz) ldn_be_p(p, sz)
 #define stn_p(p, sz, v) stn_be_p(p, sz, v)
 #else
@@ -139,13 +135,9 @@ static inline void tswap64s(uint64_t *s)
 #define ldsw_p(p) ldsw_le_p(p)
 #define ldl_p(p) ldl_le_p(p)
 #define ldq_p(p) ldq_le_p(p)
-#define ldfl_p(p) ldfl_le_p(p)
-#define ldfq_p(p) ldfq_le_p(p)
 #define stw_p(p, v) stw_le_p(p, v)
 #define stl_p(p, v) stl_le_p(p, v)
 #define stq_p(p, v) stq_le_p(p, v)
-#define stfl_p(p, v) stfl_le_p(p, v)
-#define stfq_p(p, v) stfq_le_p(p, v)
 #define ldn_p(p, sz) ldn_le_p(p, sz)
 #define stn_p(p, sz, v) stn_le_p(p, sz, v)
 #endif
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 8b01c38040..4aaf992b5d 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -400,36 +400,6 @@ static inline void stq_le_p(void *ptr, uint64_t v)
     stq_he_p(ptr, le_bswap(v, 64));
 }
 
-/* float access */
-
-static inline float32 ldfl_le_p(const void *ptr)
-{
-    CPU_FloatU u;
-    u.l = ldl_le_p(ptr);
-    return u.f;
-}
-
-static inline void stfl_le_p(void *ptr, float32 v)
-{
-    CPU_FloatU u;
-    u.f = v;
-    stl_le_p(ptr, u.l);
-}
-
-static inline float64 ldfq_le_p(const void *ptr)
-{
-    CPU_DoubleU u;
-    u.ll = ldq_le_p(ptr);
-    return u.d;
-}
-
-static inline void stfq_le_p(void *ptr, float64 v)
-{
-    CPU_DoubleU u;
-    u.d = v;
-    stq_le_p(ptr, u.ll);
-}
-
 static inline int lduw_be_p(const void *ptr)
 {
     return (uint16_t)be_bswap(lduw_he_p(ptr), 16);
@@ -465,36 +435,6 @@ static inline void stq_be_p(void *ptr, uint64_t v)
     stq_he_p(ptr, be_bswap(v, 64));
 }
 
-/* float access */
-
-static inline float32 ldfl_be_p(const void *ptr)
-{
-    CPU_FloatU u;
-    u.l = ldl_be_p(ptr);
-    return u.f;
-}
-
-static inline void stfl_be_p(void *ptr, float32 v)
-{
-    CPU_FloatU u;
-    u.f = v;
-    stl_be_p(ptr, u.l);
-}
-
-static inline float64 ldfq_be_p(const void *ptr)
-{
-    CPU_DoubleU u;
-    u.ll = ldq_be_p(ptr);
-    return u.d;
-}
-
-static inline void stfq_be_p(void *ptr, float64 v)
-{
-    CPU_DoubleU u;
-    u.d = v;
-    stq_be_p(ptr, u.ll);
-}
-
 static inline unsigned long leul_to_cpu(unsigned long v)
 {
 #if HOST_LONG_BITS == 32
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v1 15/15] tests/tcg: fix silent skipping of softmmu gdb tests
  2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
                   ` (13 preceding siblings ...)
  2021-02-11 12:27 ` [PATCH v1 14/15] bswap.h: Remove unused float-access functions Alex Bennée
@ 2021-02-11 12:27 ` Alex Bennée
  14 siblings, 0 replies; 16+ messages in thread
From: Alex Bennée @ 2021-02-11 12:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, Alex Bennée, richard.henderson, f4bug, cota,
	aurelien

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/multiarch/system/Makefile.softmmu-target | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/tcg/multiarch/system/Makefile.softmmu-target b/tests/tcg/multiarch/system/Makefile.softmmu-target
index 4657f6e4cf..625ed792c6 100644
--- a/tests/tcg/multiarch/system/Makefile.softmmu-target
+++ b/tests/tcg/multiarch/system/Makefile.softmmu-target
@@ -27,5 +27,9 @@ run-gdbstub-memory: memory
 		--bin $< --test $(MULTIARCH_SRC)/gdbstub/memory.py, \
 	"softmmu gdbstub support")
 
-MULTIARCH_RUNS += run-gdbstub-memory
+else
+run-gdbstub-%:
+	$(call skip-test, "gdbstub test $*", "need working gdb")
 endif
+
+MULTIARCH_RUNS += run-gdbstub-memory
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-02-11 12:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 12:27 [PATCH v1 00/15] testing and gdbstub pre-PR (travis, shipable, gitlab, gdb float) Alex Bennée
2021-02-11 12:27 ` [PATCH v1 01/15] travis.yml: Move gprof/gcov test across to gitlab Alex Bennée
2021-02-11 12:27 ` [PATCH v1 02/15] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI Alex Bennée
2021-02-11 12:27 ` [PATCH v1 03/15] travis.yml: Move the --enable-modules " Alex Bennée
2021-02-11 12:27 ` [PATCH v1 04/15] travis.yml: (Re-)move the --enable-debug jobs Alex Bennée
2021-02-11 12:27 ` [PATCH v1 05/15] travis.yml: Move the -fsanitize=thread testing to the gitlab-CI Alex Bennée
2021-02-11 12:27 ` [PATCH v1 06/15] .shippable: remove the last bits Alex Bennée
2021-02-11 12:27 ` [PATCH v1 07/15] travis-ci: Disable C++ optional objects on AArch64 container Alex Bennée
2021-02-11 12:27 ` [PATCH v1 08/15] tests/docker: remove travis container Alex Bennée
2021-02-11 12:27 ` [PATCH v1 09/15] MAINTAINERS: Add gdbstub.h to the "GDB stub" section Alex Bennée
2021-02-11 12:27 ` [PATCH v1 10/15] target/sh4: Drop use of gdb_get_float32() and ldfl_p() Alex Bennée
2021-02-11 12:27 ` [PATCH v1 11/15] target/m68k: Drop use of gdb_get_float64() and ldfq_p() Alex Bennée
2021-02-11 12:27 ` [PATCH v1 12/15] target/ppc: " Alex Bennée
2021-02-11 12:27 ` [PATCH v1 13/15] gdbstub: Remove unused gdb_get_float32() and gdb_get_float64() Alex Bennée
2021-02-11 12:27 ` [PATCH v1 14/15] bswap.h: Remove unused float-access functions Alex Bennée
2021-02-11 12:27 ` [PATCH v1 15/15] tests/tcg: fix silent skipping of softmmu gdb tests Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).