- 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
+env:
+ CIRRUS_CLONE_DEPTH: 1
+
freebsd_12_task:
freebsd_instance:
image: freebsd-12-0-release-amd64
cpu: 8
memory: 8G
- env:
- CIRRUS_CLONE_DEPTH: 1
install_script: pkg install -y
bison curl cyrus-sasl git glib gmake gnutls
nettle perl5 pixman pkgconf png usbredir
- ../configure || { cat config.log; exit 1; }
- gmake -j8
- 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)
F: tests/check-qnum.c
F: tests/check-qobject.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
QEMU Guest Agent
DIRS="$DIRS docs docs/interop fsdev scsi"
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
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/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
LINKS="$LINKS tests/fp/Makefile"
#include "qapi/error.h"
#include "cpu.h"
#include "hw/hw.h"
-#include "hw/devices.h"
#include "sysemu/sysemu.h"
#include "alpha_sys.h"
#include "exec/address-spaces.h"
#include "qemu-common.h"
#include "cpu.h"
#include "hw/sysbus.h"
-#include "hw/devices.h"
#include "hw/arm/allwinner-a10.h"
#include "hw/misc/unimp.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "hw/boards.h"
-#include "hw/devices.h"
#include "strongarm.h"
#include "hw/arm/arm.h"
#include "hw/block/flash.h"
#include "qemu-common.h"
#include "cpu.h"
#include "hw/sysbus.h"
-#include "hw/devices.h"
#include "hw/boards.h"
#include "hw/arm/allwinner-a10.h"
#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
-#include "hw/devices.h"
#include "hw/loader.h"
#include "net/net.h"
#include "sysemu/kvm.h"
#include "hw/arm/armsse.h"
#include "hw/dma/pl080.h"
#include "hw/ssi/pl022.h"
-#include "hw/devices.h"
#include "net/net.h"
#include "hw/core/split-irq.h"
#include "cpu.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
-#include "hw/devices.h"
#include "net/net.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/arm/arm.h"
#include "hw/sysbus.h"
#include "hw/boards.h"
-#include "hw/devices.h"
#include "hw/misc/unimp.h"
#include "exec/address-spaces.h"
#include "sysemu/sysemu.h"
#include "hw/ssi/ssi.h"
#include "hw/block/flash.h"
#include "qemu/timer.h"
-#include "hw/devices.h"
#include "hw/arm/sharpsl.h"
#include "ui/console.h"
#include "hw/audio/wm8750.h"
#include "hw/vfio/vfio-calxeda-xgmac.h"
#include "hw/vfio/vfio-amd-xgbe.h"
#include "hw/display/ramfb.h"
-#include "hw/devices.h"
#include "net/net.h"
#include "sysemu/device_tree.h"
#include "sysemu/numa.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/arm.h"
-#include "hw/devices.h"
#include "hw/i2c/i2c.h"
#include "hw/ssi/ssi.h"
#include "hw/boards.h"
#include "hw/hw.h"
#include "hw/char/serial.h"
#include "ui/console.h"
-#include "hw/devices.h"
#include "hw/sysbus.h"
#include "hw/pci/pci.h"
#include "hw/i2c/i2c.h"
#include "qapi/error.h"
#include "cpu.h"
#include "hw/hw.h"
-#include "hw/devices.h"
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
#include "qemu/osdep.h"
#include "hw/sysbus.h"
-#include "hw/devices.h"
#include "sysemu/sysemu.h"
#include "hw/intc/allwinner-a10-pic.h"
#include "qemu/log.h"
#include "hw/sysbus.h"
#include "hw/hw.h"
#include "hw/block/flash.h"
-#include "hw/devices.h"
#include "hw/boards.h"
#include "hw/loader.h"
#include "elf.h"
#include "hw/block/flash.h"
#include "sysemu/sysemu.h"
#include "sysemu/qtest.h"
-#include "hw/devices.h"
#include "hw/boards.h"
#include "hw/loader.h"
#include "elf.h"
#include "net/net.h"
#include "hw/block/flash.h"
#include "sysemu/sysemu.h"
-#include "hw/devices.h"
#include "hw/boards.h"
#include "hw/char/serial.h"
#include "exec/address-spaces.h"
#include "net/net.h"
#include "hw/block/flash.h"
#include "sysemu/sysemu.h"
-#include "hw/devices.h"
#include "hw/boards.h"
#include "hw/misc/unimp.h"
#include "exec/address-spaces.h"
#include "qemu/osdep.h"
#include "hw/sysbus.h"
-#include "hw/devices.h"
#include "net/net.h"
#include "qapi/error.h"
#include "qemu/timer.h"
#include "hw/block/flash.h"
#include "sysemu/sysemu.h"
#include "sysemu/qtest.h"
-#include "hw/devices.h"
#include "hw/boards.h"
#include "sysemu/device_tree.h"
#include "hw/loader.h"
#include "hw/sysbus.h"
#include "hw/hw.h"
#include "hw/sh4/sh.h"
-#include "hw/devices.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/pci/pci.h"
#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
-#include "hw/devices.h"
#include "net/net.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/usb.h"
#include "hw/arm/omap.h"
#include "hw/irq.h"
-#include "hw/devices.h"
#include "hw/sysbus.h"
#define TYPE_TUSB6010 "tusb6010"
/* tc6393xb.c */
typedef struct TC6393xbState TC6393xbState;
-#define TC6393XB_RAM 0x110000 /* amount of ram for Video and USB */
TC6393xbState *tc6393xb_init(struct MemoryRegion *sysmem,
uint32_t base, qemu_irq irq);
void tc6393xb_gpio_out_set(TC6393xbState *s, int line,
FILE *test_file;
QDict *qdict;
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");
g_assert(test_file != NULL);
-#! /bin/bash
+#!/usr/bin/env bash
#
# Rebuild expected AML files for acpi unit-test
unsigned res;
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;
}
{
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);
}
t = (long)mktime(datep);
s = (long)mktime(&start);
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 {
- 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);
tmpfs = mkdtemp(template);
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);
ret = rmdir(tmpfs);
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));
}
t = (long)mktime(datep);
s = (long)mktime(&start);
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 {
- 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);
static unsigned __attribute__((unused)) in_##name(void) \
{ \
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; \
} \
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); \
}
}
}
- g_test_message("Everythink is ok!\n");
+ g_test_message("Everythink is ok!");
}
}
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_here + count_other + count_retry);
}
}
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);
}
}
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);
}
}
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);
}
}
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)
}
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);
}
}
duration = g_test_timer_elapsed();
- g_test_message("Yield %u iterations: %f s\n",
- maxcycles, duration);
+ g_test_message("Yield %u iterations: %f s", maxcycles, duration);
}
static __attribute__((noinline)) void dummy(unsigned *i)
}
duration = g_test_timer_elapsed();
- g_test_message("Function call %u iterations: %f s\n",
- maxcycles, duration);
+ g_test_message("Function call %u iterations: %f s", maxcycles, duration);
}
static __attribute__((noinline)) void perf_cost_func(void *opaque)
}
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;
}
p += VHOST_USER_HDR_SIZE;
size = qemu_chr_fe_read_all(chr, p, 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);
return;
}
}
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();
return NULL;
}
} while (ret != 0 && errno == EINTR);
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();
return NULL;
}
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();
return NULL;
}
g_test_message("unable to rmdir: path (%s): %s",
server->tmpfs, strerror(errno));
}
+ g_free(server->tmpfs);
qemu_chr_fe_deinit(&server->chr, true);
g_main_loop_unref(server->loop);
g_main_context_unref(server->context);
+ g_cond_clear(&server->data_cond);
+ g_mutex_clear(&server->data_mutex);
g_free(server);
}