- qtest fixes
- Some generic clean-ups by Philippe - macOS CI testing via cirrus-ci.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJcgi7HAAoJEC7Z13T+cC21Y00P/1/m7FcVVfMlDw85+rYjkUri QWPvWUORhGbAkv87AfsFezCzoO/n3KX+AefPDWbnIM1Ixt8MvS/8zPOWAXwHUKVy ira5jP7CNJDPGr13qoO0lNrvU5cmxRWdmLOMbMsqW3Aparc5RBgDPn0bvcm5l2vX i90fdxpXvpQ/FgoX0J1j//awa3JXf94pijBb3pL985qXI670ZkRq13JIlmVZ1+Gw Fmx4XvpIwajo2HM1G+CcG8ElAxTgYmjC9bkKJW1fddOkwP7wRnZtAdLZpRTzojCb CUNBaTSM/xjinVzOhwgiHFtak/ZMOdUZrGjrbin1e/p+Xppw75P7FdUoiSnJNhga BJr8LbGcJwcIXfpMdEw7ZGlWACd+D0+G7363jNWOPyff3by6xx4gdCrBsYc4qwSR MJ8Wyb5o4oSisUg06VxghGyPTE/xBgog/YgLb4Bu6FXjCPKsl0mKQMxG0ROZLvT+ dFiaHeeCKEn7Yw6OkdqW9Sa1uGfna7gRCC7hZErDA3URe+02dUBb4VCtnjAaCLx3 0Jq8jpb2T57N8roP23QFQBxA+Y859qlZPrWzwRqbgdADZCnFsSJlmBxjDmhbYuF0 4qAQtGFTgdmhjdG/FjJkcMQkCcx4h6V62kqi8HtP+vCd43SFwLPqHH/HKq5cU/Zt YIXF2oo6z5k7iqx1H26G =DEp5 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-03-08' into staging - qtest fixes - Some generic clean-ups by Philippe - macOS CI testing via cirrus-ci.com # gpg: Signature made Fri 08 Mar 2019 08:58:47 GMT # gpg: using RSA key 2ED9D774FE702DB5 # 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 * remotes/huth-gitlab/tags/pull-request-2019-03-08: cirrus.yml: Add macOS continuous integration task tests/bios-tables: Improve portability by searching bash in the $PATH vhost-user-test: fix leaks tests: Do not use "\n" in g_test_message() strings hw/devices: Remove unused TC6393XB_RAM definition hw: Remove unused 'hw/devices.h' include tests: Move qdict-test-data.txt to tests/data/qobject/ Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # tests/vhost-user-test.c
This commit is contained in:
commit
234afe7828
15
.cirrus.yml
15
.cirrus.yml
|
@ -1,10 +1,11 @@
|
||||||
|
env:
|
||||||
|
CIRRUS_CLONE_DEPTH: 1
|
||||||
|
|
||||||
freebsd_12_task:
|
freebsd_12_task:
|
||||||
freebsd_instance:
|
freebsd_instance:
|
||||||
image: freebsd-12-0-release-amd64
|
image: freebsd-12-0-release-amd64
|
||||||
cpu: 8
|
cpu: 8
|
||||||
memory: 8G
|
memory: 8G
|
||||||
env:
|
|
||||||
CIRRUS_CLONE_DEPTH: 1
|
|
||||||
install_script: pkg install -y
|
install_script: pkg install -y
|
||||||
bison curl cyrus-sasl git glib gmake gnutls
|
bison curl cyrus-sasl git glib gmake gnutls
|
||||||
nettle perl5 pixman pkgconf png usbredir
|
nettle perl5 pixman pkgconf png usbredir
|
||||||
|
@ -14,3 +15,13 @@ freebsd_12_task:
|
||||||
- ../configure || { cat config.log; exit 1; }
|
- ../configure || { cat config.log; exit 1; }
|
||||||
- gmake -j8
|
- gmake -j8
|
||||||
- gmake -j8 V=1 check
|
- gmake -j8 V=1 check
|
||||||
|
|
||||||
|
macos_task:
|
||||||
|
osx_instance:
|
||||||
|
image: mojave-base
|
||||||
|
install_script:
|
||||||
|
- brew install pkg-config python glib pixman make sdl2
|
||||||
|
script:
|
||||||
|
- ./configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; }
|
||||||
|
- gmake -j$(sysctl -n hw.ncpu)
|
||||||
|
- gmake check -j$(sysctl -n hw.ncpu)
|
||||||
|
|
|
@ -1965,7 +1965,7 @@ F: tests/check-qnull.c
|
||||||
F: tests/check-qnum.c
|
F: tests/check-qnum.c
|
||||||
F: tests/check-qobject.c
|
F: tests/check-qobject.c
|
||||||
F: tests/check-qstring.c
|
F: tests/check-qstring.c
|
||||||
F: qdict-test-data.txt
|
F: tests/data/qobject/qdict.txt
|
||||||
T: git https://repo.or.cz/qemu/armbru.git qapi-next
|
T: git https://repo.or.cz/qemu/armbru.git qapi-next
|
||||||
|
|
||||||
QEMU Guest Agent
|
QEMU Guest Agent
|
||||||
|
|
|
@ -7737,7 +7737,7 @@ DIRS="$DIRS tests/fp tests/qgraph"
|
||||||
DIRS="$DIRS docs docs/interop fsdev scsi"
|
DIRS="$DIRS docs docs/interop fsdev scsi"
|
||||||
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
|
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
|
||||||
DIRS="$DIRS roms/seabios roms/vgabios"
|
DIRS="$DIRS roms/seabios roms/vgabios"
|
||||||
LINKS="Makefile tests/tcg/Makefile qdict-test-data.txt"
|
LINKS="Makefile tests/tcg/Makefile"
|
||||||
LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
|
LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
|
||||||
LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
|
LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
|
||||||
LINKS="$LINKS tests/fp/Makefile"
|
LINKS="$LINKS tests/fp/Makefile"
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "alpha_sys.h"
|
#include "alpha_sys.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/arm/allwinner-a10.h"
|
#include "hw/arm/allwinner-a10.h"
|
||||||
#include "hw/misc/unimp.h"
|
#include "hw/misc/unimp.h"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "strongarm.h"
|
#include "strongarm.h"
|
||||||
#include "hw/arm/arm.h"
|
#include "hw/arm/arm.h"
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/arm/allwinner-a10.h"
|
#include "hw/arm/allwinner-a10.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/arm/arm.h"
|
#include "hw/arm/arm.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "sysemu/kvm.h"
|
#include "sysemu/kvm.h"
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
#include "hw/arm/armsse.h"
|
#include "hw/arm/armsse.h"
|
||||||
#include "hw/dma/pl080.h"
|
#include "hw/dma/pl080.h"
|
||||||
#include "hw/ssi/pl022.h"
|
#include "hw/ssi/pl022.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "hw/core/split-irq.h"
|
#include "hw/core/split-irq.h"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/arm/arm.h"
|
#include "hw/arm/arm.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "hw/arm/arm.h"
|
#include "hw/arm/arm.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/misc/unimp.h"
|
#include "hw/misc/unimp.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "hw/ssi/ssi.h"
|
#include "hw/ssi/ssi.h"
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/arm/sharpsl.h"
|
#include "hw/arm/sharpsl.h"
|
||||||
#include "ui/console.h"
|
#include "ui/console.h"
|
||||||
#include "hw/audio/wm8750.h"
|
#include "hw/audio/wm8750.h"
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include "hw/vfio/vfio-calxeda-xgmac.h"
|
#include "hw/vfio/vfio-calxeda-xgmac.h"
|
||||||
#include "hw/vfio/vfio-amd-xgbe.h"
|
#include "hw/vfio/vfio-amd-xgbe.h"
|
||||||
#include "hw/display/ramfb.h"
|
#include "hw/display/ramfb.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "sysemu/device_tree.h"
|
#include "sysemu/device_tree.h"
|
||||||
#include "sysemu/numa.h"
|
#include "sysemu/numa.h"
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/arm/pxa.h"
|
#include "hw/arm/pxa.h"
|
||||||
#include "hw/arm/arm.h"
|
#include "hw/arm/arm.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/i2c/i2c.h"
|
#include "hw/i2c/i2c.h"
|
||||||
#include "hw/ssi/ssi.h"
|
#include "hw/ssi/ssi.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/char/serial.h"
|
#include "hw/char/serial.h"
|
||||||
#include "ui/console.h"
|
#include "ui/console.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/pci/pci.h"
|
#include "hw/pci/pci.h"
|
||||||
#include "hw/i2c/i2c.h"
|
#include "hw/i2c/i2c.h"
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/pci/pci.h"
|
#include "hw/pci/pci.h"
|
||||||
#include "hw/pci/pci_bus.h"
|
#include "hw/pci/pci_bus.h"
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/intc/allwinner-a10-pic.h"
|
#include "hw/intc/allwinner-a10-pic.h"
|
||||||
#include "qemu/log.h"
|
#include "qemu/log.h"
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "sysemu/qtest.h"
|
#include "sysemu/qtest.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/char/serial.h"
|
#include "hw/char/serial.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/misc/unimp.h"
|
#include "hw/misc/unimp.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "sysemu/qtest.h"
|
#include "sysemu/qtest.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "sysemu/device_tree.h"
|
#include "sysemu/device_tree.h"
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/sh4/sh.h"
|
#include "hw/sh4/sh.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/pci/pci.h"
|
#include "hw/pci/pci.h"
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "hw/usb.h"
|
#include "hw/usb.h"
|
||||||
#include "hw/arm/omap.h"
|
#include "hw/arm/omap.h"
|
||||||
#include "hw/irq.h"
|
#include "hw/irq.h"
|
||||||
#include "hw/devices.h"
|
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
|
|
||||||
#define TYPE_TUSB6010 "tusb6010"
|
#define TYPE_TUSB6010 "tusb6010"
|
||||||
|
|
|
@ -52,7 +52,6 @@ void retu_key_event(void *retu, int state);
|
||||||
|
|
||||||
/* tc6393xb.c */
|
/* tc6393xb.c */
|
||||||
typedef struct TC6393xbState TC6393xbState;
|
typedef struct TC6393xbState TC6393xbState;
|
||||||
#define TC6393XB_RAM 0x110000 /* amount of ram for Video and USB */
|
|
||||||
TC6393xbState *tc6393xb_init(struct MemoryRegion *sysmem,
|
TC6393xbState *tc6393xb_init(struct MemoryRegion *sysmem,
|
||||||
uint32_t base, qemu_irq irq);
|
uint32_t base, qemu_irq irq);
|
||||||
void tc6393xb_gpio_out_set(TC6393xbState *s, int line,
|
void tc6393xb_gpio_out_set(TC6393xbState *s, int line,
|
||||||
|
|
|
@ -291,7 +291,7 @@ static void qdict_stress_test(void)
|
||||||
FILE *test_file;
|
FILE *test_file;
|
||||||
QDict *qdict;
|
QDict *qdict;
|
||||||
QString *value;
|
QString *value;
|
||||||
const char *test_file_path = "qdict-test-data.txt";
|
const char *test_file_path = "tests/data/qobject/qdict.txt";
|
||||||
|
|
||||||
test_file = fopen(test_file_path, "r");
|
test_file = fopen(test_file_path, "r");
|
||||||
g_assert(test_file != NULL);
|
g_assert(test_file != NULL);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rebuild expected AML files for acpi unit-test
|
# Rebuild expected AML files for acpi unit-test
|
||||||
|
|
|
@ -74,7 +74,7 @@ static inline unsigned in_reg(IVState *s, enum Reg reg)
|
||||||
unsigned res;
|
unsigned res;
|
||||||
|
|
||||||
res = qpci_io_readl(s->dev, s->reg_bar, reg);
|
res = qpci_io_readl(s->dev, s->reg_bar, reg);
|
||||||
g_test_message("*%s -> %x\n", name, res);
|
g_test_message("*%s -> %x", name, res);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ static inline void out_reg(IVState *s, enum Reg reg, unsigned v)
|
||||||
{
|
{
|
||||||
const char *name = reg2str(reg);
|
const char *name = reg2str(reg);
|
||||||
|
|
||||||
g_test_message("%x -> *%s\n", v, name);
|
g_test_message("%x -> *%s", v, name);
|
||||||
qpci_io_writel(s->dev, s->reg_bar, reg, v);
|
qpci_io_writel(s->dev, s->reg_bar, reg, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,9 +199,9 @@ static void bcd_check_time(void)
|
||||||
t = (long)mktime(datep);
|
t = (long)mktime(datep);
|
||||||
s = (long)mktime(&start);
|
s = (long)mktime(&start);
|
||||||
if (t < s) {
|
if (t < s) {
|
||||||
g_test_message("RTC is %ld second(s) behind wall-clock\n", (s - t));
|
g_test_message("RTC is %ld second(s) behind wall-clock", (s - t));
|
||||||
} else {
|
} else {
|
||||||
g_test_message("RTC is %ld second(s) ahead of wall-clock\n", (t - s));
|
g_test_message("RTC is %ld second(s) ahead of wall-clock", (t - s));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert_cmpint(ABS(t - s), <=, wiggle);
|
g_assert_cmpint(ABS(t - s), <=, wiggle);
|
||||||
|
|
|
@ -1066,7 +1066,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
tmpfs = mkdtemp(template);
|
tmpfs = mkdtemp(template);
|
||||||
if (!tmpfs) {
|
if (!tmpfs) {
|
||||||
g_test_message("mkdtemp on path (%s): %s\n", template, strerror(errno));
|
g_test_message("mkdtemp on path (%s): %s", template, strerror(errno));
|
||||||
}
|
}
|
||||||
g_assert(tmpfs);
|
g_assert(tmpfs);
|
||||||
|
|
||||||
|
@ -1087,7 +1087,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
ret = rmdir(tmpfs);
|
ret = rmdir(tmpfs);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
g_test_message("unable to rmdir: path (%s): %s\n",
|
g_test_message("unable to rmdir: path (%s): %s",
|
||||||
tmpfs, strerror(errno));
|
tmpfs, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,9 +165,9 @@ static void check_time(int wiggle)
|
||||||
t = (long)mktime(datep);
|
t = (long)mktime(datep);
|
||||||
s = (long)mktime(&start);
|
s = (long)mktime(&start);
|
||||||
if (t < s) {
|
if (t < s) {
|
||||||
g_test_message("RTC is %ld second(s) behind wall-clock\n", (s - t));
|
g_test_message("RTC is %ld second(s) behind wall-clock", (s - t));
|
||||||
} else {
|
} else {
|
||||||
g_test_message("RTC is %ld second(s) ahead of wall-clock\n", (t - s));
|
g_test_message("RTC is %ld second(s) ahead of wall-clock", (t - s));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert_cmpint(ABS(t - s), <=, wiggle);
|
g_assert_cmpint(ABS(t - s), <=, wiggle);
|
||||||
|
|
|
@ -46,12 +46,12 @@ static QPCIDevice *get_device(void)
|
||||||
static unsigned __attribute__((unused)) in_##name(void) \
|
static unsigned __attribute__((unused)) in_##name(void) \
|
||||||
{ \
|
{ \
|
||||||
unsigned res = qpci_io_read##len(dev, dev_bar, (val)); \
|
unsigned res = qpci_io_read##len(dev, dev_bar, (val)); \
|
||||||
g_test_message("*%s -> %x\n", #name, res); \
|
g_test_message("*%s -> %x", #name, res); \
|
||||||
return res; \
|
return res; \
|
||||||
} \
|
} \
|
||||||
static void out_##name(unsigned v) \
|
static void out_##name(unsigned v) \
|
||||||
{ \
|
{ \
|
||||||
g_test_message("%x -> *%s\n", v, #name); \
|
g_test_message("%x -> *%s", v, #name); \
|
||||||
qpci_io_write##len(dev, dev_bar, (val), v); \
|
qpci_io_write##len(dev, dev_bar, (val), v); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ static void test_timer(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_test_message("Everythink is ok!\n");
|
g_test_message("Everythink is ok!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ static void test_multi_co_schedule(int seconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
join_aio_contexts();
|
join_aio_contexts();
|
||||||
g_test_message("scheduled %d, queued %d, retry %d, total %d\n",
|
g_test_message("scheduled %d, queued %d, retry %d, total %d",
|
||||||
count_other, count_here, count_retry,
|
count_other, count_here, count_retry,
|
||||||
count_here + count_other + count_retry);
|
count_here + count_other + count_retry);
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ static void test_multi_co_mutex(int threads, int seconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
join_aio_contexts();
|
join_aio_contexts();
|
||||||
g_test_message("%d iterations/second\n", counter / seconds);
|
g_test_message("%d iterations/second", counter / seconds);
|
||||||
g_assert_cmpint(counter, ==, atomic_counter);
|
g_assert_cmpint(counter, ==, atomic_counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ static void test_multi_fair_mutex(int threads, int seconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
join_aio_contexts();
|
join_aio_contexts();
|
||||||
g_test_message("%d iterations/second\n", counter / seconds);
|
g_test_message("%d iterations/second", counter / seconds);
|
||||||
g_assert_cmpint(counter, ==, atomic_counter);
|
g_assert_cmpint(counter, ==, atomic_counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ static void test_multi_mutex(int threads, int seconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
join_aio_contexts();
|
join_aio_contexts();
|
||||||
g_test_message("%d iterations/second\n", counter / seconds);
|
g_test_message("%d iterations/second", counter / seconds);
|
||||||
g_assert_cmpint(counter, ==, atomic_counter);
|
g_assert_cmpint(counter, ==, atomic_counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -369,7 +369,7 @@ static void perf_lifecycle(void)
|
||||||
}
|
}
|
||||||
duration = g_test_timer_elapsed();
|
duration = g_test_timer_elapsed();
|
||||||
|
|
||||||
g_test_message("Lifecycle %u iterations: %f s\n", max, duration);
|
g_test_message("Lifecycle %u iterations: %f s", max, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void perf_nesting(void)
|
static void perf_nesting(void)
|
||||||
|
@ -393,7 +393,7 @@ static void perf_nesting(void)
|
||||||
}
|
}
|
||||||
duration = g_test_timer_elapsed();
|
duration = g_test_timer_elapsed();
|
||||||
|
|
||||||
g_test_message("Nesting %u iterations of %u depth each: %f s\n",
|
g_test_message("Nesting %u iterations of %u depth each: %f s",
|
||||||
maxcycles, maxnesting, duration);
|
maxcycles, maxnesting, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,8 +426,7 @@ static void perf_yield(void)
|
||||||
}
|
}
|
||||||
duration = g_test_timer_elapsed();
|
duration = g_test_timer_elapsed();
|
||||||
|
|
||||||
g_test_message("Yield %u iterations: %f s\n",
|
g_test_message("Yield %u iterations: %f s", maxcycles, duration);
|
||||||
maxcycles, duration);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __attribute__((noinline)) void dummy(unsigned *i)
|
static __attribute__((noinline)) void dummy(unsigned *i)
|
||||||
|
@ -449,8 +448,7 @@ static void perf_baseline(void)
|
||||||
}
|
}
|
||||||
duration = g_test_timer_elapsed();
|
duration = g_test_timer_elapsed();
|
||||||
|
|
||||||
g_test_message("Function call %u iterations: %f s\n",
|
g_test_message("Function call %u iterations: %f s", maxcycles, duration);
|
||||||
maxcycles, duration);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __attribute__((noinline)) void perf_cost_func(void *opaque)
|
static __attribute__((noinline)) void perf_cost_func(void *opaque)
|
||||||
|
|
|
@ -294,7 +294,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size != VHOST_USER_HDR_SIZE) {
|
if (size != VHOST_USER_HDR_SIZE) {
|
||||||
g_test_message("Wrong message size received %d\n", size);
|
g_test_message("Wrong message size received %d", size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
|
||||||
p += VHOST_USER_HDR_SIZE;
|
p += VHOST_USER_HDR_SIZE;
|
||||||
size = qemu_chr_fe_read_all(chr, p, msg.size);
|
size = qemu_chr_fe_read_all(chr, p, msg.size);
|
||||||
if (size != msg.size) {
|
if (size != msg.size) {
|
||||||
g_test_message("Wrong message size received %d != %d\n",
|
g_test_message("Wrong message size received %d != %d",
|
||||||
size, msg.size);
|
size, msg.size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ static const char *init_hugepagefs(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (access(path, R_OK | W_OK | X_OK)) {
|
if (access(path, R_OK | W_OK | X_OK)) {
|
||||||
g_test_message("access on path (%s): %s\n", path, strerror(errno));
|
g_test_message("access on path (%s): %s", path, strerror(errno));
|
||||||
g_test_fail();
|
g_test_fail();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -447,13 +447,13 @@ static const char *init_hugepagefs(void)
|
||||||
} while (ret != 0 && errno == EINTR);
|
} while (ret != 0 && errno == EINTR);
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
g_test_message("statfs on path (%s): %s\n", path, strerror(errno));
|
g_test_message("statfs on path (%s): %s", path, strerror(errno));
|
||||||
g_test_fail();
|
g_test_fail();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs.f_type != HUGETLBFS_MAGIC) {
|
if (fs.f_type != HUGETLBFS_MAGIC) {
|
||||||
g_test_message("Warning: path not on HugeTLBFS: %s\n", path);
|
g_test_message("Warning: path not on HugeTLBFS: %s", path);
|
||||||
g_test_fail();
|
g_test_fail();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -549,6 +549,7 @@ static void test_server_free(TestServer *server)
|
||||||
g_test_message("unable to rmdir: path (%s): %s",
|
g_test_message("unable to rmdir: path (%s): %s",
|
||||||
server->tmpfs, strerror(errno));
|
server->tmpfs, strerror(errno));
|
||||||
}
|
}
|
||||||
|
g_free(server->tmpfs);
|
||||||
|
|
||||||
qemu_chr_fe_deinit(&server->chr, true);
|
qemu_chr_fe_deinit(&server->chr, true);
|
||||||
|
|
||||||
|
@ -564,6 +565,8 @@ static void test_server_free(TestServer *server)
|
||||||
|
|
||||||
g_main_loop_unref(server->loop);
|
g_main_loop_unref(server->loop);
|
||||||
g_main_context_unref(server->context);
|
g_main_context_unref(server->context);
|
||||||
|
g_cond_clear(&server->data_cond);
|
||||||
|
g_mutex_clear(&server->data_mutex);
|
||||||
g_free(server);
|
g_free(server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue