Skip to contentSkip to conversation

testing/next for 4.1-rc2 (win, travis, iotests)

PATCH In review Alex Bennée 5 participants 39 messages Jul 17, 2019 – Aug 2, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

v2 cover testing/next for 4.1-rc2 (win, travis, iotests)

Hi,

This is my current queue for testing/next which I shall submit a PR for on Tuesday in time for rc2. This update adds:

- fixes for Windows builds under docker (+installer)
- build fix for --no-default-devices
- tweak to docker DEBUG behaviour
- run iotests in make check
- use travis_retry to deal with flaky tests

Rather than just disabling flaky tests I've enabled travis_retry on the check phase. This basically avoids me manually triggering rebuilds to turn the build green again. I think this is OK because actual breakages will just fail again and we want the CI status to be a reliable indicator of something gone wrong rather than being ignored as probably a flaky test. There is a danger that we might be missing the introduction of flakiness into the build but I suspect we wouldn't have picked it up those cases anyway. I think soak/stress tests are probably best handled by maintainers anyway.

The following patches need review
patch 0017/hw i386 also turn off VMMOUSE is VMPORT is disabl.patch patch 0018/travis enable travis_retry for check phase.patch patch 0019/tests docker invoke the DEBUG shell with noprofil.patch

Alex Bennée (7):
tests/docker: add test-misc for building tools & docs tests/migration-test: don't spam the logs when we fail tests/dockerfiles: update the win cross builds to stretch
shippable: re-enable the windows cross builds hw/i386: also turn off VMMOUSE is VMPORT is disabled
travis: enable travis_retry for check phase tests/docker: invoke the DEBUG shell with --noprofile/--norc

Marc-André Lureau (1):
archive-source: also create a stash for submodules

Philippe Mathieu-Daudé (11):
tests/docker: Install Sphinx in the Ubuntu images tests/docker: Install Sphinx in the Fedora image tests/docker: Install Ubuntu images noninteractively tests/docker: Install Sphinx in the Debian images tests/docker: Install the NSIS tools in the MinGW capable images tests/docker: Set the correct cross-PKG_CONFIG_PATH in the MXE images tests/docker: Install texinfo in the Fedora image
buildsys: The NSIS Windows build requires the documentation installed
buildsys: The NSIS Windows build requires qemu-nsis.bmp installed tests/docker: Let the test-mingw test generate a NSIS installer
NSIS: Add missing firmware blobs

Thomas Huth (4):
tests/qemu-iotests/check: Allow tests without groups tests/qemu-iotests/group: Remove some more tests from the "auto" group
tests: Run the iotests during "make check" again
gitlab-ci: Remove qcow2 tests that are handled by "make check" already

 .gitlab-ci.yml                                |  13 +-
 .shippable.yml                                |   9 +-
 .travis.yml                                   |   2 +-
 Makefile                                      |   3 +-
 hw/i386/Kconfig                               |   4 +-
 qemu.nsi                                      |   3 +
 scripts/archive-source.sh                     |  18 +--
 tests/Makefile.include                        |  10 +-
 tests/check-block.sh                          |  44 +++++--
 tests/docker/Makefile.include                 |   6 +-
 .../dockerfiles/debian-win32-cross.docker     |  10 +-
 .../dockerfiles/debian-win64-cross.docker     |  10 +-
 tests/docker/dockerfiles/debian10.docker      |   1 +
 ...{debian8-mxe.docker => debian9-mxe.docker} |  11 +-
 tests/docker/dockerfiles/debian9.docker       |   1 +
 tests/docker/dockerfiles/fedora.docker        |   4 +
 tests/docker/dockerfiles/ubuntu.docker        |   3 +-
 tests/docker/dockerfiles/ubuntu1804.docker    |   3 +-
 tests/docker/run                              |   4 +-
 tests/docker/test-mingw                       |   4 +-
 tests/docker/test-misc                        |  22 ++++
 tests/migration-test.c                        |  19 ++-
 tests/qemu-iotests-quick.sh                   |   8 --
 tests/qemu-iotests/check                      |   4 +-
 tests/qemu-iotests/group                      | 120 +++++++++---------
 25 files changed, 204 insertions(+), 132 deletions(-)
 rename tests/docker/dockerfiles/{debian8-mxe.docker => debian9-mxe.docker} (56%)
 create mode 100755 tests/docker/test-misc
 delete mode 100755 tests/qemu-iotests-quick.sh
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/23 archive-source: also create a stash for submodules

From: Marc-André Lureau <[email protected]>

"git archive" fails when a submodule has a modification, because "git stash create" doesn't handle submodules. Let's teach our archive-source.sh to handle modifications in submodules the same way as qemu tree, by creating a stash.

Message-Id: <[email protected]>

---
 scripts/archive-source.sh | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
scripts/archive-source.sh +10 -8
index ca94e49978f..fb5d6b3918d 100755
@@ -39,14 +39,16 @@ function cleanup() {
 }
 trap "cleanup" 0 1 2 3 15
 
-if git diff-index --quiet HEAD -- &>/dev/null
-then
-    HEAD=HEAD
-else
-    HEAD=$(git stash create)
-fi
+function tree_ish() {
+    local retval='HEAD'
+    if ! git diff-index --quiet --ignore-submodules=all HEAD -- &>/dev/null
+    then
+        retval=$(git stash create)
+    fi
+    echo "$retval"
+}
 
-git archive --format tar $HEAD > "$tar_file"
+git archive --format tar "$(tree_ish)" > "$tar_file"
 test $? -ne 0 && error "failed to archive qemu"
 for sm in $submodules; do
     status="$(git submodule status "$sm")"
@@ -62,7 +64,7 @@ for sm in $submodules; do
             echo "WARNING: submodule $sm is out of sync"
             ;;
     esac
-    (cd $sm; git archive --format tar --prefix "$sm/" $smhash) > "$sub_file"
+    (cd $sm; git archive --format tar --prefix "$sm/" $(tree_ish)) > "$sub_file"
     test $? -ne 0 && error "failed to archive submodule $sm ($smhash)"
     tar --concatenate --file "$tar_file" "$sub_file"
     test $? -ne 0 && error "failed append submodule $sm to $tar_file"
Signature · 1 line
2.20.1
#2 lore raw

PATCH v2 2/23 tests/docker: add test-misc for building tools & docs

In reply to Alex Bennée

Add yet another test type so we cna quickly exercise the miscellaneous build products of the build system under various docer configurations.

---
 tests/docker/test-misc | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100755 tests/docker/test-misc
tests/docker/test-misc new file +22 -0
new file mode 100755
index 00000000000..d480afedca7
@@ -0,0 +1,22 @@
+#!/bin/bash -e
+#
+# Build the miscellaneous components
+#
+# Copyright (c) 2019 Linaro Ltd.
+#
+# Authors:
+#  Alex Bennée <[email protected]>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or later.
+# See the COPYING file in the top-level directory.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. common.rc
+
+cd "$BUILD_DIR"
+
+# build everything else but QEMU
+configure_qemu --disable-user --disable-system --enable-docs --enable-tools
+build_qemu
+install_qemu
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 3/23 tests/docker: Install Sphinx in the Ubuntu images

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Since commit 5f71eac06e the Sphinx tool is required to build the rST documentation.

This fixes:

 $ ./configure --enable-docs

ERROR: User requested feature docs
configure was not able to find it.
Install texinfo, Perl/perl-podlators and python-sphinx

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/ubuntu.docker     | 1 +
 tests/docker/dockerfiles/ubuntu1804.docker | 1 +
 2 files changed, 2 insertions(+)
tests/docker/dockerfiles/ubuntu.docker +1 -0
index d3b72209c85..2500ec84b6f 100644
@@ -61,6 +61,7 @@ ENV PACKAGES flex bison \
     libxen-dev \
     make \
     python-yaml \
+    python3-sphinx \
     sparse \
     texinfo \
     xfslibs-dev
tests/docker/dockerfiles/ubuntu1804.docker +1 -0
index 9d80b115009..0bb8088658d 100644
@@ -48,6 +48,7 @@ ENV PACKAGES flex bison \
     libxen-dev \
     make \
     python-yaml \
+    python3-sphinx \
     sparse \
     texinfo \
     xfslibs-dev
Signature · 1 line
2.20.1
#4 lore raw

PATCH v2 4/23 tests/docker: Install Sphinx in the Fedora image

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Since commit 5f71eac06e the Sphinx tool is required to build the rST documentation.

This fixes:

 $ ./configure --enable-docs

ERROR: User requested feature docs
configure was not able to find it.
Install texinfo, Perl/perl-podlators and python-sphinx

Message-Id: <[email protected]>

[AJB: also add /usr/libexec/python3-sphinx/ to PATH]
---
 tests/docker/dockerfiles/fedora.docker | 2 ++
 1 file changed, 2 insertions(+)
tests/docker/dockerfiles/fedora.docker +2 -0
index 619d1b5656d..2350d494d9a 100644
@@ -76,6 +76,7 @@ ENV PACKAGES \
     perl-Test-Harness \
     pixman-devel \
     python3 \
+    python3-sphinx \
     PyYAML \
     rdma-core-devel \
     SDL2-devel \
