qtests and misc patches
Hi Peter,
the following changes since commit 500efcfcf0fe2e0dae1d25637a13435ce7b6e421:
Merge remote-tracking branch 'remotes/rth/tags/pull-or1k-20190904' into staging (2019-09-05 09:33:01 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-09-05-v2
for you to fetch changes up to e7dc804ef0d7cac9ac8b4a1324ab7dbfafb55704:
gitlab-ci.yml: Install libattr-devel and libcap-devel to test virtio-9p (2019-09-05 16:00:01 +0200)
----------------------------------------------------------------
- Make the core libqtest library independent from global_qtest
- Clean up docs from hard-coded qemu-system-* names
- Install libattr-dev and libcap-dev in gitlab-ci to test virtio-9p
----------------------------------------------------------------
Thomas Huth (9):
tests/migration: Do not use functions anymore that rely on global_qtest tests/libqos/e1000e: Make e1000e libqos functions independent from global_qtest tests/libqos: Replace clock_step with qtest_clock_step in virtio code
tests: Remove unnecessary global_qtest references
tests/libqtest: Move global_test wrapper function into a separate header tests/libqtest: Use libqtest-single.h in tests that require global_qtest tests/vm: Take the J=x setting into account for the vm-boot-ssh targets, too
qemu-doc: Do not hard-code the name of the QEMU binary gitlab-ci.yml: Install libattr-devel and libcap-devel to test virtio-9p
.gitlab-ci.yml | 2 +- MAINTAINERS | 2 +- docs/qemu-block-drivers.texi | 72 +++++----- docs/qemu-cpu-models.texi | 10 +- qemu-doc.texi | 81 +++++------ qemu-options.hx | 128 ++++++++--------- tests/ahci-test.c | 1 - tests/bios-tables-test.c | 1 - tests/cpu-plug-test.c | 2 +- tests/display-vga-test.c | 2 +- tests/e1000e-test.c | 2 +- tests/fdc-test.c | 2 +- tests/i440fx-test.c | 2 +- tests/i82801b11-test.c | 2 +- tests/intel-hda-test.c | 2 +- tests/ioh3420-test.c | 2 +- tests/ipmi-kcs-test.c | 3 +- tests/ivshmem-test.c | 3 - tests/libqos/e1000e.c | 16 ++- tests/libqos/virtio-mmio.c | 14 +- tests/libqos/virtio-pci.c | 14 +- tests/libqos/virtio.c | 20 +-- tests/libqos/virtio.h | 6 +- tests/libqtest-single.h | 315 ++++++++++++++++++++++++++++++++++++++++++ tests/libqtest.c | 13 -- tests/libqtest.h | 289 -------------------------------------- tests/m25p80-test.c | 2 +- tests/migration-test.c | 6 +- tests/qos-test.c | 2 +- tests/rtas-test.c | 1 - tests/rtc-test.c | 2 +- tests/rtl8139-test.c | 2 +- tests/test-arm-mptimer.c | 2 +- tests/test-netfilter.c | 2 +- tests/test-x86-cpuid-compat.c | 2 +- tests/tmp105-test.c | 2 +- tests/tpm-crb-test.c | 2 +- tests/tpm-tests.c | 2 +- tests/tpm-tis-test.c | 2 +- tests/usb-hcd-ohci-test.c | 2 +- tests/usb-hcd-uhci-test.c | 2 +- tests/usb-hcd-xhci-test.c | 2 +- tests/vhost-user-test.c | 2 +- tests/virtio-9p-test.c | 2 +- tests/virtio-blk-test.c | 5 +- tests/virtio-ccw-test.c | 2 +- tests/virtio-net-test.c | 2 +- tests/virtio-scsi-test.c | 2 +- tests/virtio-serial-test.c | 2 +- tests/vm/Makefile.include | 1 + 50 files changed, 548 insertions(+), 511 deletions(-) create mode 100644 tests/libqtest-single.h
[Qemu-devel] [PULL v2 6/9] tests/libqtest: Use libqtest-single.h in tests that require global_qtest
Tests that require global_qtest or the related wrapper functions now use the libqtest-single.h header that is dedicated for everything related to global_qtest. The core libqtest.c and libqtest.h files are now completely indepedent from global_qtest, so that the core library is now not depending on a global state anymore.
Message-Id: <[email protected]>
--- tests/cpu-plug-test.c | 2 +- tests/display-vga-test.c | 2 +- tests/e1000e-test.c | 2 +- tests/fdc-test.c | 2 +- tests/i440fx-test.c | 2 +- tests/i82801b11-test.c | 2 +- tests/intel-hda-test.c | 2 +- tests/ioh3420-test.c | 2 +- tests/ipmi-kcs-test.c | 3 +-- tests/libqtest-single.h | 4 ++++ tests/libqtest.c | 2 -- tests/libqtest.h | 4 ---- tests/m25p80-test.c | 2 +- tests/qos-test.c | 2 +- tests/rtc-test.c | 2 +- tests/rtl8139-test.c | 2 +- tests/test-arm-mptimer.c | 2 +- tests/test-netfilter.c | 2 +- tests/test-x86-cpuid-compat.c | 2 +- tests/tmp105-test.c | 2 +- tests/tpm-crb-test.c | 2 +- tests/tpm-tests.c | 2 +- tests/tpm-tis-test.c | 2 +- tests/usb-hcd-ohci-test.c | 2 +- tests/usb-hcd-uhci-test.c | 2 +- tests/usb-hcd-xhci-test.c | 2 +- tests/vhost-user-test.c | 2 +- tests/virtio-9p-test.c | 2 +- tests/virtio-blk-test.c | 2 +- tests/virtio-ccw-test.c | 2 +- tests/virtio-net-test.c | 2 +- tests/virtio-scsi-test.c | 2 +- tests/virtio-serial-test.c | 2 +- 33 files changed, 34 insertions(+), 37 deletions(-)
tests/cpu-plug-test.c +1 -1
@@ -10,7 +10,7 @@#include "qemu/osdep.h" #include "qemu-common.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qapi/qmp/qdict.h" struct PlugTestData {
tests/display-vga-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" static void pci_cirrus (void ) {
tests/e1000e-test.c +1 -1
@@ -26,7 +26,7 @@#include "qemu/osdep.h" #include "qemu-common.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu-common.h" #include "libqos/pci-pc.h" #include "qemu/sockets.h"
tests/fdc-test.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qapi/qmp/qdict.h" #include "qemu-common.h"
tests/i440fx-test.c +1 -1
@@ -14,7 +14,7 @@#include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "libqos/pci.h" #include "libqos/pci-pc.h" #include "hw/pci/pci_regs.h"
tests/i82801b11-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/intel-hda-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #define HDA_ID "hda0"#define CODEC_DEVICES " -device hda-output,bus=" HDA_ID ".0" \
tests/ioh3420-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/ipmi-kcs-test.c +1 -2
@@ -24,8 +24,7 @@#include "qemu/osdep.h" - -#include "libqtest.h" +#include "libqtest-single.h" #define IPMI_IRQ 5
tests/libqtest-single.h +4 -0
@@ -11,6 +11,10 @@#ifndef LIBQTEST_SINGLE_H #define LIBQTEST_SINGLE_H +#include "libqtest.h" + +QTestState *global_qtest __attribute__((common, weak)); +/** * qtest_start: * @args: other arguments to pass to QEMU
tests/libqtest.c +0 -2
@@ -35,8 +35,6 @@#define SOCKET_TIMEOUT 50#define SOCKET_MAX_FDS 16 -QTestState *global_qtest; -struct QTestState {int fd;
tests/libqtest.h +0 -4
@@ -22,8 +22,6 @@typedef struct QTestState QTestState ; -extern QTestState *global_qtest; -/** * qtest_initf: * @fmt...: Format for creating other arguments to pass to QEMU, formatted
@@ -641,8 +639,6 @@ void qtest_add_abrt_handler(GHookFunc fn, const void *data); void qtest_qmp_assert_success(QTestState *qts, const char *fmt, ...) GCC_FMT_ATTR(2, 3); -#include "libqtest-single.h" -QDict *qmp_fd_receive (int fd); void qmp_fd_vsend_fds(int fd, int *fds, size_t fds_num, const char *fmt, va_list ap) GCC_FMT_ATTR(4, 0);
tests/m25p80-test.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "qemu/bswap.h" -#include "libqtest.h" +#include "libqtest-single.h" /* * ASPEED SPI Controller registers
tests/qos-test.c +1 -1
@@ -18,7 +18,7 @@#include "qemu/osdep.h" #include <getopt.h> -#include "libqtest.h" +#include "libqtest-single.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qbool.h" #include "qapi/qmp/qstring.h"
tests/rtc-test.c +1 -1
@@ -13,7 +13,7 @@#include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/timer.h" #include "hw/timer/mc146818rtc_regs.h"
tests/rtl8139-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "libqos/pci-pc.h" #include "qemu/timer.h" #include "qemu-common.h"
tests/test-arm-mptimer.c +1 -1
@@ -9,7 +9,7 @@#include "qemu/osdep.h" #include "qemu/timer.h" -#include "libqtest.h" +#include "libqtest-single.h" #define TIMER_BLOCK_SCALE (s) ((((s) & 0xff) + 1) * 10)
tests/test-netfilter.c +1 -1
@@ -9,7 +9,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qapi/qmp/qdict.h" /* add a netfilter to a netdev and then remove it */
tests/test-x86-cpuid-compat.c +1 -1
@@ -4,7 +4,7 @@#include "qapi/qmp/qlist.h" #include "qapi/qmp/qnum.h" #include "qapi/qmp/qbool.h" -#include "libqtest.h" +#include "libqtest-single.h" static char *get_cpu0_qom_path (void ) {
tests/tmp105-test.c +1 -1
@@ -9,7 +9,7 @@#include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "libqos/qgraph.h" #include "libqos/i2c.h" #include "qapi/qmp/qdict.h"
tests/tpm-crb-test.c +1 -1
@@ -15,7 +15,7 @@#include "hw/acpi/tpm.h" #include "io/channel-socket.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/module.h" #include "tpm-emu.h"
tests/tpm-tests.c +1 -1
@@ -15,7 +15,7 @@#include "qemu/osdep.h" #include <glib/gstdio.h> -#include "libqtest.h" +#include "libqtest-single.h" #include "tpm-tests.h" static bool
tests/tpm-tis-test.c +1 -1
@@ -17,7 +17,7 @@#include "hw/acpi/tpm.h" #include "io/channel-socket.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/module.h" #include "tpm-emu.h"
tests/usb-hcd-ohci-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/module.h" #include "libqos/usb.h" #include "libqos/qgraph.h"
tests/usb-hcd-uhci-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "libqos/libqos.h" #include "libqos/usb.h" #include "libqos/libqos-pc.h"
tests/usb-hcd-xhci-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "libqos/usb.h"
tests/vhost-user-test.c +1 -1
@@ -10,7 +10,7 @@#include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qemu/config-file.h"
tests/virtio-9p-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/module.h" #include "hw/9pfs/9p.h" #include "hw/9pfs/9p-synth.h"
tests/virtio-blk-test.c +1 -1
@@ -9,7 +9,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/bswap.h" #include "qemu/module.h" #include "standard-headers/linux/virtio_blk.h"
tests/virtio-ccw-test.c +1 -1
@@ -14,7 +14,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "libqos/virtio.h" static void virtio_balloon_nop (void )
tests/virtio-net-test.c +1 -1
@@ -9,7 +9,7 @@#include "qemu/osdep.h" #include "qemu-common.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/iov.h" #include "qemu/module.h" #include "qapi/qmp/qdict.h"
tests/virtio-scsi-test.c +1 -1
@@ -9,7 +9,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/module.h" #include "scsi/constants.h" #include "libqos/libqos-pc.h"
tests/virtio-serial-test.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqtest-single.h" #include "qemu/module.h" #include "libqos/virtio-serial.h"
Signature · 1 line
2.18.1
[Qemu-devel] [PULL v2 9/9] gitlab-ci.yml: Install libattr-devel and libcap-devel to test virtio-9p
In reply to Thomas HuthSo far the gitlab-ci was not testing virtio-9p yet, since we did not install libattr-devel and libcap-devel in any of the pipelines. Do it now to get some more test coverage.
Message-Id: <[email protected]>
--- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
@@ -59,7 +59,7 @@ build-user: build-clang: script: - - apt-get install -y -qq clang libsdl2-dev + - apt-get install -y -qq clang libsdl2-dev libattr1-dev libcap-dev xfslibs-dev libiscsi-dev libnfs-dev libseccomp-dev gnutls-dev librbd-dev - ./configure --cc=clang --cxx=clang++ --enable-werror --target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
Signature · 1 line
2.18.1
Peter Maydell
AppliedQuoted 13 lines · Thomas Huth
Hi Peter,
the following changes since commit
500efcfcf0fe2e0dae1d25637a13435ce7b6e421:Merge remote-tracking branch 'remotes/rth/tags/pull-or1k-20190904' into staging (2019-09-05 09:33:01 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-09-05-v2
for you to fetch changes up to
e7dc804ef0d7cac9ac8b4a1324ab7dbfafb55704:
Quoted 7 lines
gitlab-ci.yml: Install libattr-devel and libcap-devel to test virtio-9p (2019-09-05 16:00:01 +0200)
----------------------------------------------------------------
- Make the core libqtest library independent fromglobal_qtest
- Clean up docs from hard-coded qemu-system-* names
- Install libattr-dev and libcap-dev in gitlab-ci to test virtio-9p
----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.
-- PMM