Skip to contentSkip to conversation

testing/next (docker, avocado, s390x, MAINTAINERS)

PATCH Superseded Alex Bennée 10 participants 72 messages Oct 20, 2022 – Jan 2, 2023 Block layer

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover testing/next (docker, avocado, s390x, MAINTAINERS)

Hi,

The testing/next changes have accumulated a few more fixes since the last posting. Including:

- a bunch of Bin Meng's test cleanups for windows
- some avocado test fixes and tweaks
- disabling an sh4 avocado test (possibly a missed recent intermittent regression)
- enabling some sh4 check-tcg tests (now bugs are fixed)
- a minor excursion into the s390 translator

The following still need review:

- target/s390x: fake instruction loading when handling 'ex'
- target/s390x: don't probe next pc for EXecuted insns
- target/s390x: don't use ld_code2 to probe next pc
- tests/tcg: re-enable threadcount for sh4
- tests/tcg: re-enable linux-test for sh4
- tests/avocado: disable sh4 rd2 tests on Gitlab
- tests/avocado: set -machine none for userfwd and vnc tests
- MAINTAINERS: fix-up for check-tcg Makefile changes
- MAINTAINERS: add features_to_c.sh to gdbstub files
- MAINTAINERS: add entries for the key build bits
- tests/tcg: use regular semihosting for nios2-softmmu
- tests/avocado: extend the timeout for x86_64 tcg tests
- configure: fix the --enable-static --disable-pie case
- configure: don't enable cross compilers unless in target_list
- tests/docker: update fedora-win[32|64]-cross with lcitool

Alex Bennée (16):
tests/docker: update fedora-win[32|64]-cross with lcitool tests/docker: update test-mingw to run single build
configure: don't enable cross compilers unless in target_list
configure: fix the --enable-static --disable-pie case tests/avocado: extend the timeout for x86_64 tcg tests tests/tcg: use regular semihosting for nios2-softmmu
MAINTAINERS: add entries for the key build bits
MAINTAINERS: add features_to_c.sh to gdbstub files
MAINTAINERS: fix-up for check-tcg Makefile changes tests/avocado: set -machine none for userfwd and vnc tests tests/avocado: disable sh4 rd2 tests on Gitlab tests/tcg: re-enable linux-test for sh4
tests/tcg: re-enable threadcount for sh4 target/s390x: don't use ld_code2 to probe next pc target/s390x: don't probe next pc for EXecuted insns target/s390x: fake instruction loading when handling 'ex'

Anton Johansson (2):
tests/docker: Add flex/bison to debian-all-test tests/docker: Add flex/bison to debian-hexagon-cross

Bin Meng (6):
semihosting/arm-compat-semi: Avoid using hardcoded /tmp
tcg: Avoid using hardcoded /tmp
util/qemu-sockets: Use g_get_tmp_dir() to get the directory for
temporary files
block/vvfat: Unify the mkdir() call fsdev/virtfs-proxy-helper: Use g_mkdir()
hw/usb: dev-mtp: Use g_mkdir()

Paolo Bonzini (1):
tests/tcg: include CONFIG_PLUGIN in config-host.mak

Peter Maydell (1):
tests/avocado: raspi2_initrd: Wait for guest shutdown message before
stopping

 configure                                     |  17 +-
 include/exec/translator.h                     |  17 ++
 block/vvfat.c                                 |   9 +-
 fsdev/virtfs-proxy-helper.c                   |   3 +-
 hw/usb/dev-mtp.c                              |   4 +-
 semihosting/arm-compat-semi.c                 |   3 +-
 target/s390x/tcg/translate.c                  |  14 +-
 tcg/tcg.c                                     |   3 +-
 util/qemu-sockets.c                           |   5 +-
 MAINTAINERS                                   |  28 ++-
 tests/avocado/boot_linux.py                   |   1 +
 tests/avocado/boot_linux_console.py           |   6 +-
 tests/avocado/info_usernet.py                 |   3 +
 tests/avocado/vnc.py                          |   1 +
 tests/docker/dockerfiles/alpine.docker        |   2 +-
 tests/docker/dockerfiles/centos8.docker       |   2 +-
 .../dockerfiles/debian-all-test-cross.docker  |   2 +
 .../dockerfiles/debian-amd64-cross.docker     | 234 ++++++++---------
 tests/docker/dockerfiles/debian-amd64.docker  | 236 +++++++++---------
 .../dockerfiles/debian-arm64-cross.docker     | 232 ++++++++---------
 .../dockerfiles/debian-armel-cross.docker     | 230 ++++++++---------
 .../dockerfiles/debian-armhf-cross.docker     | 232 ++++++++---------
 .../dockerfiles/debian-hexagon-cross.docker   |   2 +-
 .../dockerfiles/debian-mips64el-cross.docker  | 226 ++++++++---------
 .../dockerfiles/debian-mipsel-cross.docker    | 226 ++++++++---------
 .../dockerfiles/debian-ppc64el-cross.docker   | 230 ++++++++---------
 .../dockerfiles/debian-s390x-cross.docker     | 228 ++++++++---------
 .../dockerfiles/fedora-win32-cross.docker     | 139 ++++++++---
 .../dockerfiles/fedora-win64-cross.docker     | 138 +++++++---
 tests/docker/dockerfiles/fedora.docker        | 230 ++++++++---------
 tests/docker/dockerfiles/opensuse-leap.docker |   2 +-
 tests/docker/dockerfiles/ubuntu2004.docker    | 234 ++++++++---------
 tests/docker/test-mingw                       |  16 +-
 tests/lcitool/libvirt-ci                      |   2 +-
 tests/lcitool/refresh                         |  48 ++--
 tests/tcg/nios2/Makefile.softmmu-target       |   3 +-
 tests/tcg/sh4/Makefile.target                 |  12 -
 37 files changed, 1600 insertions(+), 1420 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/26 tests/docker: update fedora-win[32|64]-cross with lcitool

Convert another two dockerfiles to lcitool and update. I renamed the helper because it is not Debian specific. We need an updated lcitool for this to deal with the weirdness of a 32bit nsis tool for both 32 and 64 bit builds. As a result there are some minor whitespace and re-order changes in a bunch of the docker files.

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/alpine.docker        |   2 +-
 tests/docker/dockerfiles/centos8.docker       |   2 +-
 .../dockerfiles/debian-amd64-cross.docker     | 234 ++++++++---------
 tests/docker/dockerfiles/debian-amd64.docker  | 236 +++++++++---------
 .../dockerfiles/debian-arm64-cross.docker     | 232 ++++++++---------
 .../dockerfiles/debian-armel-cross.docker     | 230 ++++++++---------
 .../dockerfiles/debian-armhf-cross.docker     | 232 ++++++++---------
 .../dockerfiles/debian-mips64el-cross.docker  | 226 ++++++++---------
 .../dockerfiles/debian-mipsel-cross.docker    | 226 ++++++++---------
 .../dockerfiles/debian-ppc64el-cross.docker   | 230 ++++++++---------
 .../dockerfiles/debian-s390x-cross.docker     | 228 ++++++++---------
 .../dockerfiles/fedora-win32-cross.docker     | 139 ++++++++---
 .../dockerfiles/fedora-win64-cross.docker     | 138 +++++++---
 tests/docker/dockerfiles/fedora.docker        | 230 ++++++++---------
 tests/docker/dockerfiles/opensuse-leap.docker |   2 +-
 tests/docker/dockerfiles/ubuntu2004.docker    | 234 ++++++++---------
 tests/lcitool/libvirt-ci                      |   2 +-
 tests/lcitool/refresh                         |  48 ++--
 18 files changed, 1499 insertions(+), 1372 deletions(-)
tests/docker/dockerfiles/alpine.docker +1 -1
index 9b7541261a..a854ae6b78 100644
@@ -119,8 +119,8 @@ RUN apk update && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
 
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
 ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
-ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
tests/docker/dockerfiles/centos8.docker +1 -1
index d89113c0df..1f70d41aeb 100644
@@ -130,8 +130,8 @@ RUN dnf distro-sync -y && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
 
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
 ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
-ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
tests/docker/dockerfiles/debian-amd64-cross.docker +117 -117

255 lines not on this page · raw message

tests/docker/dockerfiles/debian-amd64.docker +118 -118

252 lines not on this page · raw message

tests/docker/dockerfiles/debian-arm64-cross.docker +116 -116

253 lines not on this page · raw message

tests/docker/dockerfiles/debian-armel-cross.docker +115 -115

251 lines not on this page · raw message

tests/docker/dockerfiles/debian-armhf-cross.docker +116 -116

253 lines not on this page · raw message

tests/docker/dockerfiles/debian-mips64el-cross.docker +113 -113

247 lines not on this page · raw message

tests/docker/dockerfiles/debian-mipsel-cross.docker +113 -113

247 lines not on this page · raw message

tests/docker/dockerfiles/debian-ppc64el-cross.docker +115 -115

251 lines not on this page · raw message

tests/docker/dockerfiles/debian-s390x-cross.docker +114 -114

249 lines not on this page · raw message

tests/docker/dockerfiles/fedora-win32-cross.docker +98 -41

144 lines not on this page · raw message

tests/docker/dockerfiles/fedora-win64-cross.docker +99 -39

142 lines not on this page · raw message

tests/docker/dockerfiles/fedora.docker +115 -115

243 lines not on this page · raw message

tests/docker/dockerfiles/opensuse-leap.docker +1 -1
index d80064756f..361979d6b3 100644
@@ -132,8 +132,8 @@ RUN zypper update -y && \
 
 RUN /usr/bin/pip3 install meson==0.56.0
 
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
 ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
-ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
tests/docker/dockerfiles/ubuntu2004.docker +117 -117

186 lines not on this page · raw message

tests/lcitool/libvirt-ci +1 -1
index e3712b7912..a2633997ff 160000

Lines of this file are not shown. View the raw message.

tests/lcitool/refresh +29 -19

48 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

Acked-by on v3 1/26
#2 lore raw

Re: [PATCH v3 01/26] tests/docker: update fedora-win[32|64]-cross with lcitool

Quoted 20 lines · Alex Bennée

Convert another two dockerfiles to lcitool and update. I renamed the helper because it is not Debian specific. We need an updated lcitool for this to deal with the weirdness of a 32bit nsis tool for both 32 and 64 bit builds. As a result there are some minor whitespace and re-order changes in a bunch of the docker files.

Message-Id:<[email protected]>