@@ -95,4 +96,5 @@ ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 
 RUN dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
+ENV PATH $PATH:/usr/libexec/python3-sphinx/
 ENV FEATURES mingw clang pyyaml asan
Signature · 1 line
2.20.1
#5 lore raw

PATCH v2 5/23 tests/docker: Install Ubuntu images noninteractively

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

We correctly use the DEBIAN_FRONTEND environment variable on the Debian images, but forgot the Ubuntu ones are based on it.

Since building docker images is not interactive, we need to inform the APT tools about it using the DEBIAN_FRONTEND environment variable (we already use it on our Debian images).

This fixes:

  $ make docker-image-ubuntu V=1
  [...]
  Setting up tzdata (2019b-0ubuntu0.19.04) ...
  debconf: unable to initialize frontend: Dialog
  debconf: (TERM is not set, so the dialog frontend is not usable.)
  debconf: falling back to frontend: Readline
  Configuring tzdata
  ------------------

Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities, representing the time zones in which they are located.

    1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
    2. America     5. Arctic     8. Europe    11. SystemV
    3. Antarctica  6. Asia       9. Indian    12. US

Geographic area: 12
[HANG]

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/ubuntu.docker     | 2 +-
 tests/docker/dockerfiles/ubuntu1804.docker | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/ubuntu.docker +1 -1
index 2500ec84b6f..a4f601395c8 100644
@@ -66,6 +66,6 @@ ENV PACKAGES flex bison \
     texinfo \
     xfslibs-dev
 RUN apt-get update && \
-    apt-get -y install $PACKAGES
+    DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
 RUN dpkg -l $PACKAGES | sort > /packages.txt
 ENV FEATURES clang pyyaml sdl2
tests/docker/dockerfiles/ubuntu1804.docker +1 -1
index 0bb8088658d..44bbf0f77ae 100644
@@ -53,6 +53,6 @@ ENV PACKAGES flex bison \
     texinfo \
     xfslibs-dev
 RUN apt-get update && \
-    apt-get -y install $PACKAGES
+    DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
 RUN dpkg -l $PACKAGES | sort > /packages.txt
 ENV FEATURES clang pyyaml sdl2
Signature · 1 line
2.20.1
#6 lore raw

PATCH v2 6/23 tests/migration-test: don't spam the logs when we fail

In reply to Alex Bennée

Quite often the information about which test failed is hidden by the wall of repeated failures for each page. Stop outputting the error after 10 bad pages and just summarise the total damage at the end.

---
v2
- bad - 10

---
 tests/migration-test.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
tests/migration-test.c +12 -7
index a4feb9545d9..c1968740abe 100644
@@ -308,7 +308,7 @@ static void check_guests_ram(QTestState *who)
     uint8_t first_byte;
     uint8_t last_byte;
     bool hit_edge = false;
-    bool bad = false;
+    int bad = 0;
 
     qtest_memread(who, start_address, &first_byte, 1);
     last_byte = first_byte;
@@ -327,15 +327,20 @@ static void check_guests_ram(QTestState *who)
                 hit_edge = true;
                 last_byte = b;
             } else {
-                fprintf(stderr, "Memory content inconsistency at %x"
-                                " first_byte = %x last_byte = %x current = %x"
-                                " hit_edge = %x\n",
-                                address, first_byte, last_byte, b, hit_edge);
-                bad = true;
+                bad++;
+                if (bad <= 10) {
+                    fprintf(stderr, "Memory content inconsistency at %x"
+                            " first_byte = %x last_byte = %x current = %x"
+                            " hit_edge = %x\n",
+                            address, first_byte, last_byte, b, hit_edge);
+                }
             }
         }
     }
-    g_assert_false(bad);
+    if (bad >= 10) {
+        fprintf(stderr, "and in another %d pages", bad - 10);
+    }
+    g_assert(bad == 0);
 }
 
 static void cleanup(const char *filename)
Signature · 1 line
2.20.1
#7 lore raw

PATCH v2 7/23 tests/dockerfiles: update the win cross builds to stretch

In reply to Alex Bennée

While fixing up pkg.mxe.cc they move the URLs around a bit and dropped Jessie support in favour of Stretch. We also need to update the keys used to verify the packages.

---
 tests/docker/Makefile.include                         |  6 +++---
 tests/docker/dockerfiles/debian-win32-cross.docker    |  4 ++--
 tests/docker/dockerfiles/debian-win64-cross.docker    |  4 ++--
 .../{debian8-mxe.docker => debian9-mxe.docker}        | 11 +++++++----
 4 files changed, 14 insertions(+), 11 deletions(-)
 rename tests/docker/dockerfiles/{debian8-mxe.docker => debian9-mxe.docker} (56%)
tests/docker/Makefile.include +3 -3
index aaf5396b85d..dbd58e548c1 100644
@@ -85,7 +85,7 @@ endif
 
 # Enforce dependencies for composite images
 docker-image-debian: docker-image-debian9
-docker-image-debian8-mxe: docker-image-debian8
+docker-image-debian9-mxe: docker-image-debian9
 docker-image-debian-amd64: docker-image-debian9
 docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
@@ -96,8 +96,8 @@ docker-image-debian-mipsel-cross: docker-image-debian9
 docker-image-debian-mips64el-cross: docker-image-debian9
 docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
-docker-image-debian-win32-cross: docker-image-debian8-mxe
-docker-image-debian-win64-cross: docker-image-debian8-mxe
+docker-image-debian-win32-cross: docker-image-debian9-mxe
+docker-image-debian-win64-cross: docker-image-debian9-mxe
 
 docker-image-debian-alpha-cross: docker-image-debian-sid
 docker-image-debian-hppa-cross: docker-image-debian-sid
tests/docker/dockerfiles/debian-win32-cross.docker +2 -2
index 0a4970c0683..c787e432454 100644
@@ -1,9 +1,9 @@
 #
 # Docker mingw32 cross-compiler target
 #
-# This docker target builds on the debian Jessie MXE base image.
+# This docker target builds on the debian Stretch MXE base image.
 #
-FROM qemu:debian8-mxe
+FROM qemu:debian9-mxe
 
 MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
tests/docker/dockerfiles/debian-win64-cross.docker +2 -2
index b27985b1b1f..a7068ed6ac6 100644
@@ -1,9 +1,9 @@
 #
 # Docker mingw64 cross-compiler target
 #
-# This docker target builds on the debian Jessie MXE base image.
+# This docker target builds on the debian Stretch MXE base image.
 #
-FROM qemu:debian8-mxe
+FROM qemu:debian9-mxe
 
 MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
tests/docker/dockerfiles/debian9-mxe.docker renamed from tests/docker/dockerfiles/debian8-mxe.docker +7 -4
similarity index 56%
rename from tests/docker/dockerfiles/debian8-mxe.docker
rename to tests/docker/dockerfiles/debian9-mxe.docker
index 2df4cc8c5c9..5bc8a6d5c36 100644
@@ -1,15 +1,18 @@
 #
 # Docker mingw cross-compiler target
 #
-# This docker target builds on the debian Jessie base image.
+# This docker target builds on the debian Stretch base image.
 #
-FROM qemu:debian8
+FROM qemu:debian9
 
 MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt install -y --no-install-recommends gnupg dirmngr
+
 # Add the foreign architecture we want and install dependencies
-RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB && \
-    echo "deb http://pkg.mxe.cc/repos/apt/debian jessie main" > /etc/apt/sources.list.d/mxeapt.list
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C6BF758A33A3A276 && \
+    echo "deb http://pkg.mxe.cc/repos/apt stretch main" > /etc/apt/sources.list.d/mxeapt.list
 RUN apt-get update
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
Signature · 1 line
2.20.1
#8 lore raw

PATCH v2 8/23 shippable: re-enable the windows cross builds

In reply to Alex Bennée

The pkg.mxe.cc repo has been restored.

---
 .shippable.yml | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
.shippable.yml +4 -5
index f2ffef21d11..f74a3de3ffd 100644
@@ -7,11 +7,10 @@ env:
   matrix:
     - IMAGE=debian-amd64
       TARGET_LIST=x86_64-softmmu,x86_64-linux-user
-    # currently disabled as the mxe.cc repos are down
-    # - IMAGE=debian-win32-cross
-    #   TARGET_LIST=arm-softmmu,i386-softmmu,lm32-softmmu
-    # - IMAGE=debian-win64-cross
-    #   TARGET_LIST=aarch64-softmmu,sparc64-softmmu,x86_64-softmmu
+    - IMAGE=debian-win32-cross
+      TARGET_LIST=arm-softmmu,i386-softmmu,lm32-softmmu
+    - IMAGE=debian-win64-cross
+      TARGET_LIST=aarch64-softmmu,sparc64-softmmu,x86_64-softmmu
     - IMAGE=debian-armel-cross
       TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user
     - IMAGE=debian-armhf-cross
Signature · 1 line
2.20.1
#9 lore raw

PATCH v2 9/23 tests/docker: Install Sphinx in the Debian images

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Since commit 5f71eac06e the Sphinx tool is required to build the rST documentation.

This fixes:

 $ ./configure --enable-docs

