]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-03-08' into...
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 8 Mar 2019 16:31:34 +0000 (16:31 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 8 Mar 2019 16:31:34 +0000 (16:31 +0000)
- 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

38 files changed:
.cirrus.yml
MAINTAINERS
configure
hw/alpha/typhoon.c
hw/arm/allwinner-a10.c
hw/arm/collie.c
hw/arm/cubieboard.c
hw/arm/highbank.c
hw/arm/mps2-tz.c
hw/arm/musicpal.c
hw/arm/nrf51_soc.c
hw/arm/spitz.c
hw/arm/virt.c
hw/arm/z2.c
hw/display/sm501.c
hw/hppa/dino.c
hw/intc/allwinner-a10-pic.c
hw/lm32/lm32_boards.c
hw/lm32/milkymist.c
hw/microblaze/petalogix_ml605_mmu.c
hw/microblaze/petalogix_s3adsp1800_mmu.c
hw/net/dp8393x.c
hw/ppc/virtex_ml507.c
hw/sh4/r2d.c
hw/tricore/tricore_testboard.c
hw/usb/tusb6010.c
include/hw/devices.h
tests/check-qdict.c
tests/data/acpi/rebuild-expected-aml.sh
tests/data/qobject/qdict.txt [moved from qdict-test-data.txt with 100% similarity]
tests/ivshmem-test.c
tests/m48t59-test.c
tests/migration-test.c
tests/rtc-test.c
tests/rtl8139-test.c
tests/test-aio-multithread.c
tests/test-coroutine.c
tests/vhost-user-test.c

index 303fe720d687752716abc2d4060edefd83d3c3c1..47ef5bc604025134ae55f04a041f975a986c8150 100644 (file)
@@ -1,10 +1,11 @@
+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
@@ -14,3 +15,13 @@ freebsd_12_task:
     - ../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)
index 074ad46d47335663b27b5481178a9d9064bd532f..2344215aa24f513cbd07f7efc1c4a3f8e8384265 100644 (file)
@@ -1965,7 +1965,7 @@ F: tests/check-qnull.c
 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
index 79453a674fe8109b256ab3a2301f4a5fa570fbfd..b354e74185a44c7e11332b02fd75b47edd5f53cd 100755 (executable)
--- a/configure
+++ b/configure
@@ -7737,7 +7737,7 @@ DIRS="$DIRS tests/fp tests/qgraph"
 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"
index 397e2dcdc73ffc1ae62831153c3771abaa8cc749..9d57361c6702a1c356444ae820d8e234bfab157c 100644 (file)
@@ -11,7 +11,6 @@
 #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"
index df0d079ad0a939ec8a19cc24debd398b679492c5..06ec6f4dc83ded389becebc3cf547aaf9db78231 100644 (file)
@@ -20,7 +20,6 @@
 #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"
 
index 48b732c176e68901e34c9fda356e1657727a8180..3ca4e078feab68596ffa1510b1780dff8bc44c60 100644 (file)
@@ -12,7 +12,6 @@
 #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"
index 32f1edd2fabebf37d79195232418a754b3c54ed2..84187d391694bc46e9762ce724ec541327faf60f 100644 (file)
@@ -20,7 +20,6 @@
 #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"
 
index fb9efa02c3578e6db356c3178089bfb73b39646c..96ccf18d863a280bd4954890c017469b69265018 100644 (file)
@@ -21,7 +21,6 @@
 #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"
index f5f0b0e0fa5decb2e2a43d2d4c23177e8e3a5e52..f79f090a4ac3b81d63c5e5292709d9d627a1ef4b 100644 (file)
@@ -56,7 +56,6 @@
 #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"
 
index d22532a11c88f7111f94413ffd374586a6077610..de4a12e496a2453a93a49c6f6292f7438e25f74a 100644 (file)
@@ -15,7 +15,6 @@
 #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"
