Commit Graph

8871 Commits

Author SHA1 Message Date
Philippe Mathieu-Daudé 972d325a8d tests/unit/test-vmstate: Avoid dynamic stack allocation
Use autofree heap allocation instead of variable-length
array on the stack.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220819153931.3147384-12-peter.maydell@linaro.org
2022-09-22 16:38:28 +01:00
Stefan Hajnoczi 8f3aeb012f Testing and CI changes:
- reduce number of targets for cross_user_build
   - update avocado xlnx_versal test with new binaries
   - add explicit timeouts to a number of avocado TCG tests
   - reduce default timeout to 120s
   - update lcitool to support cross-amd64
   - flatten a number of docker cross containers
   - clean up stale qemu/debian10 dependencies
   - remove obsolete Fedora VM test
   - add configure workaround for meson --disable-pie bug
   - disable --static-pie for aarch64 gitlab runner
   - update aarch32/aarch64 jobs to 22.04
   - deprecate 32 bit big-endian MIPS as a host
   - remove FROM qemu/ support from docker.py
   - remove Debian base images now everything is flat
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmMp8Q8ACgkQ+9DbCVqe
 KkQmlwf/awT+jOmAW7TjlQnUTgHJ2hyOo7EViY/nmRkPOCT3ZG32pWFHBorHPX7s
 BeqZzpzCvhzaIfObnjIssx13C5QId5XjJGuTgMAnSsGhzTrp7VUJc1/bBfHcD9L2
 dJJduG+bfAkh95heBkry5EhFt2ZMui5yv9DjEH44hUUc9nwKtIQGts3H3fnVqzvv
 rzLZ7c2lhdLpAxHjmjSiiD8H59lJ+DpoziaobW4D7teGgecnyGVvJ9m1YH4Rc+kM
 gpLTOGMhADkQlysf5e5cvxXSJbP7YpXYrsr9X+DfEy5PMt2L3y4Yv0wiAz9ClYvm
 obD4wMQS5echYvb77qS1G8A0VMEPqA==
 =3oYu
 -----END PGP SIGNATURE-----

Merge tag 'pull-testing-next-200922-2' of https://github.com/stsquad/qemu into staging