ERROR: User requested feature docs
configure was not able to find it.
Install texinfo, Perl/perl-podlators and python-sphinx

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/debian10.docker | 1 +
 tests/docker/dockerfiles/debian9.docker  | 1 +
 2 files changed, 2 insertions(+)
tests/docker/dockerfiles/debian10.docker +1 -0
index aeeb151b521..cf57d8218f6 100644
@@ -27,5 +27,6 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         pkg-config \
         psmisc \
         python \
+        python3-sphinx \
         texinfo \
         $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\  -f2)
tests/docker/dockerfiles/debian9.docker +1 -0
index 5f23a35404f..52c589a7d64 100644
@@ -27,5 +27,6 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         pkg-config \
         psmisc \
         python \
+        python3-sphinx \
         texinfo \
         $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\  -f2)
Signature · 1 line
2.20.1
#10 lore raw

PATCH v2 10/23 tests/docker: Install the NSIS tools in the MinGW capable images

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

This fixes:

  $ make installer
  (cd /tmp/qemu-nsis; \
           for i in qemu-system-*.exe; do \
             arch=${i%.exe}; \
             arch=${arch#qemu-system-}; \
             echo Section \"$arch\" Section_$arch; \
             echo SetOutPath \"\$INSTDIR\"; \
             echo File \"\${BINDIR}\\$i\"; \
             echo SectionEnd; \
           done \
          ) >/tmp/qemu-nsis/system-emulations.nsh
  makensis -V2 -NOCD \
                  -DCONFIG_DOCUMENTATION="y" \
                   \
                  -DBINDIR="/tmp/qemu-nsis" \
                   \
                  -DSRCDIR="/home/phil/source/qemu" \
                  -DOUTFILE="qemu-setup-4.0.90.exe" \
                  -DDISPLAYVERSION="4.0.90" \
                  /home/phil/source/qemu/qemu.nsi
  /bin/sh: 1: makensis: not found
  Makefile:1077: recipe for target 'qemu-setup-4.0.90.exe' failed
  make: *** [qemu-setup-4.0.90.exe] Error 127

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/debian-win32-cross.docker | 3 +++
 tests/docker/dockerfiles/debian-win64-cross.docker | 3 +++
 tests/docker/dockerfiles/fedora.docker             | 1 +
 3 files changed, 7 insertions(+)
tests/docker/dockerfiles/debian-win32-cross.docker +3 -0
index c787e432454..77f5cc45e92 100644
@@ -9,6 +9,8 @@ MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
 ENV TARGET i686
 
+ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
@@ -19,6 +21,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         mxe-$TARGET-w64-mingw32.shared-lzo \
         mxe-$TARGET-w64-mingw32.shared-nettle \
         mxe-$TARGET-w64-mingw32.shared-ncurses \
+        mxe-$TARGET-w64-mingw32.shared-nsis \
         mxe-$TARGET-w64-mingw32.shared-pixman \
         mxe-$TARGET-w64-mingw32.shared-pkgconf \
         mxe-$TARGET-w64-mingw32.shared-pthreads \
tests/docker/dockerfiles/debian-win64-cross.docker +3 -0
index a7068ed6ac6..3908c5abc42 100644
@@ -9,6 +9,8 @@ MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
 ENV TARGET x86-64
 
+ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
@@ -19,6 +21,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         mxe-$TARGET-w64-mingw32.shared-lzo \
         mxe-$TARGET-w64-mingw32.shared-nettle \
         mxe-$TARGET-w64-mingw32.shared-ncurses \
+        mxe-$TARGET-w64-mingw32.shared-nsis \
         mxe-$TARGET-w64-mingw32.shared-pixman \
         mxe-$TARGET-w64-mingw32.shared-pkgconf \
         mxe-$TARGET-w64-mingw32.shared-pthreads \
tests/docker/dockerfiles/fedora.docker +1 -0
index 2350d494d9a..226ac1026fa 100644
@@ -52,6 +52,7 @@ ENV PACKAGES \
     mingw32-libpng \
     mingw32-libtasn1 \
     mingw32-nettle \
+    mingw32-nsis \
     mingw32-pixman \
     mingw32-pkg-config \
     mingw32-SDL2 \
Signature · 1 line
2.20.1
#11 lore raw

PATCH v2 11/23 tests/docker: Set the correct cross-PKG_CONFIG_PATH in the MXE images

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

This silents a bunch of warnings while compiling the Slirp objects:

 $ make
 [...]
   CC      slirp/src/tftp.o
 Package glib-2.0 was not found in the pkg-config search path.
 Perhaps you should add the directory containing `glib-2.0.pc'
 to the PKG_CONFIG_PATH environment variable
 No package 'glib-2.0' found
   CC      slirp/src/udp6.o
 Package glib-2.0 was not found in the pkg-config search path.
 Perhaps you should add the directory containing `glib-2.0.pc'
 to the PKG_CONFIG_PATH environment variable
 No package 'glib-2.0' found
 [...]

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/debian-win32-cross.docker | 3 +++
 tests/docker/dockerfiles/debian-win64-cross.docker | 3 +++
 2 files changed, 6 insertions(+)
tests/docker/dockerfiles/debian-win32-cross.docker +3 -0
index 77f5cc45e92..dc74ce7e0e0 100644
@@ -11,6 +11,9 @@ ENV TARGET i686
 
 ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
 
+ENV PKG_CONFIG_PATH \
+    $PKG_CONFIG_PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/lib/pkgconfig
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
tests/docker/dockerfiles/debian-win64-cross.docker +3 -0
index 3908c5abc42..df7bfce7eab 100644
@@ -11,6 +11,9 @@ ENV TARGET x86-64
 
 ENV PATH $PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/bin
 
+ENV PKG_CONFIG_PATH \
+    $PKG_CONFIG_PATH:/usr/lib/mxe/usr/$TARGET-w64-mingw32.shared/lib/pkgconfig
+
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         mxe-$TARGET-w64-mingw32.shared-bzip2 \
Signature · 1 line
2.20.1
#12 lore raw

PATCH v2 12/23 tests/docker: Install texinfo in the Fedora image

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

The 'makeinfo' is required to generate the documentation from the 'html' Makefile rule (called by 'install-doc'). The NSIS installer uses these files.

Message-Id: <[email protected]>

---
 tests/docker/dockerfiles/fedora.docker | 1 +
 1 file changed, 1 insertion(+)
tests/docker/dockerfiles/fedora.docker +1 -0
index 226ac1026fa..4ddc7dd112a 100644
@@ -87,6 +87,7 @@ ENV PACKAGES \
     systemd-devel \
     systemtap-sdt-devel \
     tar \
+    texinfo \
     usbredir-devel \
     virglrenderer-devel \
     vte291-devel \
Signature · 1 line
2.20.1
#13 lore raw

PATCH v2 13/23 buildsys: The NSIS Windows build requires the documentation installed

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

This fixes:

  $ make installer
  [...]
  (cd /tmp/qemu-nsis; \
           for i in qemu-system-*.exe; do \
             arch=${i%.exe}; \
             arch=${arch#qemu-system-}; \
             echo Section \"$arch\" Section_$arch; \
             echo SetOutPath \"\$INSTDIR\"; \
             echo File \"\${BINDIR}\\$i\"; \
             echo SectionEnd; \
           done \
          ) >/tmp/qemu-nsis/system-emulations.nsh
  makensis -V2 -NOCD \
                   \
                  -DCONFIG_GTK="y" \
                  -DBINDIR="/tmp/qemu-nsis" \
                   \
                  -DSRCDIR="/source/qemu" \
                  -DOUTFILE="qemu-setup-4.0.90.exe" \
                  -DDISPLAYVERSION="4.0.90" \
                  /source/qemu/qemu.nsi
  File: "/tmp/qemu-nsis\qemu-doc.html" -> no files found.
  Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
     /oname=outfile one_file_only)
  Error in script "/source/qemu/qemu.nsi" on line 173 -- aborting creation process
  make: *** [Makefile:1080: qemu-setup-4.0.90.exe] Error 1

Message-Id: <[email protected]>

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index f9791dcb827..5a462629370 100644
@@ -1075,7 +1075,7 @@ installer: $(INSTALLER)
 
 INSTDIR=/tmp/qemu-nsis
 
-$(INSTALLER): $(SRC_PATH)/qemu.nsi
+$(INSTALLER): install-doc $(SRC_PATH)/qemu.nsi
 	$(MAKE) install prefix=${INSTDIR}
 ifdef SIGNCODE
 	(cd ${INSTDIR}; \
Signature · 1 line
2.20.1
#14 lore raw

PATCH v2 14/23 buildsys: The NSIS Windows build requires qemu-nsis.bmp installed

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

The qemu-nsis.bmp file was not listed with the other blobs, thus not installed in the ${BINDIR} location.

This fixes:

  $ make installer
  [...]
  (cd /tmp/qemu-nsis; \
           for i in qemu-system-*.exe; do \
             arch=${i%.exe}; \
             arch=${arch#qemu-system-}; \
             echo Section \"$arch\" Section_$arch; \
             echo SetOutPath \"\$INSTDIR\"; \
             echo File \"\${BINDIR}\\$i\"; \
             echo SectionEnd; \
           done \
          ) >/tmp/qemu-nsis/system-emulations.nsh
  makensis -V2 -NOCD \
                  -DCONFIG_DOCUMENTATION="y" \
                   \
                  -DBINDIR="/tmp/qemu-nsis" \
                   \
                  -DSRCDIR="/home/phil/source/qemu" \
                  -DOUTFILE="qemu-setup-4.0.90.exe" \
                  -DDISPLAYVERSION="4.0.90" \
                  /home/phil/source/qemu/qemu.nsi
  File: "/tmp/qemu-nsis\*.bmp" -> no files found.
  Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
     /oname=outfile one_file_only)
  Error in script "/home/phil/source/qemu/qemu.nsi" on line 122 -- aborting creation process
  Makefile:1077: recipe for target 'qemu-setup-4.0.90.exe' failed
  make: *** [qemu-setup-4.0.90.exe] Error 1

Message-Id: <[email protected]>

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 5a462629370..f3866ee084c 100644
@@ -762,6 +762,7 @@ pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
 efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \
 efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
 efi-e1000e.rom efi-vmxnet3.rom \
+qemu-nsis.bmp \
 bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
 multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin \
 s390-ccw.img s390-netboot.img \
Signature · 1 line
2.20.1
#15 lore raw

PATCH v2 15/23 tests/docker: Let the test-mingw test generate a NSIS installer

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

The NSIS installer generates an executable suitable to install QEMU on Windows.

Message-Id: <[email protected]>

[AJB: also --enable-docs in configure step]
---
 tests/docker/test-mingw | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/test-mingw +3 -1
index 4b84cfe120a..fdb1c2c879d 100755
@@ -27,8 +27,10 @@ for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
         --enable-curl \
         --enable-vnc \
         --enable-bzip2 \
-        --enable-guest-agent
+        --enable-guest-agent \
+        --enable-docs
     install_qemu
+    make installer
     make clean
 
 done
Signature · 1 line
2.20.1
#16 lore raw

PATCH v2 16/23 NSIS: Add missing firmware blobs

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Various firmwares has been added in the pc-bios/ directory:

- CCW (since commit 0c1fecdd523)
- Skiboot (since commit bcad45de6a0)
- EDK2 (since commit f7fa38b74c3)

Since we install qemu-system able to run the architectures targetted by these firmware, include them in the NSIS exe.

Message-Id: <[email protected]>

---
 qemu.nsi | 3 +++
 1 file changed, 3 insertions(+)
qemu.nsi +3 -0
index 75f1608b9e0..89c7c04f957 100644
@@ -122,6 +122,9 @@ Section "${PRODUCT} (required)"
     File "${BINDIR}\*.bmp"
     File "${BINDIR}\*.bin"
     File "${BINDIR}\*.dtb"
+    File "${BINDIR}\*.fd"
+    File "${BINDIR}\*.img"
+    File "${BINDIR}\*.lid"
     File "${BINDIR}\*.rom"
     File "${BINDIR}\openbios-*"
 
Signature · 1 line
2.20.1
Acked-by Laszlo Ersek on v2 16/23
#17 lore raw

Re: [Qemu-devel] [PATCH v2 16/23] NSIS: Add missing firmware blobs

Quoted 11 lines · Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Various firmwares has been added in the pc-bios/ directory:

- CCW (since commit 0c1fecdd523)
- Skiboot (since commit bcad45de6a0)
- EDK2 (since commit f7fa38b74c3)

Since we install qemu-system able to run the architectures targetted by these firmware, include them in the NSIS exe.

This one has:

https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg03594.html

Quoted 22 lines

Message-Id: <[email protected]>

---
 qemu.nsi | 3 +++
 1 file changed, 3 insertions(+)
qemu.nsi +3 -0
index 75f1608b9e0..89c7c04f957 100644
@@ -122,6 +122,9 @@ Section "${PRODUCT} (required)"
     File "${BINDIR}\*.bmp"
     File "${BINDIR}\*.bin"
     File "${BINDIR}\*.dtb"
+    File "${BINDIR}\*.fd"
+    File "${BINDIR}\*.img"
+    File "${BINDIR}\*.lid"
     File "${BINDIR}\*.rom"
     File "${BINDIR}\openbios-*"
 
#18 lore raw

Re: [Qemu-devel] [PATCH v2 16/23] NSIS: Add missing firmware blobs

In reply to Alex Bennée

Am 17.07.2019 um 15:43 schrieb Alex Bennée:

Quoted 23 lines

From: Philippe Mathieu-Daudé <[email protected]>

Various firmwares has been added in the pc-bios/ directory:

- CCW (since commit 0c1fecdd523)
- Skiboot (since commit bcad45de6a0)
- EDK2 (since commit f7fa38b74c3)

Since we install qemu-system able to run the architectures targetted by these firmware, include them in the NSIS exe.

Message-Id: <[email protected]>

---
 qemu.nsi | 3 +++
 1 file changed, 3 insertions(+)
qemu.nsi +0 -0
index 75f1608b9e0..89c7c04f957 100644

qemu.nsi Section "${PRODUCT} (required)" · line 130

Quoted 9 lines
qemu.nsi +3 -0
@@ -122,6 +122,9 @@ Section "${PRODUCT} (required)"
     File "${BINDIR}\*.bmp"
     File "${BINDIR}\*.bin"
     File "${BINDIR}\*.dtb"
+    File "${BINDIR}\*.fd"
+    File "${BINDIR}\*.img"
+    File "${BINDIR}\*.lid"
     File "${BINDIR}\*.rom"
     File "${BINDIR}\openbios-*"
 

Hi,

what about qemu_vga.ndrv? And all new file pattern should also be added to the uninstall section.

Regards,
Stefan

#19 lore raw

Re: [Qemu-devel] [PATCH v2 16/23] NSIS: Add missing firmware blobs

Quoted 37 lines · Stefan Weil

Am 17.07.2019 um 15:43 schrieb Alex Bennée:

Quoted 23 lines

From: Philippe Mathieu-Daudé <[email protected]>

Various firmwares has been added in the pc-bios/ directory:

- CCW (since commit 0c1fecdd523)
- Skiboot (since commit bcad45de6a0)
- EDK2 (since commit f7fa38b74c3)

Since we install qemu-system able to run the architectures targetted by these firmware, include them in the NSIS exe.

Message-Id: <[email protected]>

---
 qemu.nsi | 3 +++
 1 file changed, 3 insertions(+)
qemu.nsi +0 -0
index 75f1608b9e0..89c7c04f957 100644

qemu.nsi Section "${PRODUCT} (required)" · line 130

Quoted 9 lines
qemu.nsi +3 -0
@@ -122,6 +122,9 @@ Section "${PRODUCT} (required)"
     File "${BINDIR}\*.bmp"
     File "${BINDIR}\*.bin"
     File "${BINDIR}\*.dtb"
+    File "${BINDIR}\*.fd"
+    File "${BINDIR}\*.img"
+    File "${BINDIR}\*.lid"
     File "${BINDIR}\*.rom"
     File "${BINDIR}\openbios-*"
 

Hi,

Quoted 2 lines

what about qemu_vga.ndrv? And all new file pattern should also be added to the uninstall section.

Good point.

Alex, so you mind amending:

+ File "${BINDIR}\*.ndrv"

Stefan is that OK if we fix the uninstall section for the next rc or release?

Else, Alex please drop this patch.

Reviewed-by
#20 lore raw

Re: [Qemu-devel] [PATCH v2 16/23] NSIS: Add missing firmware blobs

Am 22.07.2019 um 22:06 schrieb Philippe Mathieu-Daudé:

Quoted 41 lines · Stefan Weil
Quoted 36 lines

Am 17.07.2019 um 15:43 schrieb Alex Bennée:

Quoted 23 lines

From: Philippe Mathieu-Daudé <[email protected]>

Various firmwares has been added in the pc-bios/ directory:

- CCW (since commit 0c1fecdd523)
- Skiboot (since commit bcad45de6a0)
- EDK2 (since commit f7fa38b74c3)

Since we install qemu-system able to run the architectures targetted by these firmware, include them in the NSIS exe.

Message-Id: <[email protected]>

---
 qemu.nsi | 3 +++
 1 file changed, 3 insertions(+)
qemu.nsi +0 -0
index 75f1608b9e0..89c7c04f957 100644

qemu.nsi Section "${PRODUCT} (required)" · line 130

Quoted 9 lines
qemu.nsi +3 -0
@@ -122,6 +122,9 @@ Section "${PRODUCT} (required)"
     File "${BINDIR}\*.bmp"
     File "${BINDIR}\*.bin"
     File "${BINDIR}\*.dtb"
+    File "${BINDIR}\*.fd"
+    File "${BINDIR}\*.img"
+    File "${BINDIR}\*.lid"
     File "${BINDIR}\*.rom"
     File "${BINDIR}\openbios-*"
 

Hi,

Quoted 2 lines

what about qemu_vga.ndrv? And all new file pattern should also be added to the uninstall section.

Good point.

Quoted 8 lines

Alex, so you mind amending:

+ File "${BINDIR}\*.ndrv"

Stefan is that OK if we fix the uninstall section for the next rc or release?

Else, Alex please drop this patch.

Sure, we can improve the NSIS script in several steps and fix the uninstall later.

You may add a

Thanks,
Stefan

#21 lore raw

PATCH v2 17/23 hw/i386: also turn off VMMOUSE is VMPORT is disabled

In reply to Alex Bennée

Commit 97fd1ea8c1 broke the build for --without-default-devices as VMMOUSE depends on VMPORT.

Fixes 97fd1ea8c1
---
 hw/i386/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/i386/Kconfig +2 -2
index b9c96ac361e..6350438036f 100644
@@ -52,6 +52,7 @@ config I440FX
     bool
     imply E1000_PCI
     imply VMPORT
+    imply VMMOUSE
     select PC_PCI
     select PC_ACPI
     select ACPI_SMBUS
@@ -59,7 +60,6 @@ config I440FX
     select IDE_PIIX
     select DIMM
     select SMBIOS
-    select VMMOUSE
     select FW_CFG_DMA
 
 config ISAPC
@@ -78,6 +78,7 @@ config Q35
     imply AMD_IOMMU
     imply E1000E_PCI_EXPRESS
     imply VMPORT
+    imply VMMOUSE
     select PC_PCI
     select PC_ACPI
     select PCI_EXPRESS_Q35
@@ -85,7 +86,6 @@ config Q35
     select AHCI_ICH9
     select DIMM
     select SMBIOS
-    select VMMOUSE
     select FW_CFG_DMA
 
 config VTD
Signature · 1 line
2.20.1
Reviewed-by on v2 17/23
#22 lore raw

Re: [Qemu-devel] [PATCH v2 17/23] hw/i386: also turn off VMMOUSE is VMPORT is disabled

Quoted 39 lines · Alex Bennée

Commit 97fd1ea8c1 broke the build for --without-default-devices as VMMOUSE depends on VMPORT.

Fixes 97fd1ea8c1
---
 hw/i386/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/i386/Kconfig +2 -1
index b9c96ac361e..6350438036f 100644
@@ -52,6 +52,7 @@ config I440FX
     bool
     imply E1000_PCI
     imply VMPORT
+    imply VMMOUSE
     select PC_PCI
     select PC_ACPI
     select ACPI_SMBUS
@@ -59,7 +60,6 @@ config I440FX
     select IDE_PIIX
     select DIMM
     select SMBIOS
-    select VMMOUSE
     select FW_CFG_DMA
 
 config ISAPC
@@ -78,6 +78,7 @@ config Q35
     imply AMD_IOMMU
     imply E1000E_PCI_EXPRESS
     imply VMPORT
+    imply VMMOUSE
     select PC_PCI
     select PC_ACPI
     select PCI_EXPRESS_Q35

hw/i386/Kconfig config Q35 · line 91

Quoted 7 lines
hw/i386/Kconfig +0 -1
@@ -85,7 +86,6 @@ config Q35
     select AHCI_ICH9
     select DIMM
     select SMBIOS
-    select VMMOUSE
     select FW_CFG_DMA
 
 config VTD
Reviewed-by on v2 17/23
#23 lore raw

Re: [Qemu-devel] [PATCH v2 17/23] hw/i386: also turn off VMMOUSE is VMPORT is disabled

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

Commit 97fd1ea8c1 broke the build for --without-default-devices as VMMOUSE depends on VMPORT.

Fixes 97fd1ea8c1
---
 hw/i386/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/i386/Kconfig +2 -1
index b9c96ac361e..6350438036f 100644
@@ -52,6 +52,7 @@ config I440FX
     bool
     imply E1000_PCI
     imply VMPORT
+    imply VMMOUSE
     select PC_PCI
     select PC_ACPI
     select ACPI_SMBUS
@@ -59,7 +60,6 @@ config I440FX
     select IDE_PIIX
     select DIMM
     select SMBIOS
-    select VMMOUSE
     select FW_CFG_DMA
 
 config ISAPC
@@ -78,6 +78,7 @@ config Q35
     imply AMD_IOMMU
     imply E1000E_PCI_EXPRESS
     imply VMPORT
+    imply VMMOUSE
     select PC_PCI
     select PC_ACPI
     select PCI_EXPRESS_Q35

hw/i386/Kconfig config Q35 · line 91

Quoted 7 lines
hw/i386/Kconfig +0 -1
@@ -85,7 +86,6 @@ config Q35
     select AHCI_ICH9
     select DIMM
     select SMBIOS
-    select VMMOUSE
     select FW_CFG_DMA
 
 config VTD
#24 lore raw

PATCH v2 18/23 travis: enable travis_retry for check phase

In reply to Alex Bennée

We have some flaky tests and usually the test passes on a retry. Enable travis_retry for the test phase and see if that helps keep things green.

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +1 -1
index 5d3d6ee1d32..caf0a1f8faf 100644
@@ -75,7 +75,7 @@ before_script:
   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
 script:
-  - make -j3 && ${TEST_CMD}
+  - make -j3 && travis_retry ${TEST_CMD}
 
 
 matrix:
Signature · 1 line
2.20.1
Reviewed-by on v2 18/23
#25 lore raw

Re: [Qemu-devel] [PATCH v2 18/23] travis: enable travis_retry for check phase

Hi Alex,

Quoted 15 lines · Alex Bennée

We have some flaky tests and usually the test passes on a retry. Enable travis_retry for the test phase and see if that helps keep things green.

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +0 -0
index 5d3d6ee1d32..caf0a1f8faf 100644

.travis.yml before_script: · line 81

Quoted 8 lines
.travis.yml +1 -1
@@ -75,7 +75,7 @@ before_script:
   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
 script:
-  - make -j3 && ${TEST_CMD}
+  - make -j3 && travis_retry ${TEST_CMD}
 
 
 matrix:

Does it help?

IIRC if TEST_CMD takes >20min the job will likely fails, anyway at best it succeeds :)

#26 lore raw

PATCH v2 19/23 tests/docker: invoke the DEBUG shell with --noprofile/--norc

In reply to Alex Bennée

It's very confusing when things work in the debug shell because the environment is different from what the test is running. Fix this by ensuring we only have the inherited environment from the run shell.

---
 tests/docker/run | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/run +2 -2
index 7aebf4b5698..1014871fec0 100755
@@ -62,7 +62,7 @@ echo "* Prepared to run command:"
 echo "  $CMD"
 echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
 echo
-$SHELL
+$SHELL --noprofile --norc
 
 if "$CMD"; then
     exit 0
@@ -72,7 +72,7 @@ elif test -n "$DEBUG"; then
     echo "* Hit Ctrl-D to exit"
     echo
     # Force error after shell exits
-    $SHELL && exit 1
+    $SHELL --noprofile --norc && exit 1
 else
     exit 1
 fi
Signature · 1 line
2.20.1
Reviewed-by on v2 19/23
#27 lore raw

Re: [Qemu-devel] [PATCH v2 19/23] tests/docker: invoke the DEBUG shell with --noprofile/--norc

Quoted 24 lines · Alex Bennée

It's very confusing when things work in the debug shell because the environment is different from what the test is running. Fix this by ensuring we only have the inherited environment from the run shell.

---
 tests/docker/run | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/run +1 -1
index 7aebf4b5698..1014871fec0 100755
@@ -62,7 +62,7 @@ echo "* Prepared to run command:"
 echo "  $CMD"
 echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
 echo
-$SHELL
+$SHELL --noprofile --norc
 
 if "$CMD"; then
     exit 0

tests/docker/run elif test -n "$DEBUG"; then · line 78

Quoted 8 lines
tests/docker/run +1 -1
@@ -72,7 +72,7 @@ elif test -n "$DEBUG"; then
     echo "* Hit Ctrl-D to exit"
     echo
     # Force error after shell exits
-    $SHELL && exit 1
+    $SHELL --noprofile --norc && exit 1
 else
     exit 1
 fi
#28 lore raw

PATCH v2 20/23 tests/qemu-iotests/check: Allow tests without groups

In reply to Alex Bennée

From: Thomas Huth <[email protected]>

The regular expressions in the "check" script currently expect that there is always a space after the test number in the group file, so you can't have a test in there without a group unless the line still ends with a space - which is quite error prone since some editors might remove spaces at the end of lines automatically.
Thus let's fix the regular expressions so that it is also possible to have lines with one test number only in the group file.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/check | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/qemu-iotests/check +2 -2
index f925606cc52..c24874ff4aa 100755
@@ -488,7 +488,7 @@ testlist options
 BEGIN        { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \
         | while read id
         do
-            if grep -s "^$id " "$source_iotests/group" >/dev/null
+            if grep -s "^$id\( \|\$\)" "$source_iotests/group" >/dev/null
             then
                 # in group file ... OK
                 echo $id >>$tmp.list
@@ -547,7 +547,7 @@ else
         touch $tmp.list
     else
         # no test numbers, do everything from group file
-        sed -n -e '/^[0-9][0-9][0-9]*/s/[         ].*//p' <"$source_iotests/group" >$tmp.list
+        sed -n -e '/^[0-9][0-9][0-9]*/s/^\([0-9]*\).*/\1/p' <"$source_iotests/group" >$tmp.list
     fi
 fi
 
Signature · 1 line
2.20.1
#29 lore raw

PATCH v2 21/23 tests/qemu-iotests/group: Remove some more tests from the "auto" group

In reply to Alex Bennée

From: Thomas Huth <[email protected]>

Remove some more tests from the "auto" group that either have issues in certain environments (like macOS or FreeBSD, or on certain file systems like ZFS or tmpfs), do not work with the qcow2 format, or that are simply taking too much time.

Message-Id: <[email protected]>

---
 tests/qemu-iotests/group | 120 ++++++++++++++++++++-------------------
 1 file changed, 61 insertions(+), 59 deletions(-)
tests/qemu-iotests/group +61 -59
index b34c8e3c0c6..f13e5f2e234 100644
@@ -14,7 +14,9 @@
 #   runnable in any case. That means they should run with every QEMU binary
 #   (also non-x86), with every QEMU configuration (i.e. must not fail if
 #   an optional feature is not compiled in - but reporting a "skip" is ok),
-#   and work all kind of host filesystems and users (e.g. "nobody" or "root").
+#   work at least with the qcow2 file format, work with all kind of host
+#   filesystems and users (e.g. "nobody" or "root") and must not take too
+#   much memory and disk space (since CI pipelines tend to fail otherwise).
 #
 
 #
@@ -33,8 +35,8 @@
 011 rw auto quick
 012 auto quick
 013 rw auto
-014 rw auto
-015 rw snapshot auto
+014 rw
+015 rw snapshot
 # 016 was removed, do not reuse
 017 rw backing auto quick
 018 rw backing auto quick
@@ -42,7 +44,7 @@
 020 rw backing auto quick
 021 io auto quick
 022 rw snapshot auto
-023 rw auto
+023 rw
 024 rw backing auto quick
 025 rw auto quick
 026 rw blkdbg
@@ -78,94 +80,94 @@
 056 rw backing
 057 rw
 058 rw quick
-059 rw auto quick
+059 rw quick
 060 rw auto quick
 061 rw auto
 062 rw auto quick
 063 rw auto quick
-064 rw auto quick
+064 rw quick
 065 rw quick
 066 rw auto quick
 067 rw quick
 068 rw quick
 069 rw auto quick
-070 rw auto quick
+070 rw quick
 071 rw auto quick
 072 rw auto quick
 073 rw auto quick
 074 rw auto quick
-075 rw auto quick
-076 auto
-077 rw auto quick
-078 rw auto quick
+075 rw quick
+076 io
+077 rw quick
+078 rw quick
 079 rw auto
 080 rw auto
-081 rw auto quick
-082 rw auto quick
-083 rw auto
-084 img auto quick
+081 rw quick
+082 rw quick
+083 rw
+084 img quick
 085 rw
 086 rw auto quick
 087 rw quick
-088 rw auto quick
+088 rw quick
 089 rw auto quick
 090 rw auto quick
-091 rw auto migration
-092 rw auto quick
+091 rw migration
+092 rw quick
 093 throttle
-094 rw auto quick
+094 rw quick
 095 rw quick
 096 rw quick
 097 rw auto backing
 098 rw auto backing quick
 099 rw auto quick
 # 100 was removed, do not reuse
-101 rw auto quick
-102 rw auto quick
+101 rw quick
+102 rw quick
 103 rw auto quick
 104 rw auto
 105 rw auto quick
-106 rw auto quick
+106 rw quick
 107 rw auto quick
 108 rw auto quick
-109 rw auto
+109 rw
 110 rw auto backing quick
 111 rw auto quick
 112 rw
-113 rw auto quick
+113 rw quick
 114 rw auto quick
 115 rw
-116 rw auto quick
+116 rw quick
 117 rw auto
 118 rw
-119 rw auto quick
+119 rw quick
 120 rw auto quick
 121 rw
-122 rw auto
-123 rw auto quick
+122 rw
+123 rw quick
 124 rw backing
 125 rw
 126 rw auto backing
 127 rw backing quick
-128 rw auto quick
+128 rw quick
 129 rw quick
 130 rw auto quick
-131 rw auto quick
+131 rw quick
 132 rw quick
 133 auto quick
 134 rw auto quick
-135 rw auto
+135 rw
 136 rw
 137 rw auto
 138 rw auto quick
 139 rw quick
 140 rw auto quick
 141 rw auto quick
-142 auto
+142
 143 auto quick
 144 rw quick
 145 quick
-146 auto quick
+146 quick
 147 img
 148 rw quick
 149 rw sudo
@@ -179,23 +181,23 @@
 157 quick
 158 rw auto quick
 159 rw auto quick
-160 rw auto quick
+160 rw quick
 161 rw auto quick
 162 quick
 163 rw
 165 rw quick
 169 rw quick migration
 170 rw auto quick
-171 rw auto quick
+171 rw quick
 172 auto
-173 rw auto
+173 rw
 174 auto
-175 auto quick
+175 quick
 176 rw auto backing
 177 rw auto quick
 178 img
 179 rw auto quick
-181 rw auto migration
+181 rw migration
 182 rw quick
 183 rw migration
 184 rw auto quick
@@ -210,62 +212,62 @@
 194 rw migration quick
 195 rw auto quick
 196 rw quick migration
-197 rw auto quick
+197 rw quick
 198 rw
 199 rw migration
 200 rw
-201 rw auto migration
+201 rw migration
 202 rw quick
 203 rw migration
 204 rw quick
 205 rw quick
 206 rw
-207 rw auto
+207 rw
 208 rw quick
 209 rw quick
-210 rw auto
-211 rw auto quick
-212 rw auto quick
-213 rw auto quick
+210 rw
+211 rw quick
+212 rw quick
+213 rw quick
 214 rw auto
-215 rw auto quick
+215 rw quick
 216 rw quick
 217 rw auto quick
 218 rw quick
 219 rw
 220 rw auto
-221 rw auto quick
+221 rw quick
 222 rw quick
 223 rw quick
 224 rw quick
-225 rw auto quick
+225 rw quick
 226 auto quick
 227 quick
 228 rw quick
 229 auto quick
-231 auto quick
+231 quick
 232 quick
-233 auto quick
+233 quick
 234 quick migration
 235 quick
 236 quick
-237 rw auto quick
+237 rw quick
 238 quick
-239 rw auto quick
+239 rw quick
 240 quick
-241 rw auto quick
+241 rw quick
 242 rw quick
-243 rw auto quick
+243 rw quick
 244 rw auto quick
 245 rw
 246 rw quick
 247 rw quick
 248 rw quick
 249 rw auto quick
-250 rw auto quick
+250 rw quick
 251 rw auto quick
 252 rw auto backing quick
-253 rw auto quick
-254 rw auto backing quick
-255 rw auto quick
-256 rw auto quick
+253 rw quick
+254 rw backing quick
+255 rw quick
+256 rw quick
Signature · 1 line
2.20.1
#30 lore raw

PATCH v2 22/23 tests: Run the iotests during "make check" again

In reply to Alex Bennée

From: Thomas Huth <[email protected]>

People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the check-block.sh script.

Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures.

And finally, since we are using check-block.sh now again, this patch also removes the qemu-iotests-quick.sh script since we do not need that anymore (and having two shell wrapper scripts around the block tests seems rather confusing than helpful).

[AJB: -makecheck to check-block.sh, move check-block to start and gate it]

Message-Id: <[email protected]>

---
 tests/Makefile.include      | 10 +++++----
 tests/check-block.sh        | 44 ++++++++++++++++++++++++++++---------
 tests/qemu-iotests-quick.sh |  8 -------
 3 files changed, 40 insertions(+), 22 deletions(-)
 delete mode 100755 tests/qemu-iotests-quick.sh
tests/Makefile.include +6 -4
index fd7fdb86586..6f02dfcc019 100644
@@ -142,7 +142,7 @@ check-unit-y += tests/test-uuid$(EXESUF)
 check-unit-y += tests/ptimer-test$(EXESUF)
 check-unit-y += tests/test-qapi-util$(EXESUF)
 
-check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
+check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh
 
 # All QTests for now are POSIX-only, but the dependencies are
 # really in libqtest, not in the testcases themselves.
@@ -1092,8 +1092,10 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 
 QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
 
-.PHONY: check-tests/qemu-iotests-quick.sh
-check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y)
+.PHONY: check-tests/check-block.sh
+check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
+		qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
+		$(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
 	$<
 
 .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
@@ -1167,7 +1169,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR)
 check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) check-tests/qapi-schema/doc-good.texi
 check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
 check-block: $(patsubst %,check-%, $(check-block-y))
-check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
+check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
 check-clean:
 	rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
tests/check-block.sh +34 -10

58 lines not on this page · raw message

tests/qemu-iotests-quick.sh deleted +0 -8
deleted file mode 100755
index 0e554bb9724..00000000000
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd tests/qemu-iotests
-
-ret=0
-TEST_DIR=${TEST_DIR:-/tmp/qemu-iotests-quick-$$} ./check -T -qcow2 -g quick || ret=1
-
-exit $ret
Signature · 1 line
2.20.1
#31 lore raw

Re: [Qemu-devel] [PATCH v2 22/23] tests: Run the iotests during "make check" again

Quoted 137 lines · Alex Bennée

From: Thomas Huth <[email protected]>

People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the check-block.sh script.

Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures.

And finally, since we are using check-block.sh now again, this patch also removes the qemu-iotests-quick.sh script since we do not need that anymore (and having two shell wrapper scripts around the block tests seems rather confusing than helpful).

[AJB: -makecheck to check-block.sh, move check-block to start and gate it]

Message-Id: <[email protected]>

---
 tests/Makefile.include      | 10 +++++----
 tests/check-block.sh        | 44 ++++++++++++++++++++++++++++---------
 tests/qemu-iotests-quick.sh |  8 -------
 3 files changed, 40 insertions(+), 22 deletions(-)
 delete mode 100755 tests/qemu-iotests-quick.sh
tests/Makefile.include +6 -4
index fd7fdb86586..6f02dfcc019 100644
@@ -142,7 +142,7 @@ check-unit-y += tests/test-uuid$(EXESUF)
 check-unit-y += tests/ptimer-test$(EXESUF)
 check-unit-y += tests/test-qapi-util$(EXESUF)
 
-check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
+check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh
 
 # All QTests for now are POSIX-only, but the dependencies are
 # really in libqtest, not in the testcases themselves.
@@ -1092,8 +1092,10 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 
 QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
 
-.PHONY: check-tests/qemu-iotests-quick.sh
-check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y)
+.PHONY: check-tests/check-block.sh
+check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
+		qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
+		$(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
 	$<
 
 .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
@@ -1167,7 +1169,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR)
 check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) check-tests/qapi-schema/doc-good.texi
 check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
 check-block: $(patsubst %,check-%, $(check-block-y))
-check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
+check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
 check-clean:
 	rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
tests/check-block.sh +34 -10
index f3d12fd602d..c8b6cec3f68 100755
@@ -1,24 +1,48 @@
 #!/bin/sh
 
-FORMAT_LIST="raw qcow2 qed vmdk vpc"
+# Honor the SPEED environment variable, just like we do it for the qtests.
+if [ "$SPEED" = "slow" ]; then
+    format_list="raw qcow2"
+    group=
+elif [ "$SPEED" = "thorough" ]; then
+    format_list="raw qcow2 qed vmdk vpc"
+    group=
+else
+    format_list=qcow2
+    group="-g auto"
+fi
+
 if [ "$#" -ne 0 ]; then
-    FORMAT_LIST="$@"
+    format_list="$@"
+fi
+
+if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then
+    echo "GPROF is enabled ==> Not running the qemu-iotests."
+    exit 0
 fi
 
-export QEMU_PROG="$PWD/x86_64-softmmu/qemu-system-x86_64"
-export QEMU_IMG_PROG="$PWD/qemu-img"
-export QEMU_IO_PROG="$PWD/qemu-io"
+if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then
+    echo "No qemu-system binary available ==> Not running the qemu-iotests."
+    exit 0
+fi
+
+if ! command -v bash >/dev/null 2>&1 ; then
+    echo "bash not available ==> Not running the qemu-iotests."
+    exit 0
+fi
 
-if [ ! -x $QEMU_PROG ]; then
-    echo "'make check-block' requires qemu-system-x86_64"
-    exit 1
+if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
+    if ! command -v gsed >/dev/null 2>&1; then
+        echo "GNU sed not available ==> Not running the qemu-iotests."
+        exit 0
+    fi
 fi
 
 cd tests/qemu-iotests
 
 ret=0
-for FMT in $FORMAT_LIST ; do
-    ./check -T -nocache -$FMT || ret=1
+for fmt in $format_list ; do
+    ./check -makecheck -$fmt $group || ret=1
 done
 
 exit $ret
tests/qemu-iotests-quick.sh deleted +0 -0
deleted file mode 100755
index 0e554bb9724..00000000000

tests/qemu-iotests-quick.sh line 8

Quoted 8 lines
tests/qemu-iotests-quick.sh deleted +0 -8
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd tests/qemu-iotests
-
-ret=0
-TEST_DIR=${TEST_DIR:-/tmp/qemu-iotests-quick-$$} ./check -T -qcow2 -g quick || ret=1
-
-exit $ret

Since Gerd updated the OpenBSD image, do you know if we can run vm-test again?

I haven't check which what got merged from this previous series:
https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg07527.html

#32 lore raw

[Qemu-devel] make vm-build-openbsd (was: Re: [PATCH v2 22/23] tests: Run the iotests during "make check" again)

On 22/07/2019 21.53, Philippe Mathieu-Daudé wrote:
[...]

Quoted 2 lines

Since Gerd updated the OpenBSD image, do you know if we can run vm-test again?

I just tried it, but the OpenBSD build seems to be completely broken right now:

$ nice make vm-build-openbsd 
    VM-IMAGE openbsd 
### Downloading install iso ...
--2019-07-23 08:52:46--  https://cdn.openbsd.org/pub/OpenBSD/6.5/amd64/install65.iso
Resolving cdn.openbsd.org (cdn.openbsd.org)... 151.101.38.217
Connecting to cdn.openbsd.org (cdn.openbsd.org)|151.101.38.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 407169024 (388M) [application/octet-stream]
Saving to: ‘/home/thuth/.cache/qemu-vm/download/54ac74c2128d6c2d3ede38756576fe89c08476bd.download’

100%[=======================================================================>] 407.169.024 8,55MB/s in 39s

2019-07-23 08:53:25 (9,98 MB/s) - ‘/home/thuth/.cache/qemu-vm/download/54ac74c2128d6c2d3ede38756576fe89c08476bd.download’ saved [407169024/407169024]

### Preparing iso and disk image ...
Formatting '/home/thuth/.cache/qemu-vm/images/openbsd.img.tmp', fmt=qcow2 size=21474836480 cluster_size=65536 lazy_refcounts=off refcount_bits=16 ### Booting installer ...
console: *** read timeout ***
console: waiting for: 'timezone'
console: line buffer:

con recv: Which disk is the root disk? ('?' for details) [sd0]

Failed to prepare guest environment
Traceback (most recent call last):
File "/home/thuth/devel/qemu/tests/vm/basevm.py", line 353, in main
return vm.build_image(args.image)
File "/home/thuth/devel/qemu/tests/vm/openbsd", line 118, in build_image
self.console_wait_send("timezone", "UTC\n")
File "/home/thuth/devel/qemu/tests/vm/basevm.py", line 253, in console_wait_send
self.console_wait(wait)
File "/home/thuth/devel/qemu/tests/vm/basevm.py", line 215, in console_wait
chars = vm.console_socket.recv(1)
socket.timeout: timed out
make: *** [/home/thuth/.cache/qemu-vm/images/openbsd.img] Error 2

I even tried to delete the ~/.cache/qemu-vm folder, but that also did not help, I'm always getting that time-out now. Does it still work for you?

Thomas

#33 lore raw

Re: [Qemu-devel] make vm-build-openbsd (was: Re: [PATCH v2 22/23] tests: Run the iotests during "make check" again)

Quoted 43 lines · Thomas Huth

On 22/07/2019 21.53, Philippe Mathieu-Daudé wrote:
[...]

Quoted 2 lines

Since Gerd updated the OpenBSD image, do you know if we can run vm-test again?

I just tried it, but the OpenBSD build seems to be completely broken right now:

$ nice make vm-build-openbsd 
    VM-IMAGE openbsd 
### Downloading install iso ...
--2019-07-23 08:52:46--  https://cdn.openbsd.org/pub/OpenBSD/6.5/amd64/install65.iso
Resolving cdn.openbsd.org (cdn.openbsd.org)... 151.101.38.217
Connecting to cdn.openbsd.org (cdn.openbsd.org)|151.101.38.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 407169024 (388M) [application/octet-stream]
Saving to: ‘/home/thuth/.cache/qemu-vm/download/54ac74c2128d6c2d3ede38756576fe89c08476bd.download’

100%[=======================================================================>] 407.169.024 8,55MB/s in 39s

2019-07-23 08:53:25 (9,98 MB/s) - ‘/home/thuth/.cache/qemu-vm/download/54ac74c2128d6c2d3ede38756576fe89c08476bd.download’ saved [407169024/407169024]

### Preparing iso and disk image ...
Formatting '/home/thuth/.cache/qemu-vm/images/openbsd.img.tmp', fmt=qcow2 size=21474836480 cluster_size=65536 lazy_refcounts=off refcount_bits=16 ### Booting installer ...
console: *** read timeout ***
console: waiting for: 'timezone'
console: line buffer:

con recv: Which disk is the root disk? ('?' for details) [sd0]

Failed to prepare guest environment
Traceback (most recent call last):
File "/home/thuth/devel/qemu/tests/vm/basevm.py", line 353, in main
return vm.build_image(args.image)
File "/home/thuth/devel/qemu/tests/vm/openbsd", line 118, in build_image
self.console_wait_send("timezone", "UTC\n")
File "/home/thuth/devel/qemu/tests/vm/basevm.py", line 253, in console_wait_send
self.console_wait(wait)
File "/home/thuth/devel/qemu/tests/vm/basevm.py", line 215, in console_wait
chars = vm.console_socket.recv(1)
socket.timeout: timed out
make: *** [/home/thuth/.cache/qemu-vm/images/openbsd.img] Error 2

Quoted 3 lines

I even tried to delete the ~/.cache/qemu-vm folder, but that also did not help, I'm always getting that time-out now. Does it still work for you?

FWIW, it works again with this hack:

tests/vm/openbsd +1 -1
diff a/tests/vm/openbsd b/tests/vm/openbsd
@@ -115,7 +115,7 @@ class OpenBSDVM(basevm.BaseVM):
         self.console_send("%s\n" % self.GUEST_PASS)
 
         self.console_wait_send("Allow root ssh login",    "yes\n")
-        self.console_wait_send("timezone",                "UTC\n")
+        self.console_send("UTC\n")
         self.console_wait_send("root disk",               "\n")
         self.console_wait_send("(W)hole disk",            "\n")
         self.console_wait_send("(A)uto layout",           "\n")

¯\_(ツ)_/¯

Thomas

#34 lore raw

Re: [Qemu-devel] make vm-build-openbsd (was: Re: [PATCH v2 22/23] tests: Run the iotests during "make check" again)

In reply to Thomas Huth
Quoted 8 lines · Thomas Huth

On 22/07/2019 21.53, Philippe Mathieu-Daudé wrote:
[...]

Quoted 2 lines

Since Gerd updated the OpenBSD image, do you know if we can run vm-test again?

I just tried it, but the OpenBSD build seems to be completely broken right now:

$ nice make vm-build-openbsd 

Works fine here.
Can you try again with "V=1" ?

thanks,
Gerd

#35 lore raw

Re: [Qemu-devel] make vm-build-openbsd (was: Re: [PATCH v2 22/23] tests: Run the iotests during "make check" again)

Quoted 6 lines · Gerd Hoffmann
Quoted 5 lines · Thomas Huth

On 22/07/2019 21.53, Philippe Mathieu-Daudé wrote:
[...]

Quoted 2 lines

Since Gerd updated the OpenBSD image, do you know if we can run vm-test again?

Quoted 6 lines
Quoted 3 lines

I just tried it, but the OpenBSD build seems to be completely broken right now:

$ nice make vm-build-openbsd 

Works fine here.
Can you try again with "V=1" ?

Meanwhile, I've updated my system from RHEL7 to RHEL8, and now when I tried again, it's also working fine here. Must have been some oddity with RHEL7, I guess...

Anyway, thanks for checking,
Thomas

#36 lore raw

Re: [Qemu-devel] [PATCH v2 22/23] tests: Run the iotests during "make check" again

In reply to Philippe Mathieu-Daudé
Quoted 141 lines · Philippe Mathieu-Daudé
Quoted 140 lines · Alex Bennée

From: Thomas Huth <[email protected]>

People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the check-block.sh script.

Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures.

And finally, since we are using check-block.sh now again, this patch also removes the qemu-iotests-quick.sh script since we do not need that anymore (and having two shell wrapper scripts around the block tests seems rather confusing than helpful).

[AJB: -makecheck to check-block.sh, move check-block to start and gate it]

Message-Id: <[email protected]>

---
 tests/Makefile.include      | 10 +++++----
 tests/check-block.sh        | 44 ++++++++++++++++++++++++++++---------
 tests/qemu-iotests-quick.sh |  8 -------
 3 files changed, 40 insertions(+), 22 deletions(-)
 delete mode 100755 tests/qemu-iotests-quick.sh
tests/Makefile.include +6 -4
index fd7fdb86586..6f02dfcc019 100644
@@ -142,7 +142,7 @@ check-unit-y += tests/test-uuid$(EXESUF)
 check-unit-y += tests/ptimer-test$(EXESUF)
 check-unit-y += tests/test-qapi-util$(EXESUF)
 
-check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
+check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh
 
 # All QTests for now are POSIX-only, but the dependencies are
 # really in libqtest, not in the testcases themselves.
@@ -1092,8 +1092,10 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 
 QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
 
-.PHONY: check-tests/qemu-iotests-quick.sh
-check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y)
+.PHONY: check-tests/check-block.sh
+check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
+		qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
+		$(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
 	$<
 
 .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
@@ -1167,7 +1169,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR)
 check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) check-tests/qapi-schema/doc-good.texi
 check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
 check-block: $(patsubst %,check-%, $(check-block-y))