index bbaf050103a21e042e3d9394efe81f6a7943137a..3e633d160ea255f65e223351f1a70ac3c3004c9a 100644 (file)
@@ -14,7 +14,6 @@
 #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"
index c4bc3deedf33ea9483c018a8ccc0a2c55af97e7d..22f5958b9dabdfe21b69f060805a6944c8dfd3df 100644 (file)
@@ -21,7 +21,6 @@
 #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"
index c7fb5348ae75a7ecb210a242561fe0ac5c6d7e29..7f66ddad89f6f5729861bb0632e4bb6485296c1c 100644 (file)
@@ -38,7 +38,6 @@
 #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"
index 6f18d924df3c5bf6afc7fc72d5724bc27c91c132..3b75d4b39d03d8fb042de0e0b00def0bc0a55be8 100644 (file)
@@ -15,7 +15,6 @@
 #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"
index 4a8686f0f5bea668b0c1b096e7982662853ee6dc..2122291308f0100398796f525110aac2d652af91 100644 (file)
@@ -32,7 +32,6 @@
 #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"
index 40f9e1a9631262e6c61a5b5528d6a7602d3d72a0..4d1380c51fa92729ccd2739c67f21fa573dbfd1c 100644 (file)
@@ -15,7 +15,6 @@
 #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"
index 11f13663c8e4baf3009be89c693b390328b0b088..1aa628cbbb8a08437ec99c0e55a0feea8d3bed42 100644 (file)
@@ -17,7 +17,6 @@
 
 #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"
index 05157f8eab76cf3c867826a80a770b670897ec87..599e0d49232e775893a1f13056af1bba3dbde3b4 100644 (file)
@@ -25,7 +25,6 @@
 #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"
index b080cf1ca9204f719c27f5ea0b721e2eecfba8bc..538f33b946ce48dac63f660088bd4f4fd976793d 100644 (file)
@@ -27,7 +27,6 @@
 #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"
index c730878d255a3de7c954ea821903150c570396e8..18048d35559d0ca722dc3603d6432b194e8d8a45 100644 (file)
@@ -35,7 +35,6 @@
 #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"
index b9f0b0d06e621f2c91055df840a2e73b25c8c15f..a0edaf867c4c1083d9eee49c1e0072dc60307e0c 100644 (file)
@@ -33,7 +33,6 @@
 #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"
index b53fcaa8bc318cbf5948a060a5961a1ddf384127..98cb4e58c7baaa9857a2372c99ab52f8a5ede039 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
-#include "hw/devices.h"
 #include "net/net.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
index 5a711cb3d9415982da2277cbd751fa38b9bbb30b..26e23120064caf65bf30b48d5ae4a3488576a9ba 100644 (file)
@@ -31,7 +31,6 @@
 #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"
index dcdb3728cbc529a39fccd6788c6eb807186d6047..28ed6be05b08fbf841e9f1c6c439ae79af434b91 100644 (file)
@@ -31,7 +31,6 @@
 #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"
index 003592af27a6bfca2076e8ba98725295d8d5f014..b40cc997d0729e6ec0363244ea0bd56a6e6a8166 100644 (file)
@@ -24,7 +24,6 @@
 #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"
index 501706e2b29e7f95d57a2cae78b511da4157da33..f76b59afe8638b24b9a060164e521c786e0d932c 100644 (file)
@@ -24,7 +24,6 @@
 #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"