---
  tests/docker/dockerfiles/alpine.docker        |   2 +-
  tests/docker/dockerfiles/centos8.docker       |   2 +-
  .../dockerfiles/debian-amd64-cross.docker     | 234 ++++++++---------
  tests/docker/dockerfiles/debian-amd64.docker  | 236 +++++++++---------
  .../dockerfiles/debian-arm64-cross.docker     | 232 ++++++++---------
  .../dockerfiles/debian-armel-cross.docker     | 230 ++++++++---------
  .../dockerfiles/debian-armhf-cross.docker     | 232 ++++++++---------
  .../dockerfiles/debian-mips64el-cross.docker  | 226 ++++++++---------
  .../dockerfiles/debian-mipsel-cross.docker    | 226 ++++++++---------
  .../dockerfiles/debian-ppc64el-cross.docker   | 230 ++++++++---------
  .../dockerfiles/debian-s390x-cross.docker     | 228 ++++++++---------
Quoted 8 lines
  .../dockerfiles/fedora-win32-cross.docker     | 139 ++++++++---
  .../dockerfiles/fedora-win64-cross.docker     | 138 +++++++---
  tests/docker/dockerfiles/fedora.docker        | 230 ++++++++---------
  tests/docker/dockerfiles/opensuse-leap.docker |   2 +-
  tests/docker/dockerfiles/ubuntu2004.docker    | 234 ++++++++---------
  tests/lcitool/libvirt-ci                      |   2 +-
  tests/lcitool/refresh                         |  48 ++--
  18 files changed, 1499 insertions(+), 1372 deletions(-)

r~

#3 lore raw

PATCH v3 2/26 tests/docker: update test-mingw to run single build

In reply to Alex Bennée

While the test-build test happily run for mingw the test-mingw case runs more of the packaging inline with what our CI does. It however fails if we don't find both compilers and expects to be run on a docker image with both.

Remove that distinction and make it work more like the other build test scripts.

---
 tests/docker/test-mingw | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
tests/docker/test-mingw +6 -10
index 0bc6d78872..18366972eb 100755
@@ -13,14 +13,12 @@
 
 . common.rc
 
-requires_binary x86_64-w64-mingw32-gcc
-requires_binary i686-w64-mingw32-gcc
+requires_binary x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc
 
 cd "$BUILD_DIR"
 
-for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
-    TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
-        build_qemu --cross-prefix=$prefix \
+TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
+build_qemu \
         --enable-trace-backends=simple \
         --enable-gnutls \
         --enable-nettle \
@@ -29,8 +27,6 @@ for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
         --enable-bzip2 \
         --enable-guest-agent \
         --enable-docs
-    install_qemu
-    make installer
-    make clean
-
-done
+install_qemu
+make installer
+make clean
Signature · 1 line
2.34.1
#4 lore raw

PATCH v3 3/26 tests/docker: Add flex/bison to `debian-all-test`

In reply to Alex Bennée

From: Anton Johansson <[email protected]>

Adds flex/bison to the debian-all-test-cross container which was missed in the previous CI patch. These dependencies are required by the idef-parser patchset for target/hexagon.

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/debian-all-test-cross.docker | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/dockerfiles/debian-all-test-cross.docker +2 -0
index 2beb077fb4..8dc5e1b5de 100644
@@ -20,8 +20,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
 # Add extra build tools and as many cross compilers as we can for testing
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         apt install -y --no-install-recommends \
+        bison \
         ccache \
         clang  \
+        flex \
         git \
         ninja-build \
         gcc-aarch64-linux-gnu \
Signature · 1 line
2.34.1
Reviewed-by on v3 3/26
#5 lore raw

Re: [PATCH v3 03/26] tests/docker: Add flex/bison to `debian-all-test`

Quoted 18 lines · Alex Bennée

From: Anton Johansson <[email protected]>

Adds flex/bison to the debian-all-test-cross container which was missed in the previous CI patch. These dependencies are required by the idef-parser patchset for target/hexagon.

Message-Id: <[email protected]>

---
  tests/docker/dockerfiles/debian-all-test-cross.docker | 2 ++
  1 file changed, 2 insertions(+)
tests/docker/dockerfiles/debian-all-test-cross.docker +0 -0
index 2beb077fb4..8dc5e1b5de 100644

tests/docker/dockerfiles/debian-all-test-cross.docker RUN export DEBIAN_FRONTEND=noninteractive && \ · line 29

Quoted 10 lines
tests/docker/dockerfiles/debian-all-test-cross.docker +2 -0
@@ -20,8 +20,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
  # Add extra build tools and as many cross compilers as we can for testing
  RUN DEBIAN_FRONTEND=noninteractive eatmydata \
          apt install -y --no-install-recommends \
+        bison \
          ccache \
          clang  \
+        flex \
          git \
          ninja-build \
          gcc-aarch64-linux-gnu \
#6 lore raw

PATCH v3 4/26 configure: don't enable cross compilers unless in target_list

In reply to Alex Bennée

This avoids the unfortunate effect of always builds the pc-bios blobs for targets the user isn't interested in.

---
 configure | 9 +++++++++
 1 file changed, 9 insertions(+)
configure +9 -0
index 81561be7c1..dd6f58dcde 100755
@@ -1877,6 +1877,15 @@ probe_target_compiler() {
   container_cross_ranlib=
   container_cross_strip=
 
+  # We shall skip configuring the target compiler if the user didn't
+  # bother enabling an appropriate guest. This avoids building
+  # extraneous firmware images and tests.
+  if test "${target_list#*$1}" != "$1"; then
+      break;
+  else
+      return 1
+  fi
+
   target_arch=${1%%-*}
   case $target_arch in
     aarch64) container_hosts="x86_64 aarch64" ;;
Signature · 1 line
2.34.1
Reviewed-by on v3 4/26
#7 lore raw