-check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
+check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
 check-clean:
 	rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
tests/check-block.sh +34 -10
index f3d12fd602d..c8b6cec3f68 100755
@@ -1,24 +1,48 @@
 #!/bin/sh
 
-FORMAT_LIST="raw qcow2 qed vmdk vpc"
+# Honor the SPEED environment variable, just like we do it for the qtests.
+if [ "$SPEED" = "slow" ]; then
+    format_list="raw qcow2"
+    group=
+elif [ "$SPEED" = "thorough" ]; then
+    format_list="raw qcow2 qed vmdk vpc"
+    group=
+else
+    format_list=qcow2
+    group="-g auto"
+fi
+
 if [ "$#" -ne 0 ]; then
-    FORMAT_LIST="$@"
+    format_list="$@"
+fi
+
+if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then
+    echo "GPROF is enabled ==> Not running the qemu-iotests."
+    exit 0
 fi
 
-export QEMU_PROG="$PWD/x86_64-softmmu/qemu-system-x86_64"
-export QEMU_IMG_PROG="$PWD/qemu-img"
-export QEMU_IO_PROG="$PWD/qemu-io"
+if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then
+    echo "No qemu-system binary available ==> Not running the qemu-iotests."
+    exit 0
+fi
+
+if ! command -v bash >/dev/null 2>&1 ; then
+    echo "bash not available ==> Not running the qemu-iotests."
+    exit 0
+fi
 