Testing and CI changes:

  - reduce number of targets for cross_user_build
  - update avocado xlnx_versal test with new binaries
  - add explicit timeouts to a number of avocado TCG tests
  - reduce default timeout to 120s
  - update lcitool to support cross-amd64
  - flatten a number of docker cross containers
  - clean up stale qemu/debian10 dependencies
  - remove obsolete Fedora VM test
  - add configure workaround for meson --disable-pie bug
  - disable --static-pie for aarch64 gitlab runner
  - update aarch32/aarch64 jobs to 22.04
  - deprecate 32 bit big-endian MIPS as a host
  - remove FROM qemu/ support from docker.py
  - remove Debian base images now everything is flat

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmMp8Q8ACgkQ+9DbCVqe
# KkQmlwf/awT+jOmAW7TjlQnUTgHJ2hyOo7EViY/nmRkPOCT3ZG32pWFHBorHPX7s
# BeqZzpzCvhzaIfObnjIssx13C5QId5XjJGuTgMAnSsGhzTrp7VUJc1/bBfHcD9L2
# dJJduG+bfAkh95heBkry5EhFt2ZMui5yv9DjEH44hUUc9nwKtIQGts3H3fnVqzvv
# rzLZ7c2lhdLpAxHjmjSiiD8H59lJ+DpoziaobW4D7teGgecnyGVvJ9m1YH4Rc+kM
# gpLTOGMhADkQlysf5e5cvxXSJbP7YpXYrsr9X+DfEy5PMt2L3y4Yv0wiAz9ClYvm
# obD4wMQS5echYvb77qS1G8A0VMEPqA==
# =3oYu
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 20 Sep 2022 12:57:51 EDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-testing-next-200922-2' of https://github.com/stsquad/qemu: (30 commits)
  tests/docker: remove the Debian base images
  tests/docker: remove FROM qemu/ support from docker.py
  tests/docker: update and flatten debian-toolchain
  tests/docker: update and flatten debian-hexagon-cross
  tests/docker: update and flatten debian-loongarch-cross
  tests/docker: update and flatten debian-amd64-cross
  tests/lcitool: bump to latest version
  tests/docker: update and flatten debian-all-test-cross
  tests/docker: flatten debian-riscv64-test-cross
  Deprecate 32 bit big-endian MIPS
  gitlab-ci: update aarch32/aarch64 custom runner jobs
  gitlab-ci/custom-runners: Disable -static-pie for ubuntu-20.04-aarch64
  configure: explicitly set cflags for --disable-pie
  tests/vm: Remove obsolete Fedora VM test
  tests/docker: remove amd64 qemu/debian10 dependency
  tests/docker: remove tricore qemu/debian10 dependency
  tests/docker: flatten debian-powerpc-test-cross
  tests/docker: update and flatten debian-sparc64-cross
  tests/docker: update and flatten debian-sh4-cross
  tests/docker: update and flatten debian-mips64-cross
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2022-09-21 13:10:51 -04:00
Stefan Hajnoczi 2906f933dd * Skip tests if the corresponding feature is missing
* Update NetBSD VM test to version 9.3
 * Update the FreeBSD CI to version 13.1
 * Some small fixes for the qtests
 * Update wordings in the QEMU guest-agent
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmMpvqURHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbXtaQ//ap4P8Gdg7HyShflpHj3+Z+UC/THtcCAD
 F5Oj/E89wYJZJvWpjELLUf+218O+zbcKkv6z25AHo37JRSLQMzsD21RpDYcu8qnN
 Xk77KrOLFaVRRo6e3FAi5I+uWsm1h/9jJfC/sFrzfKGnWcW5pTzXUkbvWT3LZo/q
 d0wJCMn/+h0j6kqhjm8mhFCsGsSaUKFCMzm/6rsWxVsMsVnlTyYhg/IzhocKrkVD
 9ZWz+jAv+h4F0CLl/SeRvZFq4LEGZoP3KHWrDAgEO9i1yC+tNpGDFyV/hJXwapcm
 jYGaPPgS2dLToMXf5uubfmyptircQKqdpC2Hl8UwgUS6OgwA2YRCxad8rrrdBezq
 2Nb8KissVB8ySL1Asf00gxioJNwLKrY+4NIeDVxAQ56f1/9kd0w0ylrweR492V/p
 z3Yrs3uqqALR1jWfB7/Rh4EN2R0oe6bnlfb8bB6lzPKynXQicZLeoOnNPbkOQMw8
 HgjKVFT130ydXJKMJkgEQmi4JUGoaKqSKCmlSaHz9TAobwNiVBXaH0cyuX5QEuoX
 WgZosiF5nBzdbhkC2IPcQYHzIIkelfx9j9mKE0PNfUSkFgMiywcI5TfqabPWGeaA
 rxYPU4EZmbgCZPlBVdPFwog/BXap2EIo9+xtINM0COQDoy+Q/l5Z3keHhpjayBBS
 qWc6CRSmhLs=
 =sHK+
 -----END PGP SIGNATURE-----

Merge tag 'pull-request-2022-09-20' of https://gitlab.com/thuth/qemu into staging