Re: [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

Quoted 19 lines · Alex Bennée

This avoids the unfortunate effect of always builds the pc-bios blobs for targets the user isn't interested in.

---
  configure | 9 +++++++++
  1 file changed, 9 insertions(+)
configure +2 -0
index 81561be7c1..dd6f58dcde 100755
@@ -1877,6 +1877,15 @@ probe_target_compiler() {
    container_cross_ranlib=
    container_cross_strip=
 
+  # We shall skip configuring the target compiler if the user didn't
+  # bother enabling an appropriate guest. This avoids building

configure probe_target_compiler() { · line 1891

Quoted 10 lines
configure +7 -0
+  # extraneous firmware images and tests.
+  if test "${target_list#*$1}" != "$1"; then
+      break;
+  else
+      return 1
+  fi
+
    target_arch=${1%%-*}
    case $target_arch in
      aarch64) container_hosts="x86_64 aarch64" ;;

r~

#8 lore raw

Re: [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

Am 21.10.22 um 00:10 schrieb Richard Henderson:

Quoted 10 lines · Alex Bennée
Quoted 9 lines

This avoids the unfortunate effect of always builds the pc-bios blobs for targets the user isn't interested in.

---
  configure | 9 +++++++++

  1 file changed, 9 insertions(+)
Quoted 12 lines
Quoted 5 lines
configure +0 -0
index 81561be7c1..dd6f58dcde 100755
@@ -1877,6 +1877,15 @@ probe_target_compiler() {
Quoted 7 lines

    container_cross_ranlib=
    container_cross_strip=
+  # We shall skip configuring the target compiler if the user didn't +  # bother enabling an appropriate guest. This avoids building +  # extraneous firmware images and tests.
+  if test "${target_list#*$1}" != "$1"; then
+      break;

Isn't break limited for exiting from for, while, or until loop? (*) If yes, it's wrongly used here. sh does not complain, but other shells do.

Stefan

*) https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

#9 lore raw

Re: [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

Quoted 20 lines · Stefan Weil

Am 21.10.22 um 00:10 schrieb Richard Henderson:

Quoted 19 lines · Alex Bennée
Quoted 18 lines

This avoids the unfortunate effect of always builds the pc-bios blobs for targets the user isn't interested in.

---
  configure | 9 +++++++++

  1 file changed, 9 insertions(+)
configure +0 -0
index 81561be7c1..dd6f58dcde 100755
@@ -1877,6 +1877,15 @@ probe_target_compiler() {

    container_cross_ranlib=
    container_cross_strip=
+  # We shall skip configuring the target compiler if the user didn't +  # bother enabling an appropriate guest. This avoids building

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

+  # extraneous firmware images and tests.
+  if test "${target_list#*$1}" != "$1"; then
+      break;

Isn't break limited for exiting from for, while, or until loop? (*) If yes, it's wrongly used here. sh does not complain, but other shells do.

There is already a fix waiting in the PR:

[email protected]

Quoted 4 lines

Stefan

*) https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
#10 lore raw

PATCH v3 5/26 configure: fix the --enable-static --disable-pie case

In reply to Alex Bennée

The previous tweak was incomplete as it missed a leg.

Fixes abafb64b6d (configure: explicitly set cflags for --disable-pie)
---
 configure | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
configure +3 -2
index dd6f58dcde..8c2c4c1a04 100755
@@ -1327,6 +1327,8 @@ static THREAD int tls_var;
 int main(void) { return tls_var; }
 EOF
 
+# Meson currently only handles pie as a boolean for now so if we have
+# explicitly disabled PIE we need to extend our cflags because it wont.
 if test "$static" = "yes"; then
   if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
     CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
@@ -1335,13 +1337,12 @@ if test "$static" = "yes"; then
     error_exit "-static-pie not available due to missing toolchain support"
   else
     pie="no"
+    QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS"
   fi
 elif test "$pie" = "no"; then
   if compile_prog "-Werror -fno-pie" "-no-pie"; then
     CONFIGURE_CFLAGS="-fno-pie $CONFIGURE_CFLAGS"
     CONFIGURE_LDFLAGS="-no-pie $CONFIGURE_LDFLAGS"
-    # Meson currently only handles pie as a boolean for now so if we have
-    # explicitly disabled PIE we need to extend our cflags because it wont.
     QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS"
   fi
 elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
Signature · 1 line
2.34.1
#12 lore raw

PATCH v3 6/26 tests/avocado: extend the timeout for x86_64 tcg tests

In reply to Alex Bennée

These are timeing out on gitlab.

---
 tests/avocado/boot_linux.py | 1 +
 1 file changed, 1 insertion(+)
tests/avocado/boot_linux.py +1 -0
index b7522ad3a1..571d33882a 100644
@@ -19,6 +19,7 @@ class BootLinuxX8664(LinuxTest):
     """
     :avocado: tags=arch:x86_64
     """
+    timeout = 480
 
     def test_pc_i440fx_tcg(self):
         """
Signature · 1 line
2.34.1
Reviewed-by on v3 6/26
#13 lore raw

Re: [PATCH v3 06/26] tests/avocado: extend the timeout for x86_64 tcg tests

Quoted 12 lines · Alex Bennée

These are timeing out on gitlab.

---
  tests/avocado/boot_linux.py | 1 +
  1 file changed, 1 insertion(+)
tests/avocado/boot_linux.py +0 -0
index b7522ad3a1..571d33882a 100644

tests/avocado/boot_linux.py class BootLinuxX8664(LinuxTest): · line 25

Quoted 7 lines
tests/avocado/boot_linux.py +1 -0
@@ -19,6 +19,7 @@ class BootLinuxX8664(LinuxTest):
      """
      :avocado: tags=arch:x86_64
      """
+    timeout = 480
 
      def test_pc_i440fx_tcg(self):
          """
Acked-by on v3 6/26
#14 lore raw

Re: [PATCH v3 06/26] tests/avocado: extend the timeout for x86_64 tcg tests

In reply to Alex Bennée
Quoted 1 line · Alex Bennée

These are timeing out on gitlab.

timing.

Quoted 18 lines
---
  tests/avocado/boot_linux.py | 1 +
  1 file changed, 1 insertion(+)
tests/avocado/boot_linux.py +1 -0
index b7522ad3a1..571d33882a 100644
@@ -19,6 +19,7 @@ class BootLinuxX8664(LinuxTest):
      """
      :avocado: tags=arch:x86_64
      """
+    timeout = 480
 
      def test_pc_i440fx_tcg(self):
          """
#15 lore raw

PATCH v3 7/26 tests/docker: Add flex/bison to `debian-hexagon-cross`

In reply to Alex Bennée

From: Anton Johansson <[email protected]>

debian-hexagon-cross contains two images, one to build the toolchain used for building the Hexagon tests themselves, and one image to build QEMU and run the tests.

This commit adds flex/bison to the final image that builds QEMU so that it can also build idef-parser.

Note: This container is not built by the CI and needs to be rebuilt and updated manually.

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/debian-hexagon-cross.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/debian-hexagon-cross.docker +1 -1
index 8d219bb81d..c4238e893f 100644
@@ -43,7 +43,7 @@ RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.lis
 # Install QEMU build deps for use in CI
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
-    DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy git ninja-build && \
+    DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy bison flex git ninja-build && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt build-dep -yy --arch-only qemu
 COPY --from=0 /usr/local /usr/local
Signature · 1 line
2.34.1
Reviewed-by on v3 7/26
#16 lore raw

Re: [PATCH v3 07/26] tests/docker: Add flex/bison to `debian-hexagon-cross`

Quoted 24 lines · Alex Bennée

From: Anton Johansson <[email protected]>

debian-hexagon-cross contains two images, one to build the toolchain used for building the Hexagon tests themselves, and one image to build QEMU and run the tests.

This commit adds flex/bison to the final image that builds QEMU so that it can also build idef-parser.

Note: This container is not built by the CI and needs to be rebuilt and updated manually.

Message-Id: <[email protected]>

---
  tests/docker/dockerfiles/debian-hexagon-cross.docker | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/debian-hexagon-cross.docker +0 -0
index 8d219bb81d..c4238e893f 100644

tests/docker/dockerfiles/debian-hexagon-cross.docker RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.lis · line 49

Quoted 8 lines
tests/docker/dockerfiles/debian-hexagon-cross.docker +1 -1
@@ -43,7 +43,7 @@ RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.lis
  # Install QEMU build deps for use in CI
  RUN apt update && \
      DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
-    DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy git ninja-build && \
+    DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy bison flex git ninja-build && \
      DEBIAN_FRONTEND=noninteractive eatmydata \
      apt build-dep -yy --arch-only qemu
  COPY --from=0 /usr/local /usr/local
#17 lore raw

PATCH v3 8/26 tests/tcg: use regular semihosting for nios2-softmmu

In reply to Alex Bennée

The nios2 code now plugs into the common semihosting code so we can use the same redirect invocation as the other boards. There is however a bug raised for the fact the tests don't seem to be completing properly and silently passing anyway:

https://gitlab.com/qemu-project/qemu/-/issues/1258

---
 tests/tcg/nios2/Makefile.softmmu-target | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tests/tcg/nios2/Makefile.softmmu-target +1 -2
index c3d0594a39..bc7fd55060 100644
@@ -25,8 +25,7 @@ LDFLAGS += -Wl,-T$(LINK_SCRIPT) -static -nostdlib $(CRT_OBJS) -lgcc
 %: %.o $(LINK_SCRIPT) $(CRT_OBJS)
 	$(call quiet-command, $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS), LD, $@)
 
-# FIXME: nios2 semihosting writes to stdout, not a chardev
-QEMU_OPTS = -M 10m50-ghrd,vic=on -semihosting >[email protected] -kernel
+QEMU_OPTS = -M 10m50-ghrd,vic=on -semihosting-config enable=on,target=native,chardev=output -kernel
 
 memory: CFLAGS+=-DCHECK_UNALIGNED=0
 TESTS += $(MULTIARCH_TESTS)
Signature · 1 line
2.34.1
Reviewed-by on v3 8/26
#18 lore raw

Re: [PATCH v3 08/26] tests/tcg: use regular semihosting for nios2-softmmu

Quoted 11 lines · Alex Bennée

The nios2 code now plugs into the common semihosting code so we can use the same redirect invocation as the other boards. There is however a bug raised for the fact the tests don't seem to be completing properly and silently passing anyway:

   https://gitlab.com/qemu-project/qemu/-/issues/1258
---
  tests/tcg/nios2/Makefile.softmmu-target | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

r~

#19 lore raw

PATCH v3 9/26 semihosting/arm-compat-semi: Avoid using hardcoded /tmp

In reply to Alex Bennée

From: Bin Meng <[email protected]>

Use g_get_tmp_dir() to get the directory to use for temporary files.

Message-Id: <[email protected]>

---
 semihosting/arm-compat-semi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
semihosting/arm-compat-semi.c +2 -1
index bfea9e9337..62d8bae97f 100644
@@ -503,7 +503,8 @@ void do_common_semihosting(CPUState *cs)
         GET_ARG(0);
         GET_ARG(1);
         GET_ARG(2);
-        len = asprintf(&s, "/tmp/qemu-%x%02x", getpid(), (int)arg1 & 0xff);
+        len = asprintf(&s, "%s/qemu-%x%02x", g_get_tmp_dir(),
+                       getpid(), (int)arg1 & 0xff);
         if (len < 0) {
             common_semi_set_ret(cs, -1);
             break;
Signature · 1 line
2.34.1
Reviewed-by on v3 9/26
#20 lore raw

Re: [PATCH v3 09/26] semihosting/arm-compat-semi: Avoid using hardcoded /tmp

Quoted 11 lines · Alex Bennée

From: Bin Meng <[email protected]>

Use g_get_tmp_dir() to get the directory to use for temporary files.

Message-Id: <[email protected]>

---
  semihosting/arm-compat-semi.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by on v3 9/26
#21 lore raw

Re: [PATCH v3 09/26] semihosting/arm-compat-semi: Avoid using hardcoded /tmp

In reply to Alex Bennée
Quoted 11 lines · Alex Bennée

From: Bin Meng<[email protected]>

Use g_get_tmp_dir() to get the directory to use for temporary files.

Message-Id:<[email protected]>

---
  semihosting/arm-compat-semi.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

r~

#22 lore raw

PATCH v3 10/26 tcg: Avoid using hardcoded /tmp

In reply to Alex Bennée

From: Bin Meng <[email protected]>

Use g_get_tmp_dir() to get the directory to use for temporary files.

Message-Id: <[email protected]>

---
 tcg/tcg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tcg/tcg.c +2 -1
index 612a12f58f..84921b64f7 100644
@@ -4729,7 +4729,8 @@ static void tcg_register_jit_int(const void *buf_ptr, size_t buf_size,
     /* Enable this block to be able to debug the ELF image file creation.
        One can use readelf, objdump, or other inspection utilities.  */
     {
-        FILE *f = fopen("/tmp/qemu.jit", "w+b");
+        g_autofree char *jit = g_strdup_printf("%s/qemu.jit", g_get_tmp_dir());
+        FILE *f = fopen(jit, "w+b");
         if (f) {
             if (fwrite(img, img_size, 1, f) != img_size) {
                 /* Avoid stupid unused return value warning for fwrite.  */
Signature · 1 line
2.34.1
Reviewed-by on v3 10/26
#23 lore raw

Re: [PATCH v3 10/26] tcg: Avoid using hardcoded /tmp

Quoted 4 lines · Alex Bennée

From: Bin Meng <[email protected]>

Use g_get_tmp_dir() to get the directory to use for temporary files.

Quoted 8 lines

Message-Id: <[email protected]>

---
  tcg/tcg.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
#24 lore raw

PATCH v3 11/26 util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files

In reply to Alex Bennée

From: Bin Meng <[email protected]>

Replace the existing logic to get the directory for temporary files with g_get_tmp_dir(), which works for win32 too.

Message-Id: <[email protected]>

---
 util/qemu-sockets.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
util/qemu-sockets.c +2 -3
index 83f4bd6fd2..0c41ca9e42 100644
@@ -919,9 +919,8 @@ static int unix_listen_saddr(UnixSocketAddress *saddr,
     if (saddr->path[0] || abstract) {
         path = saddr->path;
     } else {
-        const char *tmpdir = getenv("TMPDIR");
-        tmpdir = tmpdir ? tmpdir : "/tmp";
-        path = pathbuf = g_strdup_printf("%s/qemu-socket-XXXXXX", tmpdir);
+        path = pathbuf = g_strdup_printf("%s/qemu-socket-XXXXXX",
+                                         g_get_tmp_dir());
     }
 
     pathlen = strlen(path);
Signature · 1 line
2.34.1
Reviewed-by on v3 11/26
#25 lore raw

Re: [PATCH v3 11/26] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files

Quoted 18 lines · Alex Bennée

From: Bin Meng <[email protected]>

Replace the existing logic to get the directory for temporary files with g_get_tmp_dir(), which works for win32 too.

Message-Id: <[email protected]>

---
  util/qemu-sockets.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
util/qemu-sockets.c +0 -0
index 83f4bd6fd2..0c41ca9e42 100644

util/qemu-sockets.c static int unix_listen_saddr(UnixSocketAddress *saddr, · line 923

Quoted 8 lines
util/qemu-sockets.c +2 -3
@@ -919,9 +919,8 @@ static int unix_listen_saddr(UnixSocketAddress *saddr,
      if (saddr->path[0] || abstract) {
          path = saddr->path;
      } else {
-        const char *tmpdir = getenv("TMPDIR");
-        tmpdir = tmpdir ? tmpdir : "/tmp";
-        path = pathbuf = g_strdup_printf("%s/qemu-socket-XXXXXX", tmpdir);
+        path = pathbuf = g_strdup_printf("%s/qemu-socket-XXXXXX",
+                                         g_get_tmp_dir());

IIUC this code is not reachable on win32; anyhow using g_get_tmp_dir() is a good cleanup for the codebase.

#26 lore raw

PATCH v3 12/26 block/vvfat: Unify the mkdir() call

In reply to Alex Bennée

From: Bin Meng <[email protected]>

There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs.

glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs.

Message-Id: <[email protected]>

---
 block/vvfat.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
block/vvfat.c +3 -6
index d6dd919683..723beef025 100644
@@ -25,6 +25,7 @@
 
 #include "qemu/osdep.h"
 #include <dirent.h>
+#include <glib/gstdio.h>
 #include "qapi/error.h"
 #include "block/block_int.h"
 #include "block/qdict.h"
@@ -2726,13 +2727,9 @@ static int handle_renames_and_mkdirs(BDRVVVFATState* s)
             mapping_t* mapping;
             int j, parent_path_len;
 
-#ifdef __MINGW32__
-            if (mkdir(commit->path))
+            if (g_mkdir(commit->path, 0755)) {
                 return -5;
-#else
-            if (mkdir(commit->path, 0755))
-                return -5;
-#endif
+            }
 
             mapping = insert_mapping(s, commit->param.mkdir.cluster,
                     commit->param.mkdir.cluster + 1);
Signature · 1 line
2.34.1
Reviewed-by on v3 12/26
#27 lore raw

Re: [PATCH v3 12/26] block/vvfat: Unify the mkdir() call

Quoted 8 lines · Alex Bennée

From: Bin Meng <[email protected]>

There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs.

glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs.

Quoted 7 lines

Message-Id: <[email protected]>

---
  block/vvfat.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)
Reviewed-by on v3 12/26
#28 lore raw

Re: [PATCH v3 12/26] block/vvfat: Unify the mkdir() call

In reply to Alex Bennée

Am 20.10.2022 um 13:51 hat Alex Bennée geschrieben:

Quoted 5 lines

From: Bin Meng <[email protected]>

There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs.

Quoted 7 lines

glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs.

Message-Id: <[email protected]>

#29 lore raw

PATCH v3 13/26 fsdev/virtfs-proxy-helper: Use g_mkdir()

In reply to Alex Bennée

From: Bin Meng <[email protected]>

Use g_mkdir() to create a directory on all platforms.

Message-Id: <[email protected]>

---
 fsdev/virtfs-proxy-helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fsdev/virtfs-proxy-helper.c +2 -1
index 2dde27922f..5cafcd7703 100644
@@ -10,6 +10,7 @@
  */
 
 #include "qemu/osdep.h"
+#include <glib/gstdio.h>
 #include <sys/resource.h>
 #include <getopt.h>
 #include <syslog.h>
@@ -639,7 +640,7 @@ static int do_create_others(int type, struct iovec *iovec)
         if (retval < 0) {
             goto err_out;
         }
-        retval = mkdir(path.data, mode);
+        retval = g_mkdir(path.data, mode);
         break;
     case T_SYMLINK:
         retval = proxy_unmarshal(iovec, offset, "ss", &oldpath, &path);
Signature · 1 line
2.34.1
Reviewed-by on v3 13/26
#30 lore raw

Re: [PATCH v3 13/26] fsdev/virtfs-proxy-helper: Use g_mkdir()

Quoted 11 lines · Alex Bennée

From: Bin Meng <[email protected]>

Use g_mkdir() to create a directory on all platforms.

Message-Id: <[email protected]>

---
  fsdev/virtfs-proxy-helper.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
#31 lore raw

Re: [PATCH v3 13/26] fsdev/virtfs-proxy-helper: Use g_mkdir()

In reply to Alex Bennée
Quoted 9 lines · CEST Alex Bennée

From: Bin Meng <[email protected]>

Use g_mkdir() to create a directory on all platforms.

Message-Id: <[email protected]>
---

Alex, this patch is already merged on master as f723f626627fda681327075105701695d7c630e5 by yesterday's 9p PR.

Best regards,
Christian Schoenebeck

#32 lore raw

PATCH v3 14/26 hw/usb: dev-mtp: Use g_mkdir()

In reply to Alex Bennée

From: Bin Meng <[email protected]>

Use g_mkdir() to create a directory on all platforms.

Message-Id: <[email protected]>

---
 hw/usb/dev-mtp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/usb/dev-mtp.c +2 -2
index 5831395cef..1cac1cd435 100644
@@ -14,7 +14,7 @@
 #include "qemu/error-report.h"
 #include <wchar.h>
 #include <dirent.h>
-
+#include <glib/gstdio.h>
 #include <sys/statvfs.h>
 
 
@@ -1622,7 +1622,7 @@ static void usb_mtp_write_data(MTPState *s, uint32_t handle)
         if (s->dataset.filename) {
             path = g_strdup_printf("%s/%s", parent->path, s->dataset.filename);
             if (s->dataset.format == FMT_ASSOCIATION) {
-                ret = mkdir(path, mask);
+                ret = g_mkdir(path, mask);
                 if (!ret) {
                     usb_mtp_queue_result(s, RES_OK, d->trans, 3,
                                          QEMU_STORAGE_ID,
Signature · 1 line
2.34.1
Reviewed-by on v3 14/26
#33 lore raw

Re: [PATCH v3 14/26] hw/usb: dev-mtp: Use g_mkdir()

Quoted 11 lines · Alex Bennée

From: Bin Meng <[email protected]>

Use g_mkdir() to create a directory on all platforms.

Message-Id: <[email protected]>

---
  hw/usb/dev-mtp.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
#34 lore raw

PATCH v3 15/26 MAINTAINERS: add entries for the key build bits

In reply to Alex Bennée

Changes to the build files are a bit special in that they usually go through other maintainer trees. However considering the build system is the root of everything a developer is likely to do we should at least set it out in MAINTAINERS.

I'm going to nominate Paolo for meson stuff given the conversion was his passion project. I'm happy to cast an eye over configure stuff considering a lot of the cross compile logic is in there anyway.

---
v2
- s/Odd Fixes/Maintained/
- nominate more reviewers

---
 MAINTAINERS | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
MAINTAINERS +24 -0
index e3d5b7e09c..6a6f4d62bd 100644
@@ -3764,6 +3764,30 @@ F: docs/about/deprecated.rst
 
 Build System
 ------------
+Meson
+M: Paolo Bonzini <[email protected]>
+R: Marc-André Lureau <[email protected]>
+R: Daniel P. Berrange <[email protected]>
+R: Thomas Huth <[email protected]>
+R: Philippe Mathieu-Daudé <[email protected]>
+S: Maintained
+F: meson.build
+F: meson_options.txt
+F: scripts/meson-buildoptions.*
+F: scripts/check_sparse.py
+F: scripts/entitlement.sh
+F: scripts/symlink-install-tree.py
+F: scripts/nsis.py
+
+TL Makefile and configure
+M: Paolo Bonzini <[email protected]>
+R: Alex Bennée <[email protected]>
+S: Maintained
+F: Makefile
+F: configure
+F: scripts/mtest2make.py
+F: tests/Makefile.include
+
 GIT submodules
 M: Daniel P. Berrange <[email protected]>
 S: Odd Fixes
Signature · 1 line
2.34.1
Reviewed-by on v3 15/26
#35 lore raw

Re: [PATCH v3 15/26] MAINTAINERS: add entries for the key build bits

Quoted 25 lines · Alex Bennée

Changes to the build files are a bit special in that they usually go through other maintainer trees. However considering the build system is the root of everything a developer is likely to do we should at least set it out in MAINTAINERS.

I'm going to nominate Paolo for meson stuff given the conversion was his passion project. I'm happy to cast an eye over configure stuff considering a lot of the cross compile logic is in there anyway.

---
v2
- s/Odd Fixes/Maintained/
- nominate more reviewers

---
  MAINTAINERS | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
MAINTAINERS +0 -0
index e3d5b7e09c..6a6f4d62bd 100644

MAINTAINERS F: docs/about/deprecated.rst · line 3772

Quoted 9 lines
MAINTAINERS +6 -0
@@ -3764,6 +3764,30 @@ F: docs/about/deprecated.rst
 
  Build System
  ------------
+Meson
+M: Paolo Bonzini <[email protected]>
+R: Marc-André Lureau <[email protected]>
+R: Daniel P. Berrange <[email protected]>
+R: Thomas Huth <[email protected]>
+R: Philippe Mathieu-Daudé <[email protected]>
Quoted 8 lines
MAINTAINERS +8 -0
+S: Maintained
+F: meson.build
+F: meson_options.txt
+F: scripts/meson-buildoptions.*
+F: scripts/check_sparse.py
+F: scripts/entitlement.sh
+F: scripts/symlink-install-tree.py
+F: scripts/nsis.py
Acked-by on v3 15/26
#36 lore raw

Re: [PATCH v3 15/26] MAINTAINERS: add entries for the key build bits

In reply to Alex Bennée
Quoted 30 lines · Alex Bennée

Changes to the build files are a bit special in that they usually go through other maintainer trees. However considering the build system is the root of everything a developer is likely to do we should at least set it out in MAINTAINERS.

I'm going to nominate Paolo for meson stuff given the conversion was his passion project. I'm happy to cast an eye over configure stuff considering a lot of the cross compile logic is in there anyway.

---
v2
- s/Odd Fixes/Maintained/
- nominate more reviewers

---
  MAINTAINERS | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
MAINTAINERS +2 -0
index e3d5b7e09c..6a6f4d62bd 100644
@@ -3764,6 +3764,30 @@ F: docs/about/deprecated.rst
 
  Build System
  ------------
+Meson
+M: Paolo Bonzini <[email protected]>

MAINTAINERS F: docs/about/deprecated.rst · line 3778

Quoted 10 lines
MAINTAINERS +10 -0
+R: Marc-André Lureau <[email protected]>
+R: Daniel P. Berrange <[email protected]>
+R: Thomas Huth <[email protected]>
+R: Philippe Mathieu-Daudé <[email protected]>
+S: Maintained
+F: meson.build
+F: meson_options.txt
+F: scripts/meson-buildoptions.*
+F: scripts/check_sparse.py
+F: scripts/entitlement.sh

Shouldn't entitlement.sh rather be part of the Darwin/macOS section?

MAINTAINERS F: docs/about/deprecated.rst · line 3780

Quoted 2 lines
MAINTAINERS +2 -0
+F: scripts/symlink-install-tree.py
+F: scripts/nsis.py

Shouldn't nsis.py rather be part of the W32/W64 section?

MAINTAINERS F: docs/about/deprecated.rst · line 3782

Quoted 2 lines
MAINTAINERS +2 -0
+
+TL Makefile and configure

TL = Top Level? ... I'd maybe rather would not abbreviate it...

MAINTAINERS F: docs/about/deprecated.rst · line 3789

Quoted 7 lines
MAINTAINERS +7 -0
+M: Paolo Bonzini <[email protected]>
+R: Alex Bennée <[email protected]>
+S: Maintained
+F: Makefile
+F: configure
+F: scripts/mtest2make.py
+F: tests/Makefile.include

Feel free to add a R: line for me here, too.

Anyway,

#37 lore raw

PATCH v3 16/26 MAINTAINERS: add features_to_c.sh to gdbstub files

In reply to Alex Bennée
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 6a6f4d62bd..0f4c50e8eb 100644
@@ -2693,6 +2693,7 @@ F: gdbstub/*
 F: include/exec/gdbstub.h
 F: gdb-xml/
 F: tests/tcg/multiarch/gdbstub/
+F: scripts/feature_to_c.sh
 
 Memory API
 M: Paolo Bonzini <[email protected]>
Signature · 1 line
2.34.1
Reviewed-by on v3 16/26
#38 lore raw

Re: [PATCH v3 16/26] MAINTAINERS: add features_to_c.sh to gdbstub files

Quoted 10 lines · Alex Bennée
---
  MAINTAINERS | 1 +
  1 file changed, 1 insertion(+)
MAINTAINERS +0 -0
index 6a6f4d62bd..0f4c50e8eb 100644

MAINTAINERS F: gdbstub/* · line 2699

Quoted 7 lines
MAINTAINERS +1 -0
@@ -2693,6 +2693,7 @@ F: gdbstub/*
  F: include/exec/gdbstub.h
  F: gdb-xml/
  F: tests/tcg/multiarch/gdbstub/
+F: scripts/feature_to_c.sh
 
  Memory API
  M: Paolo Bonzini <[email protected]>

r~

#40 lore raw

PATCH v3 17/26 MAINTAINERS: fix-up for check-tcg Makefile changes

In reply to Alex Bennée
---
 MAINTAINERS | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -2
index 0f4c50e8eb..1b41daba88 100644
@@ -3727,8 +3727,7 @@ Guest Test Compilation Support
 M: Alex Bennée <[email protected]>
 R: Philippe Mathieu-Daudé <[email protected]>
 S: Maintained
-F: tests/tcg/Makefile
-F: tests/tcg/Makefile.include
+F: tests/tcg/Makefile.target
 
 Integration Testing with the Avocado framework
 W: https://trello.com/b/6Qi1pxVn/avocado-qemu
Signature · 1 line
2.34.1
Reviewed-by on v3 17/26
#41 lore raw

Re: [PATCH v3 17/26] MAINTAINERS: fix-up for check-tcg Makefile changes

Quoted 10 lines · Alex Bennée
---
  MAINTAINERS | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +0 -0
index 0f4c50e8eb..1b41daba88 100644

MAINTAINERS Guest Test Compilation Support · line 3730

Quoted 6 lines
MAINTAINERS +1 -2
@@ -3727,8 +3727,7 @@ Guest Test Compilation Support
  M: Alex Bennée <[email protected]>
  R: Philippe Mathieu-Daudé <[email protected]>
  S: Maintained
-F: tests/tcg/Makefile
-F: tests/tcg/Makefile.include
+F: tests/tcg/Makefile.target
Fixes fc76c56d3f ("tests/tcg: cleanup Makefile inclusions")
Reviewed-by on v3 17/26
#42 lore raw

Re: [PATCH v3 17/26] MAINTAINERS: fix-up for check-tcg Makefile changes

In reply to Alex Bennée
Quoted 10 lines · Alex Bennée
---
  MAINTAINERS | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +0 -0
index 0f4c50e8eb..1b41daba88 100644

MAINTAINERS Guest Test Compilation Support · line 3733

Quoted 9 lines
MAINTAINERS +1 -2
@@ -3727,8 +3727,7 @@ Guest Test Compilation Support
  M: Alex Bennée <[email protected]>
  R: Philippe Mathieu-Daudé <[email protected]>
  S: Maintained
-F: tests/tcg/Makefile
-F: tests/tcg/Makefile.include
+F: tests/tcg/Makefile.target
 
  Integration Testing with the Avocado framework
  W: https://trello.com/b/6Qi1pxVn/avocado-qemu

r~

#43 lore raw

PATCH v3 18/26 tests/avocado: set -machine none for userfwd and vnc tests

In reply to Alex Bennée

These are exercising core QEMU features and don't actually run code. Not specifying a machine will fail when avocado chooses the native arch binary to run. Be explicit.

---
 tests/avocado/info_usernet.py | 3 +++
 tests/avocado/vnc.py          | 1 +
 2 files changed, 4 insertions(+)
tests/avocado/info_usernet.py +3 -0
index b862a47dba..fdc4d90c42 100644
@@ -14,6 +14,9 @@
 
 
 class InfoUsernet(QemuSystemTest):
+    """
+    :avocado: tags=machine:none
+    """
 
     def test_hostfwd(self):
         self.require_netdev('user')
tests/avocado/vnc.py +1 -0
index 187fd3febc..aeeefc70be 100644
@@ -53,6 +53,7 @@ def find_free_ports(count: int) -> List[int]:
 class Vnc(QemuSystemTest):
     """
     :avocado: tags=vnc,quick
+    :avocado: tags=machine:none
     """
     def test_no_vnc(self):
         self.vm.add_args('-nodefaults', '-S')
Signature · 1 line
2.34.1
Reviewed-by on v3 18/26
#44 lore raw

Re: [PATCH v3 18/26] tests/avocado: set -machine none for userfwd and vnc tests

Quoted 9 lines · Alex Bennée

These are exercising core QEMU features and don't actually run code. Not specifying a machine will fail when avocado chooses the native arch binary to run. Be explicit.

---
  tests/avocado/info_usernet.py | 3 +++
  tests/avocado/vnc.py          | 1 +
  2 files changed, 4 insertions(+)
#45 lore raw

PATCH v3 19/26 tests/avocado: raspi2_initrd: Wait for guest shutdown message before stopping

In reply to Alex Bennée

From: Peter Maydell <[email protected]>

The avocado test
tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd
finishes wiith

exec_command(self, 'halt')
# Wait for VM to shut down gracefully
self.vm.wait()

In theory this should be fine. In practice it runs into two bugs:

* when the test calls self.vm.wait() Avocado closes the socket connection to the guest serial console immediately, so the avocado logs don't have the last part of the guest output:
https://gitlab.com/qemu-project/qemu/-/issues/1265
* when the socket is closed, a bug in the QEMU socket chardev means that it loses any data that the guest UART has not yet consumed. This means that the guest doesn't always read the full 'halt' command string, so the test intermittently fails with a timeout:
https://gitlab.com/qemu-project/qemu/-/issues/1264

Work around both of these by waiting for the guest to print the string that means it has completed the shutdown process. This fixes a very long standing intermittent failure in this test.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/636

Message-Id: <[email protected]>

---
 tests/avocado/boot_linux_console.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/avocado/boot_linux_console.py +1 -1
index ca9d09b0d7..eed4b49e6e 100644
@@ -489,7 +489,7 @@ def test_arm_raspi2_initrd(self):
                                                 'BCM2835')
         exec_command_and_wait_for_pattern(self, 'cat /proc/iomem',
                                                 '/soc/cprman@7e101000')
-        exec_command(self, 'halt')
+        exec_command_and_wait_for_pattern(self, 'halt', 'reboot: System halted')
         # Wait for VM to shut down gracefully
         self.vm.wait()
 
Signature · 1 line
2.34.1
Reviewed-by Reviewed-by Richard Henderson on v3 19/26
#46 lore raw

Re: [PATCH v3 19/26] tests/avocado: raspi2_initrd: Wait for guest shutdown message before stopping

Quoted 5 lines · Alex Bennée

From: Peter Maydell <[email protected]>

The avocado test
tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd
finishes wiith

Typo "with".

Quoted 22 lines

exec_command(self, 'halt')
# Wait for VM to shut down gracefully
self.vm.wait()

In theory this should be fine. In practice it runs into two bugs:

* when the test calls self.vm.wait() Avocado closes the socket connection to the guest serial console immediately, so the avocado logs don't have the last part of the guest output:
https://gitlab.com/qemu-project/qemu/-/issues/1265
* when the socket is closed, a bug in the QEMU socket chardev means that it loses any data that the guest UART has not yet consumed. This means that the guest doesn't always read the full 'halt' command string, so the test intermittently fails with a timeout:
https://gitlab.com/qemu-project/qemu/-/issues/1264

Work around both of these by waiting for the guest to print the string that means it has completed the shutdown process. This fixes a very long standing intermittent failure in this test.

Quoted 7 lines

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/636

Message-Id: <[email protected]>

---
  tests/avocado/boot_linux_console.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by on v3 19/26
#47 lore raw

Re: [PATCH v3 19/26] tests/avocado: raspi2_initrd: Wait for guest shutdown message before stopping

In reply to Alex Bennée
Quoted 23 lines · Alex Bennée

From: Peter Maydell <[email protected]>

The avocado test
tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd
finishes wiith

exec_command(self, 'halt')
# Wait for VM to shut down gracefully
self.vm.wait()

In theory this should be fine. In practice it runs into two bugs:

* when the test calls self.vm.wait() Avocado closes the socket connection to the guest serial console immediately, so the avocado logs don't have the last part of the guest output:
https://gitlab.com/qemu-project/qemu/-/issues/1265
* when the socket is closed, a bug in the QEMU socket chardev means that it loses any data that the guest UART has not yet consumed. This means that the guest doesn't always read the full 'halt' command string, so the test intermittently fails with a timeout:
https://gitlab.com/qemu-project/qemu/-/issues/1264

Quoted 8 lines

Work around both of these by waiting for the guest to print the string that means it has completed the shutdown process. This fixes a very long standing intermittent failure in this test.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/636

Message-Id: <[email protected]>

#48 lore raw

PATCH v3 20/26 tests/avocado: disable sh4 rd2 tests on Gitlab

In reply to Alex Bennée

Running repeated invocations on a number of test boxes show a fairly high error rate:

  $ retry.py -n 100 -c -- ./tests/venv/bin/avocado run tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d
  retry.py called with ['./tests/venv/bin/avocado', 'run', 'tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d']
  Results:
  Run, Ret, Pass/Fail, Time, Total Pass, Total Run
  ...
  Results summary:
  0: 94 times (94.00%), avg time 2.254 (0.00 varience/0.04 deviation)
  1: 3 times (3.00%), avg time 1.837 (0.02 varience/0.14 deviation)
  8: 3 times (3.00%), avg time 91.288 (0.02 varience/0.15 deviation)

Examining the logs they fall into various categories of un-handled unaligned access by user space and unexpected FPU usage by the kernel which ultimately lead to the failure to reach the login prompt. This could be bugs in the translator that only get hit occasionally or just a flaky kernel - its hard to tell. To avoid these failures gating CI lets skip on GitLab.

Cc Thomas Huth <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Magnus Damm <[email protected]>
---
 tests/avocado/boot_linux_console.py | 4 ++++
 1 file changed, 4 insertions(+)
tests/avocado/boot_linux_console.py +4 -0
index eed4b49e6e..26eaf1a119 100644
@@ -1175,6 +1175,10 @@ def test_ppc_mac99(self):
         self.vm.add_args('-M', 'graphics=off')
         self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
 
+    # This test has a 6-10% failure rate on various hosts that look
+    # like issues with a buggy kernel. As a result we don't want it
+    # gating releases on Gitlab.
+    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
     def test_sh4_r2d(self):
         """
         :avocado: tags=arch:sh4
Signature · 1 line
2.34.1
#49 lore raw

Re: [PATCH v3 20/26] tests/avocado: disable sh4 rd2 tests on Gitlab

Quoted 13 lines · Alex Bennée

Running repeated invocations on a number of test boxes show a fairly high error rate:

  $ retry.py -n 100 -c -- ./tests/venv/bin/avocado run tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d
  retry.py called with ['./tests/venv/bin/avocado', 'run', 'tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d']
  Results:
  Run, Ret, Pass/Fail, Time, Total Pass, Total Run
  ...
  Results summary:
  0: 94 times (94.00%), avg time 2.254 (0.00 varience/0.04 deviation)
  1: 3 times (3.00%), avg time 1.837 (0.02 varience/0.14 deviation)
  8: 3 times (3.00%), avg time 91.288 (0.02 varience/0.15 deviation)
Quoted 6 lines

Examining the logs they fall into various categories of un-handled unaligned access by user space and unexpected FPU usage by the kernel which ultimately lead to the failure to reach the login prompt. This could be bugs in the translator that only get hit occasionally or just a flaky kernel - its hard to tell. To avoid these failures gating CI lets skip on GitLab.

I've managed to bisect this regression to ab419fd8a0 (target/sh4: Fix TB_FLAG_UNALIGN).

Quoted 24 lines
Cc Thomas Huth <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Magnus Damm <[email protected]>
---
 tests/avocado/boot_linux_console.py | 4 ++++
 1 file changed, 4 insertions(+)
tests/avocado/boot_linux_console.py +4 -0
index eed4b49e6e..26eaf1a119 100644
@@ -1175,6 +1175,10 @@ def test_ppc_mac99(self):
         self.vm.add_args('-M', 'graphics=off')
         self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
 
+    # This test has a 6-10% failure rate on various hosts that look
+    # like issues with a buggy kernel. As a result we don't want it
+    # gating releases on Gitlab.
+    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
     def test_sh4_r2d(self):
         """
         :avocado: tags=arch:sh4
Signature · 1 line
Alex Bennée
Reviewed-by on v3 20/26
#50 lore raw

Re: [PATCH v3 20/26] tests/avocado: disable sh4 rd2 tests on Gitlab

In reply to Alex Bennée
Quoted 20 lines · Alex Bennée

Running repeated invocations on a number of test boxes show a fairly high error rate:

   $ retry.py -n 100 -c -- ./tests/venv/bin/avocado run tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d
   retry.py called with ['./tests/venv/bin/avocado', 'run', 'tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d']
   Results:
   Run, Ret, Pass/Fail, Time, Total Pass, Total Run
   ...
   Results summary:
   0: 94 times (94.00%), avg time 2.254 (0.00 varience/0.04 deviation)
   1: 3 times (3.00%), avg time 1.837 (0.02 varience/0.14 deviation)
   8: 3 times (3.00%), avg time 91.288 (0.02 varience/0.15 deviation)

Examining the logs they fall into various categories of un-handled unaligned access by user space and unexpected FPU usage by the kernel which ultimately lead to the failure to reach the login prompt. This could be bugs in the translator that only get hit occasionally or just a flaky kernel - its hard to tell. To avoid these failures gating CI lets skip on GitLab.

Quoted 7 lines
Cc Thomas Huth <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Magnus Damm <[email protected]>
---
  tests/avocado/boot_linux_console.py | 4 ++++
  1 file changed, 4 insertions(+)
#51 lore raw

Re: [PATCH v3 20/26] tests/avocado: disable sh4 rd2 tests on Gitlab

In reply to Alex Bennée
Quoted 33 lines · Alex Bennée

Running repeated invocations on a number of test boxes show a fairly high error rate:

  $ retry.py -n 100 -c -- ./tests/venv/bin/avocado run tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d
  retry.py called with ['./tests/venv/bin/avocado', 'run', 'tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d']
  Results:
  Run, Ret, Pass/Fail, Time, Total Pass, Total Run
  ...
  Results summary:
  0: 94 times (94.00%), avg time 2.254 (0.00 varience/0.04 deviation)
  1: 3 times (3.00%), avg time 1.837 (0.02 varience/0.14 deviation)
  8: 3 times (3.00%), avg time 91.288 (0.02 varience/0.15 deviation)

Examining the logs they fall into various categories of un-handled unaligned access by user space and unexpected FPU usage by the kernel which ultimately lead to the failure to reach the login prompt. This could be bugs in the translator that only get hit occasionally or just a flaky kernel - its hard to tell. To avoid these failures gating CI lets skip on GitLab.

Cc Thomas Huth <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Magnus Damm <[email protected]>
---
 tests/avocado/boot_linux_console.py | 4 ++++
 1 file changed, 4 insertions(+)
tests/avocado/boot_linux_console.py +0 -0
index eed4b49e6e..26eaf1a119 100644

tests/avocado/boot_linux_console.py def test_ppc_mac99(self): · line 1181

Quoted 7 lines
tests/avocado/boot_linux_console.py +4 -0
@@ -1175,6 +1175,10 @@ def test_ppc_mac99(self):
         self.vm.add_args('-M', 'graphics=off')
         self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
 
+    # This test has a 6-10% failure rate on various hosts that look
+    # like issues with a buggy kernel. As a result we don't want it
+    # gating releases on Gitlab.
+    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')

I also forgot to add the import:

from avocado import skipIf

Quoted 3 lines
tests/avocado/boot_linux_console.py +0 -0
     def test_sh4_r2d(self):
         """
         :avocado: tags=arch:sh4
Signature · 1 line
Alex Bennée
#52 lore raw

PATCH v3 21/26 tests/tcg: re-enable linux-test for sh4

In reply to Alex Bennée

This test was marked as broken due to bug #704 which was fixed by aee14c77f4 (linux-user: Rewrite do_getdents, do_getdents64). Local testing shows this is solid now so lets re-enable the test.

Cc Yoshinori Sato <[email protected]>
---
 tests/tcg/sh4/Makefile.target | 6 ------
 1 file changed, 6 deletions(-)
tests/tcg/sh4/Makefile.target +0 -6
index 35ebe6b4e3..32b019bdf1 100644
@@ -13,12 +13,6 @@ run-signals: signals
 run-plugin-signals-with-%:
 	$(call skip-test, $<, "BROKEN")
 
-# This test is currently broken: https://gitlab.com/qemu-project/qemu/-/issues/704
-run-linux-test: linux-test
-	$(call skip-test, $<, "BROKEN")
-run-plugin-linux-test-with-%:
-	$(call skip-test, $<, "BROKEN")
-
 # This test is currently unreliable: https://gitlab.com/qemu-project/qemu/-/issues/856
 run-threadcount:
 	$(call skip-test, $<, "BROKEN")
Signature · 1 line
2.34.1
Reviewed-by on v3 21/26
#53 lore raw

Re: [PATCH v3 21/26] tests/tcg: re-enable linux-test for sh4

Quoted 9 lines · Alex Bennée

This test was marked as broken due to bug #704 which was fixed by aee14c77f4 (linux-user: Rewrite do_getdents, do_getdents64). Local testing shows this is solid now so lets re-enable the test.

Cc Yoshinori Sato <[email protected]>
---
  tests/tcg/sh4/Makefile.target | 6 ------
  1 file changed, 6 deletions(-)
#54 lore raw

PATCH v3 22/26 tests/tcg: re-enable threadcount for sh4

In reply to Alex Bennée

This test was marked as broken due to bug #856 which was fixed by ab419fd8a0 (target/sh4: Fix TB_FLAG_UNALIGN). Local testing shows this is solid now so lets re-enable the test.

Cc Yoshinori Sato <[email protected]>
---
 tests/tcg/sh4/Makefile.target | 6 ------
 1 file changed, 6 deletions(-)
tests/tcg/sh4/Makefile.target +0 -6
index 32b019bdf1..47c39a44b6 100644
@@ -12,9 +12,3 @@ run-signals: signals
 	$(call skip-test, $<, "BROKEN")
 run-plugin-signals-with-%:
 	$(call skip-test, $<, "BROKEN")
-
-# This test is currently unreliable: https://gitlab.com/qemu-project/qemu/-/issues/856
-run-threadcount:
-	$(call skip-test, $<, "BROKEN")
-run-plugin-threadcount-with-%:
-	$(call skip-test, $<, "BROKEN")
Signature · 1 line
2.34.1
Reviewed-by on v3 22/26
#55 lore raw

Re: [PATCH v3 22/26] tests/tcg: re-enable threadcount for sh4

Quoted 9 lines · Alex Bennée

This test was marked as broken due to bug #856 which was fixed by ab419fd8a0 (target/sh4: Fix TB_FLAG_UNALIGN). Local testing shows this is solid now so lets re-enable the test.

Cc Yoshinori Sato <[email protected]>
---
  tests/tcg/sh4/Makefile.target | 6 ------
  1 file changed, 6 deletions(-)
#56 lore raw

PATCH v3 23/26 target/s390x: don't use ld_code2 to probe next pc

In reply to Alex Bennée

This isn't an translator picking up an instruction so we shouldn't use the translator_lduw function which has side effects for plugins.

---
 target/s390x/tcg/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/tcg/translate.c +1 -1
index 1d2dddab1c..f4de8efe3a 100644
@@ -6612,7 +6612,7 @@ static void s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs)
 static target_ulong get_next_pc(CPUS390XState *env, DisasContext *s,
                                 uint64_t pc)
 {
-    uint64_t insn = ld_code2(env, s, pc);
+    uint64_t insn = cpu_lduw_code(env, pc);
 
     return pc + get_ilen((insn >> 8) & 0xff);
 }
Signature · 1 line
2.34.1
Reviewed-by on v3 23/26
#57 lore raw

Re: [PATCH v3 23/26] target/s390x: don't use ld_code2 to probe next pc

Quoted 7 lines · Alex Bennée

This isn't an translator picking up an instruction so we shouldn't use the translator_lduw function which has side effects for plugins.

---
  target/s390x/tcg/translate.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

Reviewed-by on v3 23/26
#58 lore raw

Re: [PATCH v3 23/26] target/s390x: don't use ld_code2 to probe next pc

In reply to Alex Bennée
Quoted 13 lines · Alex Bennée

This isn't an translator picking up an instruction so we shouldn't use the translator_lduw function which has side effects for plugins.

---
  target/s390x/tcg/translate.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/tcg/translate.c +0 -0
index 1d2dddab1c..f4de8efe3a 100644

target/s390x/tcg/translate.c static void s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs) · line 6618

Quoted 8 lines
target/s390x/tcg/translate.c +1 -1
@@ -6612,7 +6612,7 @@ static void s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs)
  static target_ulong get_next_pc(CPUS390XState *env, DisasContext *s,
                                  uint64_t pc)
  {
-    uint64_t insn = ld_code2(env, s, pc);
+    uint64_t insn = cpu_lduw_code(env, pc);
 
      return pc + get_ilen((insn >> 8) & 0xff);
  }
Signature · 3 lines
Thanks,

David / dhildenb
Acked-by on v3 23/26
#59 lore raw

Re: [PATCH v3 23/26] target/s390x: don't use ld_code2 to probe next pc

In reply to Alex Bennée
Quoted 21 lines · Alex Bennée

This isn't an translator picking up an instruction so we shouldn't use
the translator_lduw function which has side effects for plugins.

---
 target/s390x/tcg/translate.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/tcg/translate.c +1 -1
index 1d2dddab1c..f4de8efe3a 100644
@@ -6612,7 +6612,7 @@ static void
 s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs)
  static target_ulong get_next_pc(CPUS390XState *env, DisasContext *s,
                                  uint64_t pc)
  {
-    uint64_t insn = ld_code2(env, s, pc);
+    uint64_t insn = cpu_lduw_code(env, pc);
Quoted 3 lines


     return pc + get_ilen((insn >> 8) & 0xff);
 }

#60 lore raw

PATCH v3 24/26 target/s390x: don't probe next pc for EXecuted insns

In reply to Alex Bennée

We have finished the TB anyway so we can shortcut the other tests by checking dc->ex_value first.

---
 target/s390x/tcg/translate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
target/s390x/tcg/translate.c +3 -3
index f4de8efe3a..95279e5dc3 100644
@@ -6624,9 +6624,9 @@ static void s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
 
     dc->base.is_jmp = translate_one(env, dc);
     if (dc->base.is_jmp == DISAS_NEXT) {
-        if (!is_same_page(dcbase, dc->base.pc_next) ||
-            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next)) ||
-            dc->ex_value) {
+        if (dc->ex_value ||
+            !is_same_page(dcbase, dc->base.pc_next) ||
+            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next))) {
             dc->base.is_jmp = DISAS_TOO_MANY;
         }
     }
Signature · 1 line
2.34.1
Reviewed-by on v3 24/26
#61 lore raw

Re: [PATCH v3 24/26] target/s390x: don't probe next pc for EXecuted insns

Quoted 15 lines · Alex Bennée

We have finished the TB anyway so we can shortcut the other tests by checking dc->ex_value first.

---
  target/s390x/tcg/translate.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
target/s390x/tcg/translate.c +0 -0
index f4de8efe3a..95279e5dc3 100644
@@ -6624,9 +6624,9 @@ static void s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
 
      dc->base.is_jmp = translate_one(env, dc);

