Statistics
| Branch: | Revision:

root / tests / libqtest.c @ 0d09e41a

History | View | Annotate | Download (11.8 kB)

# Date Author Comment
872536bf 02/18/2013 04:39 pm Andreas Färber

qtest: Add MMIO support

Introduce [qtest_]{read,write}[bwlq]() libqtest functions and
corresponding QTest protocol commands to replace local versions in
libi2c-omap.c.

Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b().

Signed-off-by: Andreas Färber <>...

b73cf9e9 02/18/2013 04:39 pm Andreas Färber

libqtest: Introduce qtest_qmpv() and convert remaining macro

In order to convert qmp() macro to an inline function, expose a
qtest_qmpv() function, reused by qtest_qmp().

We can't apply GCC_FMT_ATTR() since fdc-test is using zero-length format
strings, which would result in warnings treated as errors....

6bf00766 02/01/2013 06:43 pm Eduardo Habkost

libqtest: Wait for the right child PID after killing QEMU

When running "make check" with gcov enabled, we get the following
message:

hw/tmp105.gcda:cannot open data file, assuming not executed

The problem happens because:

  • tmp105-test exits before QEMU exits, because waitpid() at...
1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

e0fea6b1 10/05/2012 04:02 pm Paolo Bonzini

qtest: implement QTEST_STOP

It is quite difficult to debug qtest test cases without extra wrapper
scripts for QEMU or similar. This patch adds a simple environment
variable-based trigger that sends a STOP signal to the QEMU instance
under test, before attempting to connect to its QMP session....

bb494a50 07/09/2012 06:21 pm Markus Armbruster

qtest: Tidy up temporary files properly

Each test litters /tmp with several files: a pid file and two
sockets. Tidy up.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

039380a8 06/28/2012 12:26 am Anthony Liguori

qtest: fix infinite loop when QEMU aborts abruptly

From Markus:

Makes "make check" hang:

QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test
TEST: tests/crash-test... (pid=972)
qemu-system-x86_64: Device needs media, but drive is empty...
b34d2595 06/22/2012 11:41 am Andreas Färber

libqtest: Fix socket_accept() to pass address_len

accept() expects address_len to point to the length of the sockaddr on
input. Initialize it accordingly.

Resolves an assertion due to EFAULT on illumos.

Signed-off-by: Andreas Färber <>...

a3ca163c 05/10/2012 11:32 am Kevin Wolf

qtest: Add function to send QMP commands

Signed-off-by: Kevin Wolf <>
Reviewed-by: Paolo Bonzini <>

ea7697fc 04/26/2012 09:14 pm Stefan Weil

qtest: Fix more format errors with qtest_sendf

After adding GCC_FMT_ATTR to qtest_sendf, more format errors are reported
by the compiler. These are fixed here.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

ce6bf17a 04/23/2012 10:28 pm Blue Swirl

qtest: fix memread and memwrite on 32 bit hosts

Use PRIx64 to print 64 bit values to avoid truncation
on 32 bit hosts.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Blue Swirl <>

49ee3590 03/30/2012 04:14 pm Anthony Liguori

qtest: add C version of test infrastructure

This also includes a qtest wrapper script to make it easier to launch qtest
tests directly.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>