* Skip tests if the corresponding feature is missing
* Update NetBSD VM test to version 9.3
* Update the FreeBSD CI to version 13.1
* Some small fixes for the qtests
* Update wordings in the QEMU guest-agent

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmMpvqURHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbXtaQ//ap4P8Gdg7HyShflpHj3+Z+UC/THtcCAD
# F5Oj/E89wYJZJvWpjELLUf+218O+zbcKkv6z25AHo37JRSLQMzsD21RpDYcu8qnN
# Xk77KrOLFaVRRo6e3FAi5I+uWsm1h/9jJfC/sFrzfKGnWcW5pTzXUkbvWT3LZo/q
# d0wJCMn/+h0j6kqhjm8mhFCsGsSaUKFCMzm/6rsWxVsMsVnlTyYhg/IzhocKrkVD
# 9ZWz+jAv+h4F0CLl/SeRvZFq4LEGZoP3KHWrDAgEO9i1yC+tNpGDFyV/hJXwapcm
# jYGaPPgS2dLToMXf5uubfmyptircQKqdpC2Hl8UwgUS6OgwA2YRCxad8rrrdBezq
# 2Nb8KissVB8ySL1Asf00gxioJNwLKrY+4NIeDVxAQ56f1/9kd0w0ylrweR492V/p
# z3Yrs3uqqALR1jWfB7/Rh4EN2R0oe6bnlfb8bB6lzPKynXQicZLeoOnNPbkOQMw8
# HgjKVFT130ydXJKMJkgEQmi4JUGoaKqSKCmlSaHz9TAobwNiVBXaH0cyuX5QEuoX
# WgZosiF5nBzdbhkC2IPcQYHzIIkelfx9j9mKE0PNfUSkFgMiywcI5TfqabPWGeaA
# rxYPU4EZmbgCZPlBVdPFwog/BXap2EIo9+xtINM0COQDoy+Q/l5Z3keHhpjayBBS
# qWc6CRSmhLs=
# =sHK+
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 20 Sep 2022 09:22:45 EDT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2022-09-20' of https://gitlab.com/thuth/qemu:
  qga: Replace 'blacklist' and 'whitelist' in the guest agent sources
  qga: Replace 'blacklist' command line and config file options by 'block-rpcs'
  gitlab-ci: Update the FreeBSD 13 job from 13.0 to 13.1
  tests: sb16 has both pc and q35 tests
  tests: Only run intel-hda-tests if machine type is compiled in
  bios-tables-test: Only run test for machine types compiled in
  bios-tables-test: Sort all x86_64 tests by machine type
  bios-tables-test: Make oem-fields tests be consistent
  meson-build: Enable CONFIG_REPLICATION only when replication is set
  tests: Fix error strings
  qtest/fuzz-lsi53c895a-test: set guest RAM to 2G
  tests/qtest: npcm7xx-emc-test: Skip checking MAC
  .gitlab-ci.d/windows.yml: Drop the sed processing in the 64-bit build
  tests/vm: update NetBSD to 9.3
  tests: mark io-command test as skipped if socat is missing

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2022-09-20 16:24:07 -04:00
Alex Bennée d996f0aeb2 tests/docker: remove the Debian base images
We no longer use these in any of our images. Clean-up the remaining
comments and documentation that reference them and remove from the
build.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-31-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée 07056db1b5 tests/docker: remove FROM qemu/ support from docker.py
We want to migrate from docker.py to building our images directly with
docker/podman. Before we get there we need to make sure we don't
re-introduce our layered builds so bug out if we see FROM qemu/ in a
Dockerfile.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-30-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée 4239162add tests/docker: update and flatten debian-toolchain
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile as we do not need anything from the base image to
build the toolchain. This is used to build both the nios and
microblaze toolchains.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-29-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée 581cd47fe5 tests/docker: update and flatten debian-hexagon-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile as we do not some of the extraneous packages from
the base image to build the toolchain.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-28-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée 35782a1b9a tests/docker: update and flatten debian-loongarch-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We really don't need the rest of the stuff from the
QEMU base image just to compile test images. In this case it is a
binary distribution of the toolchain anyway.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-27-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée cd150e19e8 tests/docker: update and flatten debian-amd64-cross
Now lcitool has support for building a x86_64 cross image we can use
it for this.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-26-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée 8bb499955e tests/lcitool: bump to latest version
We need this to be able to cleanly build the x86 cross images. There
are a few minor updates triggered by lcitool-refresh including adding
"libslirp" to the freebsd vars and opensuse-leap which will help when
we finally drop the slirp submodule from QEMU.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-25-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée b6fafe5b3e tests/docker: update and flatten debian-all-test-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We also need to ensure we install clang as it is
used for those builds as well.