index b5f1662225ce6cab2522e7fe5a0d66399a4eee01..1ed5be32967edcd9b2fbefb70bc1904c591c75c5 100644 (file)
@@ -52,7 +52,6 @@ void retu_key_event(void *retu, int state);
 
 /* 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,
index a1e83050661c409769f22bc5cca5b5e07fc9756e..b5efa859b0b11b3f9e6ede532ae32804e3245a1b 100644 (file)
@@ -291,7 +291,7 @@ static void qdict_stress_test(void)
     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);
index bf9ba242addfe921f1107640682df090affb1bea..abdff70a0d1668bb5b55218af4eca94d028429ec 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
 
 #
 # Rebuild expected AML files for acpi unit-test
index 942ddc91926a0851ca62966b9cacf173b019c8f6..227561fbca3f7bc2def6e04e991d0b847eccef13 100644 (file)
@@ -74,7 +74,7 @@ static inline unsigned in_reg(IVState *s, enum Reg reg)
     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;
 }
@@ -83,7 +83,7 @@ static inline void out_reg(IVState *s, enum Reg reg, unsigned v)
 {
     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);
 }
 
index 4abf9c605cf38aefc6187f80a0bf05db495ca31c..b94a1230f7fdf742102597f402e2ea894689320b 100644 (file)
@@ -199,9 +199,9 @@ static void bcd_check_time(void)
         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);
index e3617ceaca0f8eeb134067cec9cf3cc1dd7d2906..48dc20a2ae0c015e6c7461f1e0839a73ca73cdd4 100644 (file)
@@ -1066,7 +1066,7 @@ int main(int argc, char **argv)
 
     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);
 
@@ -1087,7 +1087,7 @@ int main(int argc, char **argv)
 
     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));
     }
 
index d7a96cbd79fdae0f79f49026327dc98a36c4d8ea..509be707e3471cc1662e62ca613ed2b2a50e256e 100644 (file)
@@ -165,9 +165,9 @@ static void check_time(int wiggle)
         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);
index a85c91f197457b0edb81de648fbe3a8f68907616..d6d0c249095bf83163e510b5e5acac809574c5e3 100644 (file)
@@ -46,12 +46,12 @@ static QPCIDevice *get_device(void)
 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);        \
 }
 
@@ -176,7 +176,7 @@ static void test_timer(void)
         }
     }
 
-    g_test_message("Everythink is ok!\n");
+    g_test_message("Everythink is ok!");
 }
 
 
index 6440d54ac36c7291463aefc0c0dce10a755afc99..d3144be7e0c493d41cd531ed8454785480a9a0ad 100644 (file)
@@ -178,7 +178,7 @@ static void test_multi_co_schedule(int seconds)
     }
 
     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);
 }
@@ -242,7 +242,7 @@ static void test_multi_co_mutex(int threads, int seconds)
     }
 
     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);
 }
 
@@ -361,7 +361,7 @@ static void test_multi_fair_mutex(int threads, int seconds)
     }
 
     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);
 }
 
@@ -417,7 +417,7 @@ static void test_multi_mutex(int threads, int seconds)
     }
 
     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);
 }
 
index 28e79b3210f6b7b8dc38f5d64cf93f490da7adeb..e946d93a657fd19da5f2405ab2d801d50e1bcb8b 100644 (file)
@@ -369,7 +369,7 @@ static void perf_lifecycle(void)
     }
     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)
@@ -393,7 +393,7 @@ 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);
 }
 
@@ -426,8 +426,7 @@ static void perf_yield(void)
     }
     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)
@@ -449,8 +448,7 @@ static void perf_baseline(void)
     }
     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)
index 92dfeeddf48cad0c086290ff753a387d5c64ae42..0c965b3b1e1638946e9c8a7d7b510eebb0434c89 100644 (file)
@@ -294,7 +294,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int 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;
     }
 
@@ -305,7 +305,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
         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;
         }
@@ -437,7 +437,7 @@ static const char *init_hugepagefs(void)
     }
 
     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;
     }
@@ -447,13 +447,13 @@ static const char *init_hugepagefs(void)
     } 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;
     }
@@ -549,6 +549,7 @@ static void test_server_free(TestServer *server)
         g_test_message("unable to rmdir: path (%s): %s",
                        server->tmpfs, strerror(errno));
     }
+    g_free(server->tmpfs);
 
     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_context_unref(server->context);
+    g_cond_clear(&server->data_cond);
+    g_mutex_clear(&server->data_mutex);
     g_free(server);
 }