target/s390x/tcg/translate.c static void s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) · line 6632

Quoted 10 lines
target/s390x/tcg/translate.c +3 -3
      if (dc->base.is_jmp == DISAS_NEXT) {
-        if (!is_same_page(dcbase, dc->base.pc_next) ||
-            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next)) ||
-            dc->ex_value) {
+        if (dc->ex_value ||
+            !is_same_page(dcbase, dc->base.pc_next) ||
+            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next))) {
              dc->base.is_jmp = DISAS_TOO_MANY;
          }
      }
Signature · 3 lines
Thanks,

David / dhildenb
Acked-by on v3 24/26
#63 lore raw

Re: [PATCH v3 24/26] target/s390x: don't probe next pc for EXecuted insns

In reply to Alex Bennée
Quoted 21 lines · Alex Bennée

We have finished the TB anyway so we can shortcut the other tests by checking dc->ex_value first.

---
 target/s390x/tcg/translate.c | 6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
target/s390x/tcg/translate.c +0 -0
index f4de8efe3a..95279e5dc3 100644
@@ -6624,9 +6624,9 @@ static void
 s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)


     dc->base.is_jmp = translate_one(env, dc);
     if (dc->base.is_jmp == DISAS_NEXT) {
-        if (!is_same_page(dcbase, dc->base.pc_next) || -            !is_same_page(dcbase, get_next_pc(env, dc, dc-

Quoted 1 line

base.pc_next)) ||

Quoted 8 lines

-            dc->ex_value) {
+        if (dc->ex_value ||
+            !is_same_page(dcbase, dc->base.pc_next) || +            !is_same_page(dcbase, get_next_pc(env, dc, dc-

Quoted 1 line

base.pc_next))) {

             dc->base.is_jmp = DISAS_TOO_MANY;
         }
     }

#64 lore raw

PATCH v3 25/26 target/s390x: fake instruction loading when handling 'ex'

In reply to Alex Bennée

The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. This missed the plugin instrumentation.

Work around this with a special helper to inform the rest of the translator about the instruction so things stay consistent.

Cc Richard Henderson <[email protected]>

---
v2
- s/w/b/ for translator_fake_ldb
- add comment to extract_insn
- reword commit message

---
 include/exec/translator.h    | 17 +++++++++++++++++
 target/s390x/tcg/translate.c |  6 ++++++
 2 files changed, 23 insertions(+)
include/exec/translator.h +17 -0
index 3b77f5f4aa..af2ff95cd5 100644
@@ -211,6 +211,23 @@ translator_ldq_swap(CPUArchState *env, DisasContextBase *db,
     return ret;
 }
 
+/**
+ * translator_fake_ldb - fake instruction load
+ * @insn8: byte of instruction
+ * @pc: program counter of instruction
+ *
+ * This is a special case helper used where the instruction we are
+ * about to translate comes from somewhere else (e.g. being
+ * re-synthesised for s390x "ex"). It ensures we update other areas of
+ * the translator with details of the executed instruction.
+ */
+
+static inline void translator_fake_ldb(uint8_t insn8, abi_ptr pc)
+{
+    plugin_insn_append(pc, &insn8, sizeof(insn8));
+}
+
+
 /*
  * Return whether addr is on the same page as where disassembly started.
  * Translators can use this to enforce the rule that only single-insn
target/s390x/tcg/translate.c +6 -0
index 95279e5dc3..8101f5f569 100644
@@ -6317,12 +6317,18 @@ static const DisasInsn *extract_insn(CPUS390XState *env, DisasContext *s)
     if (unlikely(s->ex_value)) {
         /* Drop the EX data now, so that it's clear on exception paths.  */
         TCGv_i64 zero = tcg_const_i64(0);
+        int i;
         tcg_gen_st_i64(zero, cpu_env, offsetof(CPUS390XState, ex_value));
         tcg_temp_free_i64(zero);
 
         /* Extract the values saved by EXECUTE.  */
         insn = s->ex_value & 0xffffffffffff0000ull;
         ilen = s->ex_value & 0xf;
+        /* register insn bytes with translator so plugins work */
+        for (i = 0; i < ilen; i++) {
+            uint8_t byte = extract64(insn, 56 - (i * 8), 8);
+            translator_fake_ldb(byte, pc + i);
+        }
         op = insn >> 56;
     } else {
         insn = ld_code2(env, s, pc);
Signature · 1 line
2.34.1
Reviewed-by on v3 25/26
#65 lore raw

Re: [PATCH v3 25/26] target/s390x: fake instruction loading when handling 'ex'

Quoted 35 lines · Alex Bennée

The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. This missed the plugin instrumentation.

Work around this with a special helper to inform the rest of the translator about the instruction so things stay consistent.

Cc Richard Henderson <[email protected]>

---
v2
- s/w/b/ for translator_fake_ldb
- add comment to extract_insn
- reword commit message

---
  include/exec/translator.h    | 17 +++++++++++++++++
  target/s390x/tcg/translate.c |  6 ++++++
  2 files changed, 23 insertions(+)
include/exec/translator.h +7 -0
index 3b77f5f4aa..af2ff95cd5 100644
@@ -211,6 +211,23 @@ translator_ldq_swap(CPUArchState *env, DisasContextBase *db,
      return ret;
  }
 
+/**
+ * translator_fake_ldb - fake instruction load
+ * @insn8: byte of instruction
+ * @pc: program counter of instruction
+ *
+ * This is a special case helper used where the instruction we are
+ * about to translate comes from somewhere else (e.g. being

include/exec/translator.h translator_ldq_swap(CPUArchState *env, DisasContextBase *db, · line 230

Quoted 10 lines
include/exec/translator.h +10 -0
+ * re-synthesised for s390x "ex"). It ensures we update other areas of
+ * the translator with details of the executed instruction.
+ */
+
+static inline void translator_fake_ldb(uint8_t insn8, abi_ptr pc)
+{
+    plugin_insn_append(pc, &insn8, sizeof(insn8));
+}
+
+

^ nit: one emtpy line would have been sufficient

Signature · 3 lines
Thanks,

David / dhildenb
Reviewed-by on v3 25/26
#66 lore raw

Re: [PATCH v3 25/26] target/s390x: fake instruction loading when handling 'ex'

In reply to Alex Bennée
Quoted 15 lines · Alex Bennée

The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. This missed the plugin instrumentation.

Work around this with a special helper to inform the rest of the translator about the instruction so things stay consistent.

Cc Richard Henderson<[email protected]>

---
v2
- s/w/b/ for translator_fake_ldb
- add comment to extract_insn
- reword commit message

Quoted 4 lines
---
  include/exec/translator.h    | 17 +++++++++++++++++
  target/s390x/tcg/translate.c |  6 ++++++
  2 files changed, 23 insertions(+)

r~

Acked-by on v3 25/26
#67 lore raw

Re: [PATCH v3 25/26] target/s390x: fake instruction loading when handling 'ex'

In reply to Alex Bennée
Quoted 71 lines · Alex Bennée

The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. This missed the plugin instrumentation.

Work around this with a special helper to inform the rest of the translator about the instruction so things stay consistent.

Cc Richard Henderson <[email protected]>

---
v2
  - s/w/b/ for translator_fake_ldb
  - add comment to extract_insn
  - reword commit message
---
 include/exec/translator.h    | 17 +++++++++++++++++ target/s390x/tcg/translate.c |  6 ++++++

 2 files changed, 23 insertions(+)
include/exec/translator.h +0 -0
index 3b77f5f4aa..af2ff95cd5 100644
@@ -211,6 +211,23 @@ translator_ldq_swap(CPUArchState *env,
 DisasContextBase *db,
      return ret;
  }


+/**
+ * translator_fake_ldb - fake instruction load
+ * @insn8: byte of instruction
+ * @pc: program counter of instruction
+ *
+ * This is a special case helper used where the instruction we are
+ * about to translate comes from somewhere else (e.g. being
+ * re-synthesised for s390x "ex"). It ensures we update other areas of
+ * the translator with details of the executed instruction.
+ */

include/exec/translator.h +7 -0
+
+static inline void translator_fake_ldb(uint8_t insn8, abi_ptr pc)
+{
+    plugin_insn_append(pc, &insn8, sizeof(insn8));
+}
+
+

 /*
  * Return whether addr is on the same page as where disassembly started.
  * Translators can use this to enforce the rule that only single- insn

target/s390x/tcg/translate.c +0 -0
index 95279e5dc3..8101f5f569 100644
@@ -6317,12 +6317,18 @@ static const DisasInsn
 *extract_insn(CPUS390XState *env, DisasContext *s)
      if (unlikely(s->ex_value)) {
          /* Drop the EX data now, so that it's clear on exception

paths.  */
         TCGv_i64 zero = tcg_const_i64(0);
+        int i;
         tcg_gen_st_i64(zero, cpu_env, offsetof(CPUS390XState, ex_value));
         tcg_temp_free_i64(zero);

         /* Extract the values saved by EXECUTE.  */ insn = s->ex_value & 0xffffffffffff0000ull; ilen = s->ex_value & 0xf;

Quoted 8 lines

+        /* register insn bytes with translator so plugins work */ +        for (i = 0; i < ilen; i++) {
+            uint8_t byte = extract64(insn, 56 - (i * 8), 8); +            translator_fake_ldb(byte, pc + i);
+        }
         op = insn >> 56;
     } else {
         insn = ld_code2(env, s, pc);

#68 lore raw

PATCH v3 26/26 tests/tcg: include CONFIG_PLUGIN in config-host.mak

In reply to Alex Bennée

From: Paolo Bonzini <[email protected]>

Message-Id: <[email protected]>

---
 configure | 3 +++
 1 file changed, 3 insertions(+)
configure +3 -0
index 8c2c4c1a04..4275f5419f 100755
@@ -2486,6 +2486,9 @@ echo "HOST_CC=$host_cc" >> $config_host_mak
 if test -n "$gdb_bin"; then
     echo "HAVE_GDB_BIN=$gdb_bin" >> $config_host_mak
 fi
+if test "$plugins" = "yes" ; then
+    echo "CONFIG_PLUGIN=y" >> $config_host_mak
+fi
 
 tcg_tests_targets=
 for target in $target_list; do
Signature · 1 line
2.34.1
Reviewed-by on v3 26/26
#69 lore raw

Re: [PATCH v3 26/26] tests/tcg: include CONFIG_PLUGIN in config-host.mak

Quoted 14 lines · Alex Bennée

From: Paolo Bonzini <[email protected]>

Message-Id: <[email protected]>

---
  configure | 3 +++
  1 file changed, 3 insertions(+)
configure +0 -0
index 8c2c4c1a04..4275f5419f 100755

configure echo "HOST_CC=$host_cc" >> $config_host_mak · line 2491

Quoted 6 lines
configure +3 -0
@@ -2486,6 +2486,9 @@ echo "HOST_CC=$host_cc" >> $config_host_mak
  if test -n "$gdb_bin"; then
      echo "HAVE_GDB_BIN=$gdb_bin" >> $config_host_mak
  fi
+if test "$plugins" = "yes" ; then
+    echo "CONFIG_PLUGIN=y" >> $config_host_mak
+fi

Ugh, this is super-confusing that the configuration for tests/tcg/config-host.mak uses the same variable as the configuration for the top level config-host.mak ... not the fault of this patch, but we should maybe disentangle this in the future and rename the variable to tcg_config_host_mak or something like that.

Anyway, for this patch:

#70 lore raw
In reply to Alex Bennée

Hi Alex,

Quoted 61 lines · Alex Bennée

Hi,

The testing/next changes have accumulated a few more fixes since the last posting. Including:

- a bunch of Bin Meng's test cleanups for windows
- some avocado test fixes and tweaks
- disabling an sh4 avocado test (possibly a missed recent intermittent regression)
- enabling some sh4 check-tcg tests (now bugs are fixed)
- a minor excursion into the s390 translator

The following still need review:

- target/s390x: fake instruction loading when handling 'ex'
- target/s390x: don't probe next pc for EXecuted insns
- target/s390x: don't use ld_code2 to probe next pc
- tests/tcg: re-enable threadcount for sh4
- tests/tcg: re-enable linux-test for sh4
- tests/avocado: disable sh4 rd2 tests on Gitlab
- tests/avocado: set -machine none for userfwd and vnc tests
- MAINTAINERS: fix-up for check-tcg Makefile changes
- MAINTAINERS: add features_to_c.sh to gdbstub files
- MAINTAINERS: add entries for the key build bits
- tests/tcg: use regular semihosting for nios2-softmmu
- tests/avocado: extend the timeout for x86_64 tcg tests
- configure: fix the --enable-static --disable-pie case
- configure: don't enable cross compilers unless in target_list
- tests/docker: update fedora-win[32|64]-cross with lcitool

Alex Bennée (16):
tests/docker: update fedora-win[32|64]-cross with lcitool tests/docker: update test-mingw to run single build
configure: don't enable cross compilers unless in target_list
configure: fix the --enable-static --disable-pie case tests/avocado: extend the timeout for x86_64 tcg tests tests/tcg: use regular semihosting for nios2-softmmu
MAINTAINERS: add entries for the key build bits
MAINTAINERS: add features_to_c.sh to gdbstub files
MAINTAINERS: fix-up for check-tcg Makefile changes tests/avocado: set -machine none for userfwd and vnc tests tests/avocado: disable sh4 rd2 tests on Gitlab tests/tcg: re-enable linux-test for sh4
tests/tcg: re-enable threadcount for sh4 target/s390x: don't use ld_code2 to probe next pc target/s390x: don't probe next pc for EXecuted insns target/s390x: fake instruction loading when handling 'ex'

Anton Johansson (2):
tests/docker: Add flex/bison to debian-all-test tests/docker: Add flex/bison to debian-hexagon-cross

Bin Meng (6):
semihosting/arm-compat-semi: Avoid using hardcoded /tmp
tcg: Avoid using hardcoded /tmp
util/qemu-sockets: Use g_get_tmp_dir() to get the directory for
temporary files
block/vvfat: Unify the mkdir() call fsdev/virtfs-proxy-helper: Use g_mkdir()
hw/usb: dev-mtp: Use g_mkdir()

Quoted 7 lines

Paolo Bonzini (1):
tests/tcg: include CONFIG_PLUGIN in config-host.mak

Peter Maydell (1):
tests/avocado: raspi2_initrd: Wait for guest shutdown message before
stopping

Will the PR be sent soon? Thanks!

Regards,
Bin

#71 lore raw

I've posted an RFC to fix the regression in test-io-command and once that is reviewed I'll push out the pr.

Quoted 79 lines · On Thu, 27 Oct 2022, 16:06 Bin Meng, <[email protected]> wrote:

Hi Alex,

Quoted 9 lines · Alex Bennée

Hi,

The testing/next changes have accumulated a few more fixes since the last posting. Including:

- a bunch of Bin Meng's test cleanups for windows
- some avocado test fixes and tweaks
- disabling an sh4 avocado test (possibly a missed recent intermittent

regression)

Quoted 52 lines

- enabling some sh4 check-tcg tests (now bugs are fixed)
- a minor excursion into the s390 translator

The following still need review:

- target/s390x: fake instruction loading when handling 'ex'
- target/s390x: don't probe next pc for EXecuted insns
- target/s390x: don't use ld_code2 to probe next pc
- tests/tcg: re-enable threadcount for sh4
- tests/tcg: re-enable linux-test for sh4
- tests/avocado: disable sh4 rd2 tests on Gitlab
- tests/avocado: set -machine none for userfwd and vnc tests
- MAINTAINERS: fix-up for check-tcg Makefile changes
- MAINTAINERS: add features_to_c.sh to gdbstub files
- MAINTAINERS: add entries for the key build bits
- tests/tcg: use regular semihosting for nios2-softmmu
- tests/avocado: extend the timeout for x86_64 tcg tests
- configure: fix the --enable-static --disable-pie case
- configure: don't enable cross compilers unless in target_list
- tests/docker: update fedora-win[32|64]-cross with lcitool

Alex Bennée (16):
tests/docker: update fedora-win[32|64]-cross with lcitool tests/docker: update test-mingw to run single build
configure: don't enable cross compilers unless in target_list
configure: fix the --enable-static --disable-pie case tests/avocado: extend the timeout for x86_64 tcg tests tests/tcg: use regular semihosting for nios2-softmmu
MAINTAINERS: add entries for the key build bits
MAINTAINERS: add features_to_c.sh to gdbstub files
MAINTAINERS: fix-up for check-tcg Makefile changes tests/avocado: set -machine none for userfwd and vnc tests tests/avocado: disable sh4 rd2 tests on Gitlab tests/tcg: re-enable linux-test for sh4
tests/tcg: re-enable threadcount for sh4 target/s390x: don't use ld_code2 to probe next pc target/s390x: don't probe next pc for EXecuted insns target/s390x: fake instruction loading when handling 'ex'

Anton Johansson (2):
tests/docker: Add flex/bison to debian-all-test tests/docker: Add flex/bison to debian-hexagon-cross

Bin Meng (6):
semihosting/arm-compat-semi: Avoid using hardcoded /tmp
tcg: Avoid using hardcoded /tmp
util/qemu-sockets: Use g_get_tmp_dir() to get the directory for
temporary files
block/vvfat: Unify the mkdir() call fsdev/virtfs-proxy-helper: Use g_mkdir()
hw/usb: dev-mtp: Use g_mkdir()

Quoted 7 lines

Paolo Bonzini (1):
tests/tcg: include CONFIG_PLUGIN in config-host.mak

Peter Maydell (1):
tests/avocado: raspi2_initrd: Wait for guest shutdown message before
stopping

Will the PR be sent soon? Thanks!

Regards,
Bin