It would be nice to port this to lcitool but for now this will do.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-24-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée fab08026a2 tests/docker: flatten debian-riscv64-test-cross
Flatten into a single dockerfile and update to match the rest of the
test cross compile dockerfiles.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-23-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Alex Bennée 54ab3c3fee Deprecate 32 bit big-endian MIPS
It's becoming harder to maintain a cross-compiler to test this host
architecture as the old stable Debian 10 ("Buster") moved into LTS
which supports fewer architectures. For now:

  - mark it's deprecation in the docs
  - downgrade the containers to build TCG tests only
  - drop the cross builds from our CI

Users with an appropriate toolchain and user-space can still take
their chances building it.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-22-alex.bennee@linaro.org>
2022-09-20 17:22:08 +01:00
Thomas Huth 3c696fdc59 tests/vm: Remove obsolete Fedora VM test
It's still based on Fedora 30 - which is not supported anymore by QEMU
since years. Seems like nobody is using (and refreshing) this, and it's
easier to test this via a container anyway, so let's remove this now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220822175317.190551-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220914155950.804707-18-alex.bennee@linaro.org>
2022-09-20 16:27:39 +01:00
Alex Bennée 0068cf8bd2 tests/docker: remove amd64 qemu/debian10 dependency
We missed removing this dependency when we flattened the build.

Fixes 9e19fd7d4a (tests/docker: update debian-amd64 with lcitool)

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-17-alex.bennee@linaro.org>
2022-09-20 16:27:35 +01:00
Alex Bennée 95b0af40de tests/docker: remove tricore qemu/debian10 dependency
We missed removing this dependency when we flattened the build.

Fixes: 39ce923732 (gitlab: enable a very minimal build with the tricore container)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-16-alex.bennee@linaro.org>
2022-09-20 16:27:35 +01:00
Alex Bennée 0fd8f7a2df tests/docker: flatten debian-powerpc-test-cross
Flatten into a single dockerfile. We really don't need the rest of the
stuff from the QEMU base image just to compile test images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-15-alex.bennee@linaro.org>
2022-09-20 16:27:31 +01:00
Alex Bennée 6ede0767ba tests/docker: update and flatten debian-sparc64-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We really don't need the rest of the stuff from
the QEMU base image just to compile test images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-14-alex.bennee@linaro.org>
2022-09-20 16:27:28 +01:00
Alex Bennée 376c4109af tests/docker: update and flatten debian-sh4-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We really don't need the rest of the stuff from
the QEMU base image just to compile test images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-13-alex.bennee@linaro.org>
2022-09-20 16:27:24 +01:00
Alex Bennée 2d2a154be7 tests/docker: update and flatten debian-mips64-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We really don't need the rest of the stuff from
the QEMU base image just to compile test images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-12-alex.bennee@linaro.org>
2022-09-20 16:27:20 +01:00
Alex Bennée 7785500236 tests/docker: update and flatten debian-m68k-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We really don't need the rest of the stuff from
the QEMU base image just to compile test images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-11-alex.bennee@linaro.org>
2022-09-20 16:27:17 +01:00
Alex Bennée 8b03418760 tests/docker: update and flatten debian-hppa-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We really don't need the rest of the stuff from
the QEMU base image just to compile test images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-10-alex.bennee@linaro.org>
2022-09-20 16:27:12 +01:00
Alex Bennée d9df358f53 tests/docker: update and flatten debian-alpha-cross
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile. We really don't need the rest of the stuff from
the QEMU base image just to compile test images.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-9-alex.bennee@linaro.org>
2022-09-20 16:27:08 +01:00
Alex Bennée 8f58f0c7d9 tests/avocado: reduce the default timeout to 120s
We should be aiming to keep our tests under 2 minutes so lets reduce
the default timeout to that. Tests that we know take longer should
explicitly set a longer timeout.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-8-alex.bennee@linaro.org>
2022-09-20 16:27:04 +01:00
Alex Bennée 92f8e8e2fe tests/avocado: split the AST2x00Machine classes
The SDK tests take a lot longer to run and hence need a longer
timeout. As they run well over the 60 second maximum for CI lets also
disable them for CI as well.