-if [ ! -x $QEMU_PROG ]; then
-    echo "'make check-block' requires qemu-system-x86_64"
-    exit 1
+if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
+    if ! command -v gsed >/dev/null 2>&1; then
+        echo "GNU sed not available ==> Not running the qemu-iotests."
+        exit 0
+    fi
 fi
 
 cd tests/qemu-iotests
 
 ret=0
-for FMT in $FORMAT_LIST ; do
-    ./check -T -nocache -$FMT || ret=1
+for fmt in $format_list ; do
+    ./check -makecheck -$fmt $group || ret=1
 done
 
 exit $ret
tests/qemu-iotests-quick.sh deleted +0 -4
deleted file mode 100755
index 0e554bb9724..00000000000
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd tests/qemu-iotests
-
Quoted 8 lines

tests/qemu-iotests-quick.sh line 8

Quoted 5 lines
tests/qemu-iotests-quick.sh deleted +0 -4
-ret=0
-TEST_DIR=${TEST_DIR:-/tmp/qemu-iotests-quick-$$} ./check -T -qcow2 -g quick || ret=1
-
-exit $ret

Since Gerd updated the OpenBSD image, do you know if we can run vm-test again?

Oh well, looks like many iotests are failing since the "seq" program is missing:

Failures: 007 011 017 020 022 025 032 035 037 046