I suspect they also suffer from the inability to detect the login
prompt due to no newlines being processed.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-7-alex.bennee@linaro.org>
2022-09-20 16:26:56 +01:00
Alex Bennée b247dba067 tests/avocado: add explicit timeout for ppc64le TCG tests
We don't want to rely on the soon to be reduced default time. These
tests are still slow for something we want to run in CI though.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-6-alex.bennee@linaro.org>
2022-09-20 15:14:59 +01:00
Alex Bennée 06a4c9cf24 tests/avocado: add explicit timeout for s390 TCG tests
We don't want to rely on the soon to be reduced default time. These
tests are still slow for something we want to run in CI though.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220914155950.804707-5-alex.bennee@linaro.org>
2022-09-20 15:14:59 +01:00
Alex Bennée c7f059ac11 tests/avocado: add explicit timeout for Aarch64 TCG tests
We don't want to rely on the soon to be reduced default time. These
tests are still slow for something we want to run in CI though.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-4-alex.bennee@linaro.org>
2022-09-20 15:14:59 +01:00
Thomas Huth 7fcc3f7595 tests/avocado/boot_linux_console: Fix the test_aarch64_xlnx_versal_virt test
The assets that this test tries to download have been removed from the
server. Update to a newer version to get it working again.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220829080940.110831-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220914155950.804707-3-alex.bennee@linaro.org>
2022-09-20 15:14:59 +01:00
Thomas Huth 582a098e6c qga: Replace 'blacklist' command line and config file options by 'block-rpcs'
Let's use a more appropriate wording for this command line and config
file option. The old ones are still accepted for compatibility reasons,
but marked as deprecated now so that it could be removed in a future
version of QEMU.

This change is based on earlier patches from Philippe Mathieu-Daudé,
with the idea for the new option name suggested by BALATON Zoltan.

And while we're at it, replace the "?" in the help text with "help"
since that does not have the problem of conflicting with the wildcard
character of the shells.

Message-Id: <20220727092135.302915-2-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-20 12:37:00 +02:00
Juan Quintela 1dbea81852 tests: sb16 has both pc and q35 tests
Check that the machines are compiled in before calling it

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220902173452.1904-6-quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-20 12:34:31 +02:00
Juan Quintela 08ed0988d6 tests: Only run intel-hda-tests if machine type is compiled in
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220902173452.1904-5-quintela@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-20 12:34:31 +02:00
Juan Quintela 34b1f2c620 bios-tables-test: Only run test for machine types compiled in
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220902173452.1904-4-quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-20 12:34:31 +02:00
Juan Quintela d007981ae1 bios-tables-test: Sort all x86_64 tests by machine type
No code change here, just move test around.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220902173452.1904-3-quintela@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-20 12:34:31 +02:00
Juan Quintela b3ad62c14f bios-tables-test: Make oem-fields tests be consistent
Every other test function is named:

	test_acpi_<machine>_<test>()

Just make this test the same.  Once there, rename "acpi/oem-fields" to
"acpi/piix4/oem-fields" so it is consistent with everything else.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220902173452.1904-2-quintela@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-20 12:34:31 +02:00
Juan Quintela a65c9527fd tests: Fix error strings
They were copy-pasted from e1000e and never changed.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220902165126.1482-7-quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-20 11:23:02 +02:00
Paolo Bonzini e121d7606b tests/tcg: remove old SSE tests
The new testsuite is much more comprehensive, so remove the old one;
it is also buggy (the pinsrw test uses incorrect constraints, with =
instead of +, and the golden output for the fxsave tests differs depending
on how the C library uses SSE and AVX instructions).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-19 15:15:59 +02:00
Paolo Bonzini e02907cc12 tests/tcg: refine MMX support in SSE tests
Extend the support to memory operands, and skip MMX instructions that
were introduced in SSE times, because they are now covered in test-mmx.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-19 15:15:59 +02:00
Paolo Bonzini fa7ce0b028 tests/tcg: i386: add MMX and 3DNow! tests
Adjust the test-avx.py generator to produce tests specifically for
MMX and 3DNow.  Using a separate generator introduces some code
duplication, but is a simpler approach because of test-avx's extra
complexity to support 3- and 4-operand AVX instructions.

If needed, a common library can be introduced later.

While at it, for consistency move all the -cpu max rules to the
same place.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-19 15:14:40 +02:00
Mauro Matteo Cascella a772ddc1c0 qtest/fuzz-lsi53c895a-test: set guest RAM to 2G
test_lsi_do_msgout_cancel_req does not run on machines with small size
memory. Reduce guest memory from 4G to 2G to alleviate the problem.

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Message-Id: <20220902133853.834065-1-mcascell@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-19 15:12:28 +02:00
Patrick Venture d1592cbe07 tests/qtest: npcm7xx-emc-test: Skip checking MAC
The register tests walks all the registers to verify they are initially
0 when appropriate.  However, if the MAC address is set in the register
space, this should not be checked against 0.

Reviewed-by: Hao Wu <wuhaotsh@google.com>
Signed-off-by: Patrick Venture <venture@google.com>
Message-Id: <20220906163138.2831353-1-venture@google.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-19 15:12:28 +02:00
Brad Smith 5bf0602522 tests/vm: update NetBSD to 9.3
Update NetBSD to 9.3

Signed-off-by: Brad Smith <brad@comstyle.com>
Message-Id: <YxacoSbT1cZR4SKr@humpty.home.comstyle.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-19 15:12:28 +02:00
Marc-André Lureau 525207cd77 tests: mark io-command test as skipped if socat is missing
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220901110414.2892954-1-marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-09-19 15:12:28 +02:00
Paolo Bonzini 4ce4a1a714 tests/tcg: i386: fix typos in 3DNow! instructions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-18 09:17:41 +02:00
Paolo Bonzini b3a58a6ae3 tests: unit: add NULL-pointer check
In CID 1432593, Coverity complains that the result of qdict_crumple()
might leak if it is not a dictionary.  This is not a practical concern
since the test would fail immediately with a NULL pointer dereference
in qdict_size().

However, it is not nice to depend on qdict_size() crashing, so add an
explicit assertion that that the crumpled object was indeed a dictionary.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-18 09:17:41 +02:00
Paolo Bonzini 5dc5110039 tests: test-qga: close socket on failure to connect
Reported by Coverity as CID 1432543.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-18 09:17:41 +02:00
Paolo Bonzini ac9e723fb6 tests: unit: simplify test-visitor-serialization list tests
test-visitor-serialization list tests is using an "if" to pick either the first
element of the list or the next one.  This was done presumably to mimic the
code that creates the list, which has to fill in either the head pointer
or the next pointer of the last element.  However, the code in the insert
phase is a pretty standard singly-linked list insertion, while the one
in the visit phase looks weird and even looks at the first item twice:
this is confusing because the test puts in 32 items and finishes with
an assertion that i == 33.

So, move the "else" step in a separate switch statement, and change
the do...while loop to a while, because cur_head has already been
initialized beforehand.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-09-18 09:17:40 +02:00
Richard Henderson 00c07344fa target/riscv: Make translator stop before the end of a page
Right now the translator stops right *after* the end of a page, which
breaks reporting of fault locations when the last instruction of a
multi-insn translation block crosses a page boundary.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1155
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-09-06 08:04:26 +01:00
Ilya Leoshkevich 950936681f target/i386: Make translator stop before the end of a page
Right now translator stops right *after* the end of a page, which
breaks reporting of fault locations when the last instruction of a
multi-insn translation block crosses a page boundary.

An implementation, like the one arm and s390x have, would require an
i386 length disassembler, which is burdensome to maintain. Another
alternative would be to single-step at the end of a guest page, but
this may come with a performance impact.

Fix by snapshotting disassembly state and restoring it after we figure
out we crossed a page boundary. This includes rolling back cc_op
updates and emitted ops.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1143
Message-Id: <20220817150506.592862-4-iii@linux.ibm.com>
[rth: Simplify end-of-insn cross-page checks.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-09-06 08:04:26 +01:00
Ilya Leoshkevich ab12c95d3f target/s390x: Make translator stop before the end of a page
Right now translator stops right *after* the end of a page, which
breaks reporting of fault locations when the last instruction of a
multi-insn translation block crosses a page boundary.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220817150506.592862-3-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-09-06 08:04:26 +01:00