Seems like "gseq" is available in the "coreutils" package, but only with the different name...

Maybe we should rather replace the "for i in seq ..." loops with "for ((i=...))", especially since we require bash in the tests anyway?

Thomas

#37 lore raw

PATCH v2 23/23 gitlab-ci: Remove qcow2 tests that are handled by "make check" already

In reply to Alex Bennée

From: Thomas Huth <[email protected]>

Since most iotests are now run during "make check" already, we do not need to test them explicitly from the gitlab-ci.yml script anymore. And while we're at it, add some of the new non-auto tests >= 246 instead.

Message-Id: <[email protected]>

---
 .gitlab-ci.yml | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
.gitlab-ci.yml +4 -9
index c63bf2f8225..cd4c03372b8 100644
@@ -45,15 +45,10 @@ build-tcg-disabled:
  - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
             052 063 077 086 101 104 106 113 147 148 150 151 152 157 159 160
             163 170 171 183 184 192 194 197 205 208 215 221 222 226 227 236
- - ./check -qcow2 001 002 003 004 005 007 008 009 010 011 012 013 017 018 019
-            020 021 022 024 025 027 028 029 031 032 033 034 035 036 037 038
-            039 040 042 043 046 047 048 049 050 051 052 053 054 056 057 058
-            060 061 062 063 065 066 067 068 069 071 072 073 074 079 080 082
-            085 086 089 090 091 095 096 097 098 099 102 103 104 105 107 108
-            110 111 114 117 120 122 124 126 127 129 130 132 133 134 137 138
-            139 140 141 142 143 144 145 147 150 151 152 154 155 156 157 158
-            161 165 170 172 174 176 177 179 184 186 187 190 192 194 195 196
-            197 200 202 203 205 208 209 214 215 216 217 218 222 226 227 229 234
+ - ./check -qcow2 028 040 051 056 057 058 065 067 068 082 085 091 095 096 102
+            122 124 127 129 132 139 142 144 145 147 151 152 155 157 165 194
+            196 197 200 202 203 205 208 209 215 216 218 222 227 234 246 247
+            248 250 254 255 256
 
 build-user:
  script:
Signature · 1 line
2.20.1
#38 lore raw
In reply to Alex Bennée
Quoted 4 lines · Alex Bennée

Hi,

This is my current queue for testing/next which I shall submit a PR for on Tuesday in time for rc2. This update adds:

Ping, any more comments or reviews before I tag up a PR?

--
Alex